Server Fault is a question and answer site for system and network administrators. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

I've just installed a brand new server image, and have been finding that MySQL has been consuming a lot of memory despite the fact that nobody's been querying it. I checked free -m to see if it was a matter of cache (à la, but it wouldn't appear to be. I've tried restarting the service, and the same amount of memory is used. I am running Ubuntu 12.04. Is this a memory leak? How can I fix this?

# free -m enter image description here

# htop enter image description here

# ps aux enter image description here

share|improve this question
I'd appreciate a comment when you downvote. It's unconstructive otherwise. – Joseph Szymborski Jun 15 '13 at 15:28
Not my down vote but float your mouse over the down arrow - my guess would be one of them is the reason. – Iain Jun 15 '13 at 15:44
up vote 0 down vote accepted

First: If after a restart of a service, the same amount of memory is used, a memory leak can be ruled out because this results in "loss" of memory over time due to programming bugs where memory isn't freed correctly.

Second: What is your problem? You have a tiny server with 256 MB of RAM, 182 MB of which is still usable. Should you be worried about the "VIRT" number: This has nothing to do with the real amount of memory used, it's a number that includes a lof of stuff, much of which has nothing to do with real memory. Please read man top to learn what the numbers mean before starting to worry.

share|improve this answer
I was more worried about the %MEM, which according to the man top is the percentage of physical memory. All the same, I feel this answers the question nicely. Thank you very much. – Joseph Szymborski Jun 15 '13 at 15:43

Your Answer


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.