Portal Home > Knowledgebase > Articles Database > Where's the Memory Going?


Where's the Memory Going?




Posted by david3, 02-27-2011, 07:13 AM
I have a VMware VPS. When I first start all of my services, it's using around 70-80 MB of memory. After a few hours, I start to notice the memory usage exceeding 400 MB or 500 MB, though. Like this (512 MB used): When I check "ps" to get memory utilization by process, it doesn't add up. This only accounts for 78.760 MB: Are there other things I can check to see where the other 433MB of unaccounted for memory has gone? Also, is there any way to check if memory ballooning is active on a VMware guest? I think it should be accounted for here, if it was: However, I'm no VMware expert. Thanks.

Posted by Rapid2214, 02-27-2011, 01:18 PM
Restart your webserver and see if your memory usage goes down...

Posted by david3, 02-27-2011, 09:21 PM
I'm using nginx instead of apache. I've tried restarting it, but it makes no difference. Nginx typically uses very little memory anyway. The biggest consumer of memory I have is php-fpm, but even it doesn't use that much, and I've reduced the number of child processes from 5 to 3. Even if I completely stop the php-fpm process, something is still using lots of memory.

Posted by tchen, 02-27-2011, 10:10 PM
I think its just the vmware balloon. Nothing bad really. You've got so much free memory, ESXi is just going to balloon you so that it can use it. It's kinda normal, but once it forces your VM into swap, it should start deflating it (if not earlier). If not, then that's a bad sign the node is too loaded. If your curious, here's the white paper on it. http://www.vmware.com/files/pdf/perf...management.pdf

Posted by david3, 02-27-2011, 10:25 PM
Thanks. Do you know of a way to check to see if ballooning is active from the guest, and to see how much the balloon is taking? What I've found only talks about checking ballooning from the host system, using esxtop. But that's not available on the guest system.

Posted by Backupteddy, 02-27-2011, 11:33 PM
I wouldn't worry about this. A lot of programs eat up memory if they can, and give it back when the going gets tough. As long as your VPS is running smoothly I would not be concerned.

Posted by tchen, 02-27-2011, 11:50 PM
The balloon driver is vmmemctl. Does it show up in the RSS column show in ps aux?

Posted by david3, 02-28-2011, 12:15 AM
Yes, I see vmmemctl in the process list, but I don't see it using much memory. If it was taking memory, do you know if it would show up under that process, or is the whole thing invisible?

Posted by tchen, 02-28-2011, 12:18 AM
Sorry my bad. I probably should have tried it first Look under /proc/vmmemctl It'll show you the target and current values. Unfortunately, mine are both zero right now, but maybe yours will show something different.

Posted by david3, 02-28-2011, 09:09 AM
Thanks, it seems it's settled down the last several hours, just as I'm ready to check it. I did catch it ballooning, though, so I suspect that's what is happening. I'll check it again when the memory usage really shoots back up.

Posted by david3, 03-01-2011, 01:25 AM
Now it's starting to balloon:

Posted by tchen, 03-01-2011, 10:33 AM
Got any java apps handy? I'd be curious on how it behaves if you ask for a large enough heap size to theoretically force it to deflate. Option -Xms1800m should do the trick.

Posted by david3, 03-01-2011, 10:57 PM
I don't have java installed, so I'm trying to think of a way to allocate some memory for a test.



Was this answer helpful?

Add to Favourites Add to Favourites    Print this Article Print this Article

Also Read
Webreseller.net (Views: 697)
EuroVPS Down ?? (Views: 777)

Language: