Linux memory: Difference between revisions
From DWIKI
mNo edit summary |
mNo edit summary |
||
Line 42: | Line 42: | ||
'''Virtual Memory Size''' | '''Virtual Memory Size''' | ||
It includes all memory that the process can access, including memory that is swapped out, memory that is allocated, but not used, and memory that is from shared libraries. | It includes all memory that the process can access, including memory that is swapped out, memory that is allocated, but not used, and memory that is from shared libraries. | ||
= FAQ = | = FAQ = | ||
Line 48: | Line 49: | ||
smem -r -s swap| head -n3 | smem -r -s swap| head -n3 | ||
== Clear buffer/cache == | |||
sync; echo 3 > /proc/sys/vm/drop_caches |
Revision as of 15:43, 21 February 2022
Links
- Linux ate my RAM!
- How to Clear RAM Memory Cache, Buffer and Swap Space on Linux
- How to interpret output from Linux 'top' command?
- Understanding VM swappiness
- https://serverfault.com/questions/85470/meaning-of-the-buffers-cache-line-in-the-output-of-free
Documentation
man 5 proc
see /proc/meminfo
total
Is MemTotal in proc
total installed memory
used
total - free - buffers - cache
unused
MemFree
RSS
Resident Set Size
RSS and VSZ inLinux memory management
"memory is allocated to that process and is in RAM. It does not include memory that is swapped out. It does include memory from shared libraries as long as the pages from those libraries are actually in memory. It does include all stack and heap memory."
VSZ
Virtual Memory Size It includes all memory that the process can access, including memory that is swapped out, memory that is allocated, but not used, and memory that is from shared libraries.
FAQ
what is using all my swap?
smem -r -s swap| head -n3
Clear buffer/cache
sync; echo 3 > /proc/sys/vm/drop_caches