Server 100% CPU, please help

SYSTEM INFORMATION
OS type and version Ubuntu 20.4
Webmin version Latest
Virtualmin version Latest
![image 375x500](upload://m6Rr53QPBHAx3NMo5bbMGrolOgT.jpeg)

I am using 2 wordpress on vertualmin
Digital ocean droplet

What does the top command show? On the command line interface, type

top

TERM environment variable not set

You’ll have to run the top command outside Virtualmin, via terminal. Install putty if you use Windows

Okay in putty

My old eyes are unable to read the hazy info on the top but from the rest of the screenshot it seems that the CPU load is now under control.

The next time cpu hits 100%, take a screenshot and then perhaps we will know what is chewing up your CPU cycles.

1 Like

Yes sir i checked cpu is 2% thankyou
Yes i will

don’t you have a screenshot software? windows has it inbuilt, alot easier then using a camera.

Steve

1 Like

The next time this happens it could be PHP that’s consuming the CPU. In this case, look under which user name it’s running and you’ll know which site.
Next, check the apache access and error logs.

More often than otherwise, the site could be under attack, dictionary attack or a bot looking for vulnerabilities. Also it’s possible the site is being crawled by some aggressive search engine.

100% CPU

After 30 second suddenly return to 3%

Root. Apt check
Root untended upgr showing

That’s fine if there is a valid reason for CPU being used by a process at 100%. You need to use the top command and take a screenshot when CPU is at 100% or install and use the atop command to let you view historical CPU usage.

See ATOP for Linux server performance analysis (Guide)

Yes sir at this time cpu is 100%

Er, not quite. You have given me a screenshot of the output of the top command while the Virtualmin dashboard was showing 100% CPU usage.

Again, you must either take a screenshot of the output of the top command at the exact moment that CPU hits 100 (find and monitor %Cpu(s) in sceenshot) or use the atop command to parse logs.

While the Virtualmin dashboard may show CPU usage in near real-time (it can hit 100% momentarily quite frequently on low resource VPSs which have one or two vCPUs), your 1 minute, 5 minute and 15 minute load averages are within acceptable parameters in the screenshot. Yours is not a system which is stuck at 100% CPU usage all the time, which is something that does happen on some systems.

1 Like

@Neeraj none of the screens above show the output that we need.

If you follow @calport advice, it will give us some idea what is periodically spiking your CPU.

If you do the above, we can easier identify/assist what is going on. Do a print screen if necessary to quickly take a screenshot, if you don’t have a utility or built in software to do so.

1 Like

Yup

Also:
You can try to install HTOP and look there on SSH , is easyer than Top and some more options

WordPress consumes a lot of resources, it can also come from there if you have peak users / Internet users :+1:

What size droplet do you have?
I would recommend a droplet with a minimum of 8gb of ram.

The increase to 100% usage most likely is related to loading the virtualmin GUI.

That’s a wild guess that @GabeRmz has hazarded.

8GB RAM minimum. Really? :roll_eyes:

1 Like

Why do you assume it is a wild guess?

Because you do not have all the information that is required to address the issue being experienced by @Neeraj; none of us do.

Only when Neeraj provides more info about output of the top command for example, will anybody be able to say for sure why the CPU hits 100%. Till such a time any answer is a guess.

The best that we can do is ask questions and help Neeraj post more information about the issue.

That’s why I am able to assume, with a reasonable degree of certainty, that in the absence of the required information, your recommendation is a wild guess. The second-easiest uninformed recommendation that anyone can make is to throw more RAM and CPUs at a problem in the hope that it will go away.

1 Like