By default Linux operating system use more RAM memory for disk cache, because of reading data from cache if more faster than reading data from hard drive, we can clear cached on your system and this is a non-destruction operation,
Check your used cached space with the commands free or top
# free -m
total used free shared buffers cached
Mem: 5816 5371 445 0 246 4413
-/+ buffers/cache: 711 5105
Swap: 4095 0 4095
or
# top -c
Mem: 5956188k total, 5502448k used, 453740k free, 252276k buffers
Swap: 4194296k total, 0k used, 4194296k free, 4519988k cached
To free your cached use this /proc/sys/vm/drop_caches, which can help
free a lot of memory space.
To free your pagecache:
# echo 1 > /proc/sys/vm/drop_caches
To free your dentries and inodes:
# echo 2 > /proc/sys/vm/drop_caches
To free your pagecache, dentries and inodes:
echo 3 > /proc/sys/vm/drop_caches
Now, check your cached and buffers status.
# free -m
total used free shared buffers cached
Mem: 5816 507 5308 0 0 39
-/+ buffers/cache: 467 5349
Swap: 4095 0 4095
Do you want to know RAM is free to use for your applications look on "-/+ buffers/cache" its shows Megabytes: 5349 MB.
-/+ buffers/cache: 467 5349
Comments (0)