User Tools

Site Tools


doc:appunti:linux:sa:linux_virtual_memory

This is an old revision of the document!


Linux Virtual Memory

vmstat -s
cat /proc/meminfo

Oltre all'ovvio MemFree, è forse più importante il valore di MemAvailable. Il primo valore infatti tenderà normalmente ad avvicinarsi allo zero: tutta la RAM verrà infatti utilizzata ad esempio per il caching delle pagine lette da disco. Tale memoria in genere non viene rilasciata se non quando serve per altri scopi. Per diagnosticare problemi di Out of Memory Killer è più importante il valore di MemAvailable, poiché esso contiene una stima di quanta memoria è disponibile per avviare nuovi processi.

Un parametro da tenere sotto osservazione è la memoria Active (composta da Active(anon) e Active(file)). In generale questo parametro dovrebbe rimanere costante nel tempo e non dovrebbe presentare un grafico a scalini crescenti.

MemFree The amount of physical RAM, in kibibytes, left unused by the system.
MemAvailable An estimate of how much memory is available for starting new applications, without swapping.
Active The amount of memory, in kibibytes, that has been used more recently and is usually not reclaimed unless absolutely necessary.
Active(anon) The amount of anonymous and tmpfs/shmem memory, in kibibytes, that is in active use, or was in active use since the last time the system moved something to swap.
Active(file) The amount of file cache memory, in kibibytes, that is in active use, or was in active use since the last time the system reclaimed memory.

Web References

doc/appunti/linux/sa/linux_virtual_memory.1702894866.txt.gz · Last modified: 2023/12/18 11:21 by niccolo