Community Forums
Connect with us on LinkedIn
Community Notice
+ Reply to Thread
Results 1 to 2 of 2
  1. #1
    Registered User
    Join Date
    Jan 2010
    Posts
    3

    Default Cache was eating up my free ram causing scripts not to run, this was my fix

    I created a clear_disk_cache.sh script and had the following in it

    Code:
    sync; echo 3 > /proc/sys/vm/drop_caches
    Then manually put it in the root's cron job at /var/spool/cron/root to run every 10 minutes, I experimented with a few other values and found the 10 minute cron job was a good time.

    Now my system runs with 150-256mb physical ram free at any given moment giving enough memory to scripts and other memory intensive services that need it more than cache. Before I did this, I would often have 12-25 MB of free physical ram which caused a whole bunch of issues.

    Let me know if any body else has results from this as well.

    Original credits to Linux: How To Clear The Cache From Memory

  2. #2
    Member ModServ's Avatar
    Join Date
    Oct 2006
    Location
    Egypt
    Posts
    225
    cPanel/Enkompass Access Level

    Root Administrator

    Default

    When I do that, It makes the server that has just been rebooted and suffer from high load as the visitors start to work on those sites again, Just like apache restart but after some minutes the load becomes normal again. I think that if you restart httpd and mysql you will get results near from drop caches.

    ModServ for Hosting & Web Services Solutions
    URL: http://www.modserv.com.eg

Similar Threads & Tags
Similar threads

  1. YUM Cache causing full /var issues.
    By theBassTender in forum cPanel and WHM Discussions
    Replies: 1
    Last Post: 04-03-2008, 11:31 AM
  2. Http process won't die off and eating up cpu & ram.
    By gundamz in forum cPanel and WHM Discussions
    Replies: 3
    Last Post: 03-02-2008, 11:32 PM
  3. Forced Update Eating up Ram + crashed cPanel.
    By Annex in forum cPanel and WHM Discussions
    Replies: 5
    Last Post: 10-12-2007, 04:56 PM
  4. MySql Eating up ram/swap
    By FluKex in forum cPanel and WHM Discussions
    Replies: 1
    Last Post: 06-09-2006, 10:32 AM
  5. How do I enable MySQL query cache ? Does this use more RAM?
    By BianchiDude in forum cPanel and WHM Discussions
    Replies: 2
    Last Post: 07-20-2005, 01:42 PM
Linkedin       Facebook       Twitter       RSS       Flickr       YouTube