Question

Poor server performance on capable machine

Hello,

My client’s server has recently started having performance issues. The single website hosted on the server loads very slowly. It is built with WordPress using a custom theme. There are a minimum amount of plugins installed, and none were added in the last few weeks when the performance issues began.

The server has 2 CPUs and 2GB of memory. The server stack is LAMP with Ubuntu 20.04 and PHP FPM. All of the installed software is kept up to date.

Both of the CPUs constantly use more than 80% while running the WordPress site.

The free -m command returns the following: Total 1983, Used 1734, Free 64, Shared 132, Buff/Cache 184, and Available 12.

Rebooting the server temporarily resolves these issues.

Redis Server is installed for object caching. No other caching or optimization plugins are currently installed on the server or in WordPress.

Any suggestions on how to address these issues?

I am novice server administrator, but keen to learn.

Cheers,


Submit an answer


This textbox defaults to using Markdown to format your answer.

You can type !ref in this text area to quickly search our full set of tutorials, documentation & marketplace offerings and insert the link!

Sign In or Sign Up to Answer

These answers are provided by our Community. If you find them useful, show some love by clicking the heart. If you run into issues leave a comment, or add your own answer to help others.

alexdo
Site Moderator
Site Moderator badge
February 22, 2023

Hello @clientsfsc

I will recommend to examine if any of the WordPress plugins are causing the extra resource usage on the droplet. Sometimes a faulty plugin can consume a lot of memory or cause CPU usage spikes.

You can monitor the droplet resource usage using top and other tools. We have a tutorial that covers this process here:

https://www.digitalocean.com/community/tutorials/how-to-use-top-netstat-du-other-tools-to-monitor-server-resources

Regards

Bobby Iliev
Site Moderator
Site Moderator badge
February 21, 2023

Hi there,

It looks like that you are running quite close to the memory and CPU limits. It might be worth adding some extra resources like RAM and CPU to that Droplet.

Other suggestions would also include:

  • Add a swap file to have some extra memory buffer:

https://www.digitalocean.com/community/tutorials/how-to-add-swap-space-on-ubuntu-20-04

  • Add a caching plugin like WP super cache or WP rocket. That way you will reduce the overall load on the server itself
  • Use a CDN like Cloudflare
  • Check what processes exactly are using most of the memory and CPU and possibly try to tweak those services for better performance
  • Use Wordfence to quickly do a scan of your website to verify that there is no malware that could be causing the problem. You can remove the Wordfence plugin after the scan as it tends to slow the website.

Let me know how it goes!

Best,

Bobby

Try DigitalOcean for free

Click below to sign up and get $200 of credit to try our products over 60 days!

Sign up

card icon
Get our biweekly newsletter

Sign up for Infrastructure as a Newsletter.

Sign up
card icon
Hollie's Hub for Good

Working on improving health and education, reducing inequality, and spurring economic growth? We’d like to help.

Learn more
card icon
Become a contributor

You get paid; we donate to tech nonprofits.

Learn more
Welcome to the developer cloud

DigitalOcean makes it simple to launch in the cloud and scale up as you grow – whether you’re running one virtual machine or ten thousand.

Learn more ->
DigitalOcean Cloud Control Panel
Get started for free

Enter your email to get $200 in credit for your first 60 days with DigitalOcean.

New accounts only. By submitting your email you agree to our Privacy Policy.

© 2023 DigitalOcean, LLC.