How CPU Cores Affect VPS Performance

Why is VPS hosting such an excellent solution for websites and apps of all shapes and sizes?

For starters, it holds many advantages over other types of hosting, but perhaps its biggest perk is that it can provide you with the right performance at the right price.

However, it’ll only do it if you pack the needed specs.

If you go for a virtual server that is not powerful enough, it will be like trying to win a NASCAR race in your dad’s old station wagon. And getting a VPS with more resources than you need is like going to the shop in a drag race car.

Finding the right balance could be tricky. To do it, you must know how your virtual server components work, what they do, and how they affect your website speed.

Today, we’ll focus on the CPU cores powering your VPS.

What Is a CPU Core?

A web hosting server, be it a physical or a virtual one, is not too dissimilar to the computer you use at home or in the office. There’s no graphical processing unit letting you play games or watch videos on it, but apart from that, the key components are pretty much the same. SSD devices store data, and random access memory is critical for the smooth operation of the software running on the server. Of course, there’s the CPU.

As many of you know, CPU stands for central processing unit. It’s often referred to as the brain of any computer, and in basic terms, its job is to execute instructions, perform calculations, and process data.

The technology behind modern CPUs began its development with the introduction of commercially available microprocessors in the 1970s and 1980s. Since then, the technology has gone through a few leaps and bounds, and one of the most significant was the invention of multi-core architecture.

In basic terms, hardware vendors figured out how to implement more than one processing unit on a single integrated circuit. These units are called cores, performing the same calculations and executing the same instructions as traditional CPUs. However, because you have more than one of them, you automatically increase the volume of work that can be handled at the same time.

All cores on the integrated circuit have access to the processor’s cache memory, and a control unit coordinates the execution of instructions and distributes the workload for maximum efficiency.

The multi-core model has transformed the way modern CPUs work. Even the smartphone in your pocket likely has between four and eight cores, making it blisteringly quick and excellent at multitasking.

But how do CPU cores work in the context of web hosting?

Processing Power And Web Hosting

On the face of it, every core you add to a CPU gives you additional processing power. And many of you will rightfully assume that more processing power equals faster loading speeds.

It would’ve been great if things were that simple, but unfortunately, they’re not.

First, you need to shed some light on the CPU’s role in loading a website. Every web page a user sees consists of both static and dynamic data. The static portion of the page includes images and media files, CSS stylesheets, JavaScript files designed to be executed in the browser, etc. The information you find in the cache is often static, as well.

Delivering that data requires minimum interaction from the CPU. The requested resources are ready to go. All the web server needs to do is retrieve them – no calculations need to be performed, and no data needs to be generated or processed. This is why you automatically reduce CPU usage when implementing a caching solution on your website.

It’s also why it’s so important to correctly diagnose performance issues before you try to fix them. If your website takes ages to load because your images weigh in at a few megabytes each, upgrading the CPU won’t do much.

Where it can help is with the processing of dynamic data. In addition to the static elements and cached data, your server also needs to run database queries, execute scripts, and generate data that is either time-sensitive or unique for each visitor. These tasks are all CPU-intensive, so the speed at which they’re completed depends heavily on your processor strength.

Yet again, however, it’s a bit more complex than piling on cores and expecting brilliant results.

There are two types of computer processing:

Single-threaded processing

Single-threaded processing forms a queue of commands and instructions that are executed one by one. All this is contained in a single process, making the operation simpler and easier to debug. The CPU doesn’t need to switch contexts, either, so the overhead is smaller.

On the flip side, you have a single thread, and if a particularly tricky computation task slows it down, it could bring the entire process to a halt. And if it’s blocked for whatever reason, it will stall the whole process.

Multi-thread processing

In a multi-thread environment, you have more than one thread inside a single process. Multiple instructions can be executed simultaneously, making this a more efficient way of using the processor’s resources. The multi-threaded approach keeps the CPU busy while waiting for other operations to complete. There isn’t a queue of instructions, so tasks requiring a lot of processing power can be boosted significantly.

The downside is that the multi-thread model is more complex to design and synchronize. If it’s not done correctly, the potential performance gains from running multiple threads inside a single process could be diminished.

For software applications using single-thread processing, CPU speed is more important than the number of cores. Conversely, multi-thread processing apps can distribute the instructions among different cores and have them executed more quickly. For such platforms, the additional cores have a more significant impact.

But what sort of processing does your website need?

In all likelihood, it’s both. Modern websites run on top of a stack of software applications and platforms, some of which use single-thread and some – multi-thread processing. For example, WordPress is written in PHP, which tends to rely mainly on the single-thread model. At the same time, popular web servers like Apache handle visitor requests in multiple threads. In other words, a good processor on a web hosting server is quick and has more than one core.

In reality, CPU speed is rarely a problem when it comes to web hosting. For example, WordPress only needs 1GHz to run, whereas modern web hosting servers run at close to or more than 3GHz. Even if you add plenty of plugins, your need for processing power is unlikely to go that far.

However, as the project picks up traffic and popularity, you will almost certainly need to add more cores and adapt the hosting environment to meet the extra demand.

CPU Cores In a VPS Environment

When choosing your virtual server, you get to pick a hardware configuration, which includes RAM, storage space, and one or more CPU cores. If your site needs more processing power – all you need to do is add more cores.

But how do these cores work exactly?

A modern server processor can have dozens of CPU cores on the same chip. Cloud hosting providers use clusters of servers interconnected and configured to work together, giving them a pool of hundreds or potentially thousands of physical cores. Still, these physical cores are not the same as the ones in your VPS.

Your hosting provider uses virtualization technology to distribute the hardware resources among virtual machines, providing a fully isolated environment, reliable performance, and high levels of security. 

Is that a bad thing?

Not really. Server processors are immensely powerful, so even a single physical core will likely be too much for your project. The virtualization layer allows hosts to give users the processing power they need while keeping the unwanted overhead to a minimum. This is why VPS hosting solutions are considered by far the most cost-efficient.

What’s more, the premise of VPS hosting is that users get a flexible, easily scalable environment suitable for websites of all shapes and sizes. The best way to ensure that’s the case is by allowing users to customize their configurations, upgrading and downgrading them when they need to.

Your virtual machine’s CPU cores may not be fully-fledged physical processing units, but they work exactly the same way. Modern hypervisors efficiently emulate how processors distribute instructions among individual cores to extract the maximum performance from the available resources.

Choosing The Right CPU Configuration And Monitoring CPU Usage

Determining how many CPU cores you need for your brand-new VPS can be challenging. VPS hosting providers can make a rough estimation based on the number of monthly visits. Still, there are far too many other variables, like the software your website uses, the plugins you’ve installed, and the optimization techniques you’ve implemented.

The good news is, since you are using a VPS, picking the wrong configuration isn’t the end of the world. The effects on the performance should be immediately visible, so if you see that your website is slow – this would be a clear sign that something is not quite right.

The thing is, basing your entire scaling strategy purely on how quickly your site appears on your screen is a bad idea, especially when you have a range of tools showing you exactly how you utilize your server resources. Some are part of the web hosting control panel your account works with, and some are embedded into the operating system. Learn how to make the most of them, and you’ll be able to identify bottlenecks and potential performance issues before the effects on the loading speeds become visible.

Let’s start with the features embedded in server management platforms.

cPanel

The Resource Usage tool is located on cPanel’s homepage and is about as straightforward as they come.

There is a graph detailing how much load your CPU has been under for the last seven days and additional information on how other components are doing. Stats are also available in the Server Information section, accessible via the sidebar on the right.

The page is full of data relevant to the individual components and services running on the VPS, as well as their health status.

SPanel

SPanel is ScalaHosting’s proprietary server management system. We’ve been working on it for quite a while now, and throughout the years, our goal has been to create a tool that will help users with every single aspect of the development and smooth running of their projects.

This obviously includes resource usage, which is why, at the very top of the Admin Interface homepage, you have two graphs detailing how much RAM and storage is used at any given time, as well as a third one telling you the overall server load.

If you click Server Status, you can get more detailed information on the services and their current status.

Checking that data from time to time could be immensely helpful, as it’s a graphic representation of how your website growth affects your server. You’ll know when you’re nearing the limits of your VPS, and you can upgrade before the performance deteriorates.

However, we wanted to make sure we can go one better than this, so SPanel now offers a unique feature that monitors CPU usage and alerts you if it gets too high. This gives you an even better chance of taking the appropriate actions and securing the resources you need before it’s too late.

Through the command line

If you prefer to use the command line, you can view your server’s CPU usage through the htop process viewer. You can open it by entering the htop command in an active SSH shell. It gives you accurate real-time information on all your CPU cores and how much load they’re under at any given time. Below them, you can see your memory and swap usage, and under that, you have a list of running processes along with how much power they’re consuming.

ScalaHosting and Scalable VPS Services

ScalaHosting’s plan is to provide reliable services to customers of all shapes and sizes, which is more than evident from our VPS plans.

The most budget-friendly solution we have on offer is the Entry Cloud plan. With it, you get a fully managed virtual server with 2 CPU cores and 2GB of RAM. It’s the perfect solution for people who are stuck with a shared plan and want to try something more powerful.

For a price just marginally higher than that of a shared package, you’ll benefit from a fully isolated environment, a dedicated IP, and guaranteed system resources. You’ll see first-hand just how much all these affect your site performance and security.

By default, entry cloud VPS solutions are deployed with 50GB of storage, but if you need more – you can upgrade with a couple of clicks. Additional processing power and memory are available on our premium virtual server plans. There are four preset VPS builds to choose from, but because our virtual servers are deployed on state-of-the-art cloud infrastructure, you’re not bound to a fixed configuration.

Our system allows you to adjust the number of CPU cores, the memory, and the storage space according to your specific requirements. It can even automatically suggest a configuration based on your monthly traffic.

As your site evolves, you can upgrade your server to meet the increasing demands. You can have up to 24 CPU cores, 128GB of RAM, and 2000GB of storage, so you’re unlikely to exceed the limits of our VPS service. And even if you do – we have managed cluster hosting plans that present a great environment to even the highest-traffic websites.

Not sure which solution is the best fit for your business?

Do not hesitate to contact our sales specialists, who can give you all the options and help you pick the right one.

Conclusion

The race to provide the most flexible solution possible has defined the web hosting industry over the last few decades. Websites and their requirements are too diverse nowadays, and hosts must be very good at adapting their services if they are to stay afloat. The multi-core processor, alongside the ever-advancing cloud technology, has greatly helped hosting providers in that respect.

Vendors can now transform VPS hosting from a midway point between shared packages and dedicated servers into an all-in-one solution suitable for anything from a small blog to a large online store. All you need to do to take full advantage of it is to pick the right configuration for your project.

FAQ

Q: What is a CPU core in a VPS?

A: A physical CPU core is a processing unit designed to read and perform instructions. When a hypervisor creates a virtual server, it splits a physical core into several virtual ones. The functionality of the hardware processor is fully emulated in the virtual environment, meaning your VPS cores perform exactly the same tasks as real-world ones.

Q: How do I fix a slow VPS?

A: Your first job is to diagnose the performance issue. Slow loading speeds could be caused by anything from the server’s geographical situation, through a poorly optimized website, to insufficient resources on the server. Once you know the issue, you can take the appropriate actions to fix it.

Q: How many cores should a server have?

A: The number of CPU cores you use depends on multiple different factors. Traffic is obviously an important consideration, but you must also look into the requirements of the site-building applications you’re using, as well as the nature of the data you serve and how much of it is cached.

Was this article helpful?

What’s your goal today?

1. Find the right Managed VPS solution

If you’re looking for industry-leading speed, ease of use and reliability Try ScalaHosting with an unconditional money-back guarantee.

2. Make your website lightning-fast

We guarantee to make your website load in less than 2 seconds on a managed VPS with ScalaHosting or give your money back. Fill out the form, and we’ll be in touch.

Make your website lighting fast—or your money back
Slow websites lose visitors and sales. See how you can surf tsunami sized traffic spikes—or any traffic—with ease with ScalaHosting. Fill out the form, and we’ll be in touch!
Please enter a valid name
Please enter a valid website
This site is protected by reCAPTCHA and the Google Privacy Policy and Terms of Service apply.

3. Streamline your clients’ hosting experience

If you’re a web studio or development agency hosting more than 30 websites, schedule a call with Vlad, our co-founder and CTO, and see how we can deliver unmatched value to both your business and your clients.

Photo

Need a custom cluster or professional advice?

Book a meeting and get a free 30-minute consultation with Vlad, co-founder & CTO of Scala Hosting, who will help you select, design and build the right solution - from a single data center cluster to a multi-region & multi-datacenter high availability cluster with hundreds of servers.

Book a free consultation

4. Learn how to grow your website in 2024

An all-star team of SEO and web influencers are sharing their secret knowledge for the first time in years. Learn about the future of SEO, Web Design best practices and the secrets to getting the foundation for your website to thrive. Watch the exclusive webinar.

An Exclusive Insiders Look Behind The SEO and Web Development Curtain