Page 1 of 2
Why is CPU usage high and ram usage too low.
Posted: Sat Feb 17, 2018 4:39 am
by vikhyat
OS - CentOS 7
24 GB RAM
6 Cores.
All of my 6 cores are 80-100% used while ram usage reaches a maximum of 4GB. Why is it so?
I want the CPU usage to be low to accommodate more users but it reaches high.
Is there any way to shift the load to RAM from CPU.
It is a KVM VPS.
Here is the screenshot of htop
https://flaunt7.com/Screenshot_2018-02- ... 977944.png
Re: Why is CPU usage high and ram usage too low.
Posted: Sat Feb 17, 2018 9:40 am
by mehargags
Check your hosted sites (especially WordPress) if they are injected with any kind of mining malware... I see these on a rise!!
Suspend your sites one by one and see if the load normalizes after to suspend each website, good way of detecting the culprit user/site
Re: Why is CPU usage high and ram usage too low.
Posted: Sun Feb 18, 2018 6:58 am
by vikhyat
I had personally checked every site and none of them are injected. When the traffic is high only then the CPU usage becomes high.
I think my host is over selling cpu and that's why it happens.
I am with contabo. Do they oversell cpu?
Re: Why is CPU usage high and ram usage too low.
Posted: Sun Feb 18, 2018 9:12 am
by ScIT
Contabo is not overselling cpu, this looks more like a server based problem. did you suspended side by side to check if the load goes down? also i think you should check or disable that user, that comes up several times in you screenshot.
Re: Why is CPU usage high and ram usage too low.
Posted: Sun Feb 18, 2018 2:26 pm
by vikhyat
I did suspend the user with high cpu usage and this happens for all websites. I have been with contabo from over a year and experiencing this from the starting. I have 6 servers with them and all have the same issue.
Re: Why is CPU usage high and ram usage too low.
Posted: Sun Feb 18, 2018 3:23 pm
by ScIT
infact that you run a hosting company and earn money with the server, you should get payed support from vesta team (also to support the project itself). What I see after a second look is that there runs a gzip command, gzip uses normaly high cpu, so is there a backup running? Or any other script that runs gzip?
It seems to be a server problem here that need some investigation, in fact you run multiple servers, you should be able to do the research by your own.
Re: Why is CPU usage high and ram usage too low.
Posted: Sun Feb 18, 2018 6:24 pm
by skamasle
Load average 2.2
Not bad for 6 cores but maybe you have poor cpu asignamed
run
cat /proc/cpuinfo
So not is the same 6 cores 3 ghz or 6 cores 700mhz
Check it
Re: Why is CPU usage high and ram usage too low.
Posted: Sun Feb 18, 2018 10:50 pm
by tjebbeke
with the 'top' command you can check which processes are using your CPU and memory the most. Maybe you can see their some processes that you do not need to run. Or maybe you can find a process that has a problem that causes the cpu/memory issues.
Re: Why is CPU usage high and ram usage too low.
Posted: Mon Feb 19, 2018 12:41 pm
by vikhyat
I think gzip is the one causing the trouble. The load has decreased by 50% after disabling it.
Re: Why is CPU usage high and ram usage too low.
Posted: Mon Feb 19, 2018 1:05 pm
by vikhyat
I will be buying paid support too this week to let vesta team look into the issue.