473,503 Members | 1,760 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

MySQL uses swap with plenty of RAM available

Output of "top" prior to initiation of mysql:

load averages: 0.60, 0.97, 1.05
19:03:45
44 processes: 43 sleeping, 1 on cpu
CPU states: 97.1% idle, 0.0% user, 0.8% kernel, 2.1% iowait, 0.0%
swap
Memory: 4096M real, 3646M free, 42M swap in use, 3494M swap free

PID USERNAME THR PRI NICE SIZE RES STATE TIME CPU COMMAND
10709 agibson 14 58 0 5824K 4384K sleep 4:11 0.06% rtgpoll
10705 agibson 14 58 0 5808K 4368K sleep 3:58 0.06% rtgpoll
12002 jscript 1 58 0 2288K 1440K cpu0 0:00 0.06% top
10706 agibson 15 58 0 5632K 4192K sleep 3:24 0.05% rtgpoll
10708 agibson 15 58 0 5520K 4072K sleep 2:57 0.05% rtgpoll
10707 agibson 15 58 0 5544K 4088K sleep 3:00 0.05% rtgpoll
10845 jscript 1 48 0 2504K 1784K sleep 0:00 0.01% bash
72 root 15 21 0 6896K 6152K sleep 0:23 0.00% picld
11980 root 1 48 0 336K 232K sleep 0:00 0.00% sh
11895 agibson 1 58 0 6632K 1904K sleep 0:00 0.00% sshd
11981 root 1 58 0 2504K 1760K sleep 0:00 0.00% bash
228 root 1 48 0 1752K 968K sleep 0:01 0.00% prngd
1070 root 1 18 0 336K 232K sleep 0:00 0.00% sh
179 root 1 32 0 1776K 920K sleep 0:00 0.00% sf880drd
11893 root 1 38 0 7024K 3248K sleep 0:00 0.00% sshd
Output of top immediately after starting mysql:

load averages: 0.29, 0.80, 0.99
19:04:50
46 processes: 45 sleeping, 1 on cpu
CPU states: 98.8% idle, 0.0% user, 1.1% kernel, 0.1% iowait, 0.0%
swap
Memory: 4096M real, 3378M free, 2142M swap in use, 1394M swap free

PID USERNAME THR PRI NICE SIZE RES STATE TIME CPU COMMAND
12037 mysql 11 0 0 2107M 268M sleep 0:00 1.53% mysqld
10705 agibson 14 58 0 5808K 4368K sleep 3:59 1.35% rtgpoll
10709 agibson 14 58 0 5824K 4384K sleep 4:12 1.30% rtgpoll
10707 agibson 15 58 0 5544K 4088K sleep 3:00 0.96% rtgpoll
10708 agibson 15 58 0 5520K 4072K sleep 2:58 0.96% rtgpoll
10706 agibson 15 58 0 5632K 4200K sleep 3:25 0.93% rtgpoll
12013 root 1 0 0 1080K 784K sleep 0:00 0.03% mysqld_safe
72 root 15 21 0 6896K 6152K sleep 0:23 0.03% picld
228 root 1 48 0 1752K 968K sleep 0:01 0.00% prngd
12002 jscript 1 58 0 2288K 1440K cpu0 0:00 0.00% top
1070 root 1 18 0 336K 232K sleep 0:00 0.00% sh
179 root 1 32 0 1776K 920K sleep 0:00 0.00% sf880drd
10823 root 1 38 0 7024K 3248K sleep 0:00 0.00% sshd
11893 root 1 38 0 7024K 3248K sleep 0:00 0.00% sshd
1055 root 1 38 0 6632K 2776K sleep 0:00 0.00% sshd

Over 75% of the RAM is showing as available yet MySQL uses 2Gigs of
swap rather than the available 3 Gigs of real memory?!?!?

Jan 18 '07 #1
1 6152
aaron wrote:
Output of "top" prior to initiation of mysql:

load averages: 0.60, 0.97, 1.05
19:03:45
44 processes: 43 sleeping, 1 on cpu
CPU states: 97.1% idle, 0.0% user, 0.8% kernel, 2.1% iowait, 0.0%
swap
Memory: 4096M real, 3646M free, 42M swap in use, 3494M swap free

PID USERNAME THR PRI NICE SIZE RES STATE TIME CPU COMMAND
10709 agibson 14 58 0 5824K 4384K sleep 4:11 0.06% rtgpoll
10705 agibson 14 58 0 5808K 4368K sleep 3:58 0.06% rtgpoll
12002 jscript 1 58 0 2288K 1440K cpu0 0:00 0.06% top
10706 agibson 15 58 0 5632K 4192K sleep 3:24 0.05% rtgpoll
10708 agibson 15 58 0 5520K 4072K sleep 2:57 0.05% rtgpoll
10707 agibson 15 58 0 5544K 4088K sleep 3:00 0.05% rtgpoll
10845 jscript 1 48 0 2504K 1784K sleep 0:00 0.01% bash
72 root 15 21 0 6896K 6152K sleep 0:23 0.00% picld
11980 root 1 48 0 336K 232K sleep 0:00 0.00% sh
11895 agibson 1 58 0 6632K 1904K sleep 0:00 0.00% sshd
11981 root 1 58 0 2504K 1760K sleep 0:00 0.00% bash
228 root 1 48 0 1752K 968K sleep 0:01 0.00% prngd
1070 root 1 18 0 336K 232K sleep 0:00 0.00% sh
179 root 1 32 0 1776K 920K sleep 0:00 0.00% sf880drd
11893 root 1 38 0 7024K 3248K sleep 0:00 0.00% sshd
Output of top immediately after starting mysql:

load averages: 0.29, 0.80, 0.99
19:04:50
46 processes: 45 sleeping, 1 on cpu
CPU states: 98.8% idle, 0.0% user, 1.1% kernel, 0.1% iowait, 0.0%
swap
Memory: 4096M real, 3378M free, 2142M swap in use, 1394M swap free

PID USERNAME THR PRI NICE SIZE RES STATE TIME CPU COMMAND
12037 mysql 11 0 0 2107M 268M sleep 0:00 1.53% mysqld
10705 agibson 14 58 0 5808K 4368K sleep 3:59 1.35% rtgpoll
10709 agibson 14 58 0 5824K 4384K sleep 4:12 1.30% rtgpoll
10707 agibson 15 58 0 5544K 4088K sleep 3:00 0.96% rtgpoll
10708 agibson 15 58 0 5520K 4072K sleep 2:58 0.96% rtgpoll
10706 agibson 15 58 0 5632K 4200K sleep 3:25 0.93% rtgpoll
12013 root 1 0 0 1080K 784K sleep 0:00 0.03% mysqld_safe
72 root 15 21 0 6896K 6152K sleep 0:23 0.03% picld
228 root 1 48 0 1752K 968K sleep 0:01 0.00% prngd
12002 jscript 1 58 0 2288K 1440K cpu0 0:00 0.00% top
1070 root 1 18 0 336K 232K sleep 0:00 0.00% sh
179 root 1 32 0 1776K 920K sleep 0:00 0.00% sf880drd
10823 root 1 38 0 7024K 3248K sleep 0:00 0.00% sshd
11893 root 1 38 0 7024K 3248K sleep 0:00 0.00% sshd
1055 root 1 38 0 6632K 2776K sleep 0:00 0.00% sshd

Over 75% of the RAM is showing as available yet MySQL uses 2Gigs of
swap rather than the available 3 Gigs of real memory?!?!?
mysql will only use as much physical memory as you have configured it to use....

Start here:
http://dev.mysql.com/doc/refman/5.0/...he-server.html
http://dev.mysql.com/doc/refman/5.0/en/memory-use.html
http://dev.mysql.com/doc/refman/5.0/...arameters.html

--
Michael Austin
Database Consultant
Domain Registration and Linux/Windows Web Hosting Reseller
http://www.spacelots.com
Jan 19 '07 #2

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

11
3226
by: George Augustino | last post by:
REQUEST FOR DISCUSSION (RFD) unmoderated group comp.databases.mysql Newsgroup line: comp.databases.mysql MySQL relational database system discussion group. This is a formal Request For...
0
1557
by: Petre Agenbag | last post by:
Hi List Been trying to help out with this problem on a SunOS5.8 box running 3.23.56 It experiences periodic lockups of mysql. It does not seem that this server has a my.cnf file for mysql,...
0
1506
by: Kayra Otaner | last post by:
Hi all, I want to get your opinions on how to increase available/free memory and performance on a heavy volume database server. I have MySQL 4.0.13 running on RH 7.2 replicated to another RH...
0
1663
by: kayra | last post by:
Hi all, I want to get your opinions on how to increase available/free memory and performance on a heavy volume database server. I have MySQL 4.0.13 running on RH 7.2 replicated to another RH...
4
4468
by: Amadeus | last post by:
Hello Everybody! I have a problem with MySQL servers running RedHat 9 (smp kernel 2.4.20) on Intel and MySQL server 4.0.14 (problem also appears on binary distr 4.0.15 and on 4.0.15 I bilt myself...
2
3795
by: saran | last post by:
I am having a problem with MySQL consuming a lot of memory and eventually throwing an Out of Memory error and restarting itself. The symptoms are that swap usage continues to rise until some...
12
2701
by: mistral | last post by:
phpMyAdmin 2.6.2 problem: can no connects to mySQL database: each time shown error #1045 - Access denied for user 'username'@'192.168.1.2' (using password: YES) Is seems, this is most common...
110
10441
by: alf | last post by:
Hi, is it possible that due to OS crash or mysql itself crash or some e.g. SCSI failure to lose all the data stored in the table (let's say million of 1KB rows). In other words what is the worst...
14
4477
by: Frank Rizzo | last post by:
I've been given a project to work with which involves connecting to MySQL from .NET 2.0 app. I've googled looked and there is a metric ton of different MySQL ADO.NET providers from different...
0
7199
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
7274
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
0
7323
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...
0
7453
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...
1
5005
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new...
0
4670
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and...
0
3162
by: TSSRALBI | last post by:
Hello I'm a network technician in training and I need your help. I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs. The...
0
3151
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
0
377
bsmnconsultancy
by: bsmnconsultancy | last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.