No announcement yet.

How to flush the RAM memory cache on a Linux server??


Unconfigured Ad Widget

  • Filter
  • Time
  • Show
Clear All
new posts

  • How to flush the RAM memory cache on a Linux server??


    I want to flush the RAM memory cache on my Linux server to improve the server's performance. Can someone assist me with how to flush the memory cache?

  • #2
    AccuWeb Hosting 20th Anniversary Sale

    Hello Rachel S,

    The RAM is a vital part of the server. Unfortunately, RAM memory is often blocked in the cache; therefore, the server loads slowly and does not respond to the new processes because RAM memory isn't available for the new processes.

    However, to resolve the RAM memory cache issue, you can set the Cron Jobs to reset the RAM memory cache after every 30 minutes by following the ways below,
    • Firstly, log in to the server as a root user.
    • Then, create new file /root/ in your editor and add the following to the file,
    echo 1 > /proc/sys/vm/drop_caches
    [email protected] [~]# cat /root/
    echo 1 > /proc/sys/vm/drop_caches
    • Now, Set the 755 permission to /root/ file
    • Lastly, add the Cron under the server's main crontab file by the following command,
    */30 * * * * sh /root/;
    Thus, by following the above methods, Cron the /root/ will run once every 30 minutes and clear the RAM memory cache.

    Rex Maughan



    Sign up for a News Letter Click here to sign up