This question already has an answer here:
- Why drop caches in Linux? 11 answers
I have a Linux server containing the os version below:
I want to restart it in every 2 days, please help me, I want to do it via crontab.
I used a code below to drop my memory caches in every hour.
0 * * * * /root/clearcache.sh #!/bin/sh sync; echo 3 > /proc/sys/vm/drop_caches
But 1st 15 in every hour my server remain so slow after cleaning the caches. My sites do not load during every hour in 1st 15 minutes.
In another way if I restart my server then also caches are removed. So I decided to restart my server in every 2 days to drop my caches.
Will it be helpful to restart? Or is there any other way to drop my memory caches that will not down my server?