I am using BusyBox on a small embedded ARM system. I'm trying to read the "top" output, in particular for the Python process listed. How much real memory is this process using? Also what does VSZ stand for? The system only has 64MB of RAM.
Mem: 41444K used, 20572K free, 0K shrd, 0K buff, 18728K cached CPU: 3% usr 3% sys 0% nic 92% idle 0% io 0% irq 0% sirq Load average: 0.00 0.04 0.05 1/112 31667 PID PPID USER STAT VSZ %VSZ %CPU COMMAND 777 775 python S 146m 241% 3% /usr/bin/python -u -- dpdsrv.py
Best Answer
VSZ
(orVIRT
, depending on the version oftop
) is the amount of memory mapped into the address space of the process. It includes pages backed by the process' executable file and shared libraries, its heap and stack, as well as anything else it has mapped.In the case of the sample output you show, the virtual size is larger than the amount of physical memory on the system, so necessarily some (most!) of the pages in the process' address space aren't physically present in RAM. That's not a problem: many programs contain large amounts of code and maps lots of shared libraries but they only actually use certain portions of that code, or at least only use certain portions of the code at the same time, which allows the kernel to drop the unused portions from memory whenever they are not used, or even to never load them in the first place.
Your version of
top
doesn't seem to show aRES
column, which would tell you how much of the memory in the process' address space is currently resident in RAM.