Take the 2-minute tour ×
Server Fault is a question and answer site for professional system and network administrators. It's 100% free, no registration required.

I have noticed that my dedicated server is using 336mb for mysql. The server only has around 10 domains that are regularly visited throughout the day (there's roughly 10 more but are hardly ever visited) so 336mb seems pretty high.

I have been watching the process list but nothing sticks around (actually, I hardly ever see anything come up even with an interval of 1 second).

Is there anything I can use to find out the memory usage per user? This would help me to narrow the problem down to a specific site.

free:

             total       used       free     shared    buffers     cached
Mem:        916144     660536     255608          0          0          0
-/+ buffers/cache:     660536     255608
Swap:            0          0          0

top:

15:25:23 up 105 days, 52 min,  1 user,  load average: 0.00, 0.00, 0.00
Tasks:  49 total,   1 running,  48 sleeping,   0 stopped,   0 zombie
Cpu(s):  0.3% us,  0.1% sy,  0.0% ni, 99.6% id,  0.0% wa,  0.0% hi,  0.0% si
Mem:    916144k total,   663328k used,   252816k free,        0k buffers
Swap:        0k total,        0k used,        0k free,        0k cached

  PID USER      PR  NI  VIRT  RES  SHR S %CPU %MEM    TIME+  COMMAND
20224 mysql     16   0  336m  79m 6844 S  0.3  8.9   0:08.67 mysqld
 7758 root      16   0  147m  53m 9524 S  0.0  6.0   2:13.47 httpd
17917 apache    15   0  148m  51m 6696 S  0.0  5.7   0:00.67 httpd
27977 apache    16   0  148m  50m 6184 S  0.0  5.7   0:00.39 httpd
26566 apache    15   0  148m  49m 4540 S  0.0  5.5   0:00.02 httpd
 6111 apache    16   0 68636  42m  600 S  0.0  4.8   0:00.19 httpd
share|improve this question
1  
I deleted my answer since it was nowhere near to being right for this issue. I do find it odd though that there's no swap or buffers. Is this a virtualized server? –  Hyppy Mar 23 '11 at 15:29
    
Yep, running virtouzzo. I've red that the swap will always be 0 with this –  Ashley Mar 23 '11 at 22:38
add comment

1 Answer

You might want to have a look at the internal numbers from mysql via scripts like http://hackmysql.com/mysqlreport This might give you more insight into what MySQL is keeping track of..

share|improve this answer
add comment

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.