Why increasing CPU Cores isn’t always the answer

When you read WordPress development forums, it seems that developers are fixated on having maximum RAM and CPU power when it comes to powering their websites.

Most of the time, their setup is overkill. Sometimes, it’s justified and required when operating a membership-based website or a WooCommerce website.

However, it appears that most developers do not consider server architecture. When you’re dealing with small to medium businesses, you cannot blame a web developer; budget or education may be the reason since server architecture is reserved for server architects rather than developers.

This article explores why increasing the CPU core processes isn’t always the answer.

WooCommerce Hosting issue

Recently, an existing agency partner of Staq contacted us requesting advice on the best set-up for their client’s WooCommerce website.

The situation was that his involvement was limited to speed optimization as another agency and developer (non-Staq user) was managing and maintaining the WooCommerce website.

The business owner was in a predicament; their server was slow and was frequently going down.

Old Server

Server Configuration

Their server configuration was:

  • 10GB RAM
  • 6x CPU Cores
  • dedicated server

In theory, a powerful server.

WordPress configuration

  • WP Rocket for caching
  • RocketCDN for images in the cloud (it appears that this was not configured correctly)

Traffic

Below is a screenshot from cPanel. Essentially, in the month of March 2022, their site generated over 4m visitors and nearly 500GB of bandwidth:

traffic

Server Requests

Each day, 24,480 (average) successful requests were made to the server. However, a whopping 12,042 requests were failing each day:

web-server-stats

FPM-PHP

CPU usage was spiking to around 95%:

fpm-details

The advice from the developer

The developer who had built the website accurately advised the client and said that the CPU was maxing out.

Their recommendation was to move to Cloudways and select a large plan on either Linode or AWS but select a 20 Core processor for future growth.

It meant that this option was over $1,000 AUD / month for hosting.

The speed optimizer specialist wanted to question that approach and seek advice from Staq.

New Staq Configuration

General

After assessing the server configuration and requirements with the objective of:

  • improving the speed and performance of the server; and
  • improving uptime

we moved them to a dedicated cloud environment and it was a simple migration to get the ball rolling.

Virtual Private Cloud

Staq operates a Virtual Private Cloud and has decoupled services. This means that:

  • the database does not live in the server (Relational Database Services by Amazon Web Services)
  • images, plugins and themes are served via S3 and CloudFront (Amazon Web Services)

That means server requests and CPU usage are significantly lower than traditional server set-up methods.

Staq tools

To reduce bandwidth, Staq applied both its caching and optimizer tool to:

  • reduce image size
  • serve WebP images
  • reduce the overall size of the page

NGINX and MariaDB setup

Out of the box, Staq has optimized its NGINX set-up and has an optimized database environment (powered by MariaDB).

Core CPU Power

The result after this migration process is that the website only requires 2 Core CPUs. Yes, you read that correctly…. only 2 CPU cores. It isn’t how many CPU processes you have; it’s the way you use it 😉

Load Balancer Option

If processes or traffic volume increases at any stage, this website has the load balancer option enabled and it’ll automatically scale out horizontally.

Conclusion

Next time, if someone recommends that you need to increase the amount of CPU core processors or reports showing that the FPM-PHP graph is nearing capacity, contact Staq for a second opinion.

An engineered and well-architectured framework is key to reducing your server costs for the long term.

Sign Up

Consolidate your WordPress experience in one dashboard.

Sign Up Now