Sometimes, you can see that memory is not correctly released once used and some caching can remain.
You can see that by using the free command:
1 2 3 4 5 |
# free -m total used free shared buffers cached Mem: 64458 53397 11060 0 1550 49163 -/+ buffers/cache: 2683 61774 Swap: 9998 35 9963 |
At this time, you can so free this cache and release memory by using this command:
1 |
# sync; echo 3 > /proc/sys/vm/drop_caches |
Now, you can check again:
1 2 3 4 5 |
# free -m total used free shared buffers cached Mem: 64458 1162 63295 0 1 32 -/+ buffers/cache: 1128 63329 Swap: 9998 35 9963 |
The memory has correctly been released and the cache is almost empty!