CPU, Memory and Swap memory high on server

OS type and version Ubuntu Linux 20.04.4
Webmin version 1.991
Virtualmin version 7.0-4
Processor Info AMD EPYC 7501 32-Core Processor, 2 cores
Ram 4GB

Good Day

My CPU, Real and Swap Memory is high on my server and I only have one site on it. It shuts off MySQL database. I have to reboot the server in order to turn on MySQL database, then the server goes high again minutes later.

Right now MySQL is off however the CPU, Real and Virtual Memories are high.


See Server 100% CPU, please help - #2 by calport

You need to provide more information about what you’re running on this server.

What have you installed or are running on this server?

Any web sites? if so:
WordPress? If so, please provide a copy of the Site Health report from wp-admin.
Please also disable all plugins and delete any unused themes as themes will use resources even if not active. Some themes are also very badly coded which causes resource problems during load.
Are you using any caching plugins for your site?

Please also monitor using top or htop (you can install htop using apt) and sort by CPU usage, screenshot and upload and we can begin to look at what might be causing high load.

4 GB is an ok amount of RAM if you are only running a small web site. However once you start to add email, databases, web sites, and any other software you might have added, it can quickly become a resource issue causing processes to stall, excessively swap to disk or even die. This is not a Virtualmin limitation, rather a simple limitation of any OS running several ‘chunky’ services (DB, web and email are a great example).

Good Day @calport and @chriswoods

Thank you for the response and thread shared. I’m running one wordpress site that uses lightspeed cache, paid membership pro and mycred plugins on it. This is not my first server as I have multiple that run scripts, wordpress sites and multi-sites.

Both those servers at 4 to 8 GB equivalent and are running fine. This site however, is exhausting the server resources so I moved it on its own Virtualmin server. Making it easier to see if it was the site or the server, and of course it was the site.

I’ve used this theme and lightspeed cache multiple times before on my other servers and its good. With the thread shared I now know what to do on my side. If theirs any tips on how to optimise mycred, paid membership pro plugins, I would be gladly appreciated.

Here are more info on the site:

| WordPress Version | 5+ |
| Theme | Phlox Child |
| Multi Site | No |

I have perused your message and have understood the reason you have moved that one WordPress site to its own server.

The top (and atop) commands will tell you a lot about how the resources of your server are being used in real-time for the troublesome site that you have moved. I wished to point this out by providing the link to an earlier discussion elsewhere on this forum - see my previous message.

I do not specialise in WordPress hosting and therefore do not have any experience with or interest in WordPress plugins or their optimal configuration.

I do know that a server of modest specs. can be used to host hundreds of WordPress websites because I have had to set up such a server for a computer training institute in my city. I used Virtualmin, naturally, and the top command to monitor usage so that a few tweaks to PHP-FPM could be applied to support WordPress plugins such as Elementor which demand resources. After applying these tweaks, a modest Virtualmin server was able to support hundreds of WordPress websites - one each for every student of the training institute - and simultaneous access by upto 40 students during the time their classes were being conducted.

In summary, it is the top comment which will indicate what you need to tweak. You should start there.

If you’re using any execution mode other than PHP-FPM, you’re probably using more memory than is necessary. And, if mod_php is enabled (even if not being used) it will consume a lot of memory…it makes the Apache process itself much larger.

1 Like

This topic was automatically closed 60 days after the last reply. New replies are no longer allowed.