Please whitelist cPanel in your adblocker so that you’re able to see our version release promotions, thanks!

The Community Forums

Interact with an entire community of cPanel & WHM users!
  1. This site uses cookies. By continuing to use this site, you are agreeing to our use of cookies. Learn More.

High CPU at every xx:55 (every hour)

Discussion in 'General Discussion' started by thanasis, Jan 24, 2018.

  1. thanasis

    thanasis Active Member

    Joined:
    Nov 24, 2017
    Messages:
    37
    Likes Received:
    1
    Trophy Points:
    8
    Location:
    Greece
    cPanel Access Level:
    Root Administrator
    Hello, i noticed that every hour and especially at xx:55 , my vps server cpu goes at limit for 2 minutes and then goes down...
    Im using htop command but i didn't see any high cpu or memory process...
    Any idea ?

    Here are some screeenshots
     

    Attached Files:

    #1 thanasis, Jan 24, 2018
    Last edited by a moderator: Jan 24, 2018
  2. thanasis

    thanasis Active Member

    Joined:
    Nov 24, 2017
    Messages:
    37
    Likes Received:
    1
    Trophy Points:
    8
    Location:
    Greece
    cPanel Access Level:
    Root Administrator
    I found the problem!
    At the /var/log/cron there is a command "sync; echo 3 > /proc/sys/vm/drop_caches" which cause the problem.
    I see this command every xx:55
    Shall this command execute every hour?
    How can i change the cronjob of this command ?
     
    #2 thanasis, Jan 24, 2018
    Last edited: Jan 24, 2018
  3. cPanelMichael

    cPanelMichael Forums Analyst
    Staff Member

    Joined:
    Apr 11, 2011
    Messages:
    42,734
    Likes Received:
    1,706
    Trophy Points:
    363
    cPanel Access Level:
    Root Administrator
    Hello,

    That looks like a custom cron job. If you did not add it, I recommend contacting your VPS hosting provider so they can confirm it's purpose and if they recommend removing it.

    Thank you.
     
  4. thanasis

    thanasis Active Member

    Joined:
    Nov 24, 2017
    Messages:
    37
    Likes Received:
    1
    Trophy Points:
    8
    Location:
    Greece
    cPanel Access Level:
    Root Administrator
    Can i change myself ?
    How can i find this cronjob (at this file) ?
     

    Attached Files:

  5. cPanelMichael

    cPanelMichael Forums Analyst
    Staff Member

    Joined:
    Apr 11, 2011
    Messages:
    42,734
    Likes Received:
    1,706
    Trophy Points:
    363
    cPanel Access Level:
    Root Administrator
    Hello,

    Check to see if it exists within a script in the /etc/cron.hourly/ directory. It's not a required command, but you may want to consult with your VPS hosting provider, as they may have added it for a reason.

    Thank you.
     
  6. thanasis

    thanasis Active Member

    Joined:
    Nov 24, 2017
    Messages:
    37
    Likes Received:
    1
    Trophy Points:
    8
    Location:
    Greece
    cPanel Access Level:
    Root Administrator
    Hello, they suggest me to chhange the "echo 3 > ..." line to "echo 1 > .." in order to only free the page cache instead of also freeing dentries and inodes.

    I found this:
    To free pagecache:
    echo 1 > /proc/sys/vm/drop_caches
    To free dentries and inodes:
    echo 2 > /proc/sys/vm/drop_caches
    To free pagecache, dentries and inodes:
    echo 3 > /proc/sys/vm/drop_caches


    Before i removed the "echo 3 > ..." i checked my RAM. It had:
    30717040 total, 25244176 free, 2631884 used, 2840980 buff/cache

    After 5 hours i have (i had removed "echo 3 > ...") :
    30717040 total, 21581380 free, 2164572 used, 6989240 buff/cache

    Am I OK, What do you suggest?
     
  7. thanasis

    thanasis Active Member

    Joined:
    Nov 24, 2017
    Messages:
    37
    Likes Received:
    1
    Trophy Points:
    8
    Location:
    Greece
    cPanel Access Level:
    Root Administrator
    After a couple of hours....

    KiB Mem : 30717040 total, 244400 free, 2790844 used, 27681796 buff/cache

    What do you think?
    Shall i have to set again the "echo 3 > ..." or "echo 1 > ..." or im OK with these ?
     
  8. cPanelMichael

    cPanelMichael Forums Analyst
    Staff Member

    Joined:
    Apr 11, 2011
    Messages:
    42,734
    Likes Received:
    1,706
    Trophy Points:
    363
    cPanel Access Level:
    Root Administrator
    Hello,

    It's difficult to know for sure what the results of the change will be, as it depends on your existing hardware and resource usage. I recommend checking with your provider for more information about their recommended change.

    Thank you.
     
Loading...

Share This Page