When you have 16 gigabyte RAM and you run top you might be surprised:
Tasks: 167 total, 2 running, 164 sleeping, 0 stopped, 1 zombie Cpu(s): 0.9%us, 0.5%sy, 0.0%ni, 98.6%id, 0.0%wa, 0.0%hi, 0.0%si, 0.0%st Mem: 16333884k total, 1722432k used, 14611452k free, 163984k buffers Swap: 16675836k total, 0k used, 16675836k free, 697196k cached PID USER PR NI VIRT RES SHR S %CPU %MEM TIME+ COMMAND 1198 root 20 0 143m 16m 7836 S 5 0.1 0:21.80 Xorg 2150 maurits 20 0 1039m 324m 44m S 3 2.0 0:54.05 firefox
Just booted and already 1.7 gigabyte of RAM used. Oh no, Linux ate my ram!
maurits@nuc:~$ free -m total used free shared buffers cached Mem: 15951 1657 14293 0 160 655 -/+ buffers/cache: 841 15109 Swap: 16284 0 16284 maurits@nuc:~$
But is is actually not so bad. Using the “free” command we see that only 841 megabytes are used. Others are used for buffers. Fortunately “htop” also shows the correct RAM usage number:
So, just remember that free RAM may actually be used for buffers to optimize operating system I/O. These buffers are immediately discarded when more RAM is needed by applications and they should therefore be considered free.
excellent, superb, perfect