“The second line shows how much swap is being used: none, on my
system right now. Yet Firefox is using 315M of VSZ but only (only!)
159M of RSS. How can that be?“What the ps and top man pages don’t tell you is that there are
other types of memory included in VSZ. For instance, when a program
makes a large large memory allocation request, the kernel may not
allocate all of it right away — it might just reserve it in case
the program ever actually tries to access that memory. So VSZ
represents RSS plus swapped memory plus memory that the program
thinks it might need to use some day but actually may never
touch.“Okay, so that VSZ number is bogus. Firefox isn’t really using
315M. Whew! What about that 159M of RSS?“Well, there are mitigating factors there too. The biggest is
shared libraries.”
Finding and Trimming Linux Bloat
By
Get the Free Newsletter!
Subscribe to Developer Insider for top news, trends, & analysis