Clear the memory cache in Linux By T4L | February 20, 2009 10 Comments In Linux, you can clear the cache of the memory by using sync; echo 3 > /proc/sys/vm/drop_caches
failzo January 9, 2010 How to do that with Ubuntu? I tried it with sudo, but it keeps saying Permission is needed. faizlo Reply ↓
GCXX May 12, 2011 just want to thanks to Tarentrulle sudo sh -c “sync; echo 3 > /proc/sys/vm/drop_caches” saved my life! Reply ↓
vga over cat5 September 26, 2011 I have test and working successfully on debian6. But I wonder if its a good habit to use on a daily cron on my vps has limited memory on it. My vps has 512mb memory so I wonder does this function help to use my memory efficiently. What do you think about it ? Reply ↓
Lars R. December 30, 2011 @vga over cat5: It is completely useless to flush the block cache on Linux. The Kernel wipes unecessary entries as soon as it needs memory for other purposes. Until them the chaces are kept. Unused RAM is just useless. Reply ↓
Nnitesh February 21, 2012 Thanks a tonn sir, sync; echo 3 > /proc/sys/vm/drop_caches This command helped me a lot. Cleared cached memory from 2GB to 500mb.. Excellent. Thanks Reply ↓
xibjulous February 26, 2012 ok this made no sense at all for me what do i type it into a word document or what?? Reply ↓
Pingback: Clear memory cache to speed up your box « Linux & Stuff
How to do that with Ubuntu? I tried it with sudo, but it keeps saying Permission is needed.
faizlo
log on to root and try the command
or try
sudo sh -c "sync; echo 3 > /proc/sys/vm/drop_caches"
Just wanted to say thanks been trying to do that all morning.
just want to thanks to Tarentrulle
sudo sh -c “sync; echo 3 > /proc/sys/vm/drop_caches”
saved my life!
I have test and working successfully on debian6. But I wonder if its a good habit to use on a daily cron on my vps has limited memory on it.
My vps has 512mb memory so I wonder does this function help to use my memory efficiently.
What do you think about it ?
@vga over cat5: It is completely useless to flush the block cache on Linux.
The Kernel wipes unecessary entries as soon as it needs memory for other purposes. Until them the chaces are kept. Unused RAM is just useless.
Thanks a tonn sir, sync; echo 3 > /proc/sys/vm/drop_caches
This command helped me a lot.
Cleared cached memory from 2GB to 500mb.. Excellent.
Thanks
ok this made no sense at all for me what do i type it into a word document or what??