before i start note this WONT WORK ON A VPS
okay lets start the command is quite simple
many of you will ask what does it do?
simple it clears the ram cache for example here i have it where i did it
please not the numbers under "used" first it says used 7839 then it says used 889
now we dont want to have to do this everytime do we?
so we open up a shell console as root and type
this will open a editor with all cronjobs running as root now we past this in
this will run the command every 10 minutes and your ram stays nice and clean which speeds the server up
have fun
okay lets start the command is quite simple
Code:
echo 3 > /proc/sys/vm/drop_caches
simple it clears the ram cache for example here i have it where i did it
Code:
root@ns1 [~]# free -m total used free shared buffers cached Mem: 7993 7839 154 0 62 6804 -/+ buffers/cache: 971 7021 Swap: 2046 0 2046 root@ns1 [~]# echo 3 > /proc/sys/vm/drop_caches root@ns1 [~]# free -m total used free shared buffers cached Mem: 7993 885 7107 0 2 45 -/+ buffers/cache: 837 7156 Swap: 2046 0 2046 root@ns1 [~]#
now we dont want to have to do this everytime do we?
so we open up a shell console as root and type
Code:
crontab -e
Code:
*/10 * * * * echo 3 > /proc/sys/vm/drop_caches
have fun
Comment