4 ms·
I give up. I'm completely spent. I'm not sure how many times I can post this without pulling (what remains of) my hair out: The value displayed in the VIRT col
by bradleyland 16y ago
I give up. I'm completely spent. I'm not sure how many times I can post this without pulling (what remains of) my hair out:
The value displayed in the VIRT column of `top` is NOT the same as the actual physical memory in use.
Period.
Full stop.
The answer to this question is far more subtle and is addressed very well in this Stackoverflow thread:
http://stackoverflow.com/questions/118307/a-way-to-determine-a-processs-real-memory-usage-i-e-private-dirty-rss http://stackoverflow.com/questions/118307/a-way-to-determine...
If you're running Linux and are interested in knowing the private dirty RSS number, Phusion Passenger comes with a great little utility called `passenger-memory-stats`. The source can be viewed here:
http://github.com/FooBarWidget/passenger/blob/master/bin/passenger-memory-stats http://github.com/FooBarWidget/passenger/blob/master/bin/pas...
There are some good ideas in their code that can be used as a jumping off point for your own scripts.