Swap confusion from Top and Free Outputs
Hi All,
I am not sure how to put this and i am kind of feeling embarrassed also asking this question because i think i should have known this, anyways here it is. Code:
# free -m I am sorry if there is something silly in the question.:( |
The SWAP column in top shows VIRT minus RES and reflects the amount that might be swapped if the processes were to try to actually occupy all 2274m of the virtual address space. Since there are no pages allocated to the vast majority of that 2274m of mostly-empty virtual space, nothing needs to be swapped, and the free command rightly shows zero swap used.
|
Swapping activity is also not limited to the swap file/partition. It is entirely possible for the system to drop pages from memory where the program code hasn't been used, and page in other program code from the disk resident program file. This is an ambiguous report from top, as it defines swap this way (ref manpage on top):
Code:
p: SWAP -- Swapped size (kb) |
All times are GMT -5. The time now is 04:10 PM. |