Skip to main content

High RAM usage

Comments

8 comments

  • cPanelMichael
    Hello, You may also find some of the troubleshooting steps on the following thread helpful when investigating high CPU or memory usage: Troubleshooting high server loads on Linux servers Thank you.
    0
  • GoWilkes
    Thanks, Michael :-) I went through the thread, but most of it was geared toward a high CPU load, not RAM. I installed the monitor.sh script (for which I had to use dos2unix, fwiw), but the results didn't tell me a whole lot:
    1 minute load avg: 0 Swap used: 193180 kB Mem used: 3728488 kB packets received (2 secs): 459 packets sent (2 secs): 235
    So you can see that, at almost 11pm, I'm using 3.7G of my 4.0G of RAM, but that doesn't get me any closer to finding out why. Using top c, then sorting by M (that's a capital, not a lowercase... took me a hot minute to figure THAT out), ClamAV was the highest user at 12.0%. MySQL was next in line at 7.9%, then at 3.2%:
    /usr/lib/jvm/jre-1.8.0/bin/java -server -Xms512m -Xmx512m -XX:NewRatio=3 -XX:SurvivorRatio=4 -XX:TargetSurvivorRatio 2
    "named" and "cpsrvd" are next, then I have a lot of httpd processes showing around 19m under RES. I turned off ClamAV for testing purposes (before running monitor.sh) and RAM went down from around 4.5G to just under 4G, but that's all. I can't turn off MySQL since all of my sites use it, and I have no clue what XX:SurvivorRatio is. The tuning I did to sysctl.conf and my.cnf last night seemed to have no real impact, as today's load was just as high as the day before. I just now changed Server Limit from 400 to 150, Max Clients from 300 to 100, Max Requests Per Child from 0 (unlimited?) to 10000, and Timeout from 120 to 60. This seemed to have no impact at all, though; my RAM usage is still at 3.70G, even with ClamAV turned off. I'm not sure whether I need to be tweaking MySQL, or if maybe the number of httpd processes is the problem? The monitor.sh email showed 100 of those processes, and at 19m of RES each that's about 2G of RAM, isn't it?
    0
  • cPanelMichael
    Hello, The following thread will help you to tune your MySQL configuration to see if that makes a difference: [Case # 90317] - Warning on using mysqltuner and MySQL 5.6! However, you should also note the information on the following post regarding high memory usage, as it's not always a bad thing: Memory usage apparently higher than expected Thank you.
    0
  • GoWilkes
    Softlayer mentioned that Java has a very large Virtual Size on the server, close to 3GB. None of my sites intentionally use Java; I built them all, and I know that I don't code in Java. Is there any reason for it to be running, then? If not, how do I turn it off? Or at least modify the settings to minimize it? It's also notable that ClamAV seems to be taking up a lot of RAM for no reason. I had turned off the option to scan anything, but had left it installed. I just now uninstalled it, and RAM usage dropped from 5G to 3.5G.
    0
  • Anoop P Alias
    the Java process should be Solr used for full-text search in IMAP. it came with new CPanel version which might explain why you see an increase in ram recently and yes java is notorious for RAM requirement
    0
  • GoWilkes
    Thanks, Anoop, that was definitely the culprit!!! I uninstalled it, and immediately my RAM load dropped by 1.5G!
    0
  • jonnyydeoliveira
    How you uninstalled solr ?
    0
  • Infopro
    Have a look here: WebHost Manager "cPanel "Manage Plugins Documentation for this area is here: Manage Plugins - Version 64 Documentation - cPanel Documentation
    0

Please sign in to leave a comment.