thanasis

Well-Known Member
Nov 24, 2017
73
4
8
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
 

Attachments

Last edited by a moderator:

thanasis

Well-Known Member
Nov 24, 2017
73
4
8
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 ?
 
Last edited:

cPanelMichael

Administrator
Staff member
Apr 11, 2011
47,910
2,213
363
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.
 

cPanelMichael

Administrator
Staff member
Apr 11, 2011
47,910
2,213
363
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.
 

thanasis

Well-Known Member
Nov 24, 2017
73
4
8
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?
 

thanasis

Well-Known Member
Nov 24, 2017
73
4
8
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 ?
 

cPanelMichael

Administrator
Staff member
Apr 11, 2011
47,910
2,213
363
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.