Online Support

How to estimate cloud server requirements

How to estimate cloud server requirements

It can be tough to choose the right amount of cloud server resources for your website or application, especially if it’s something you don’t do often. Luckily it only requires familiarity with a few basic concepts and simple arithmetic, which I’ll explain below.

Websites and applications need these resources to run

Every website you see on the internet needs four basic resources to run:

  • CPU
  • Memory
  • Storage
  • Bandwidth

With a minimal amount of these resources, a web server can serve basic website pages on the internet. Let’s take a closer look at each of these.

CPU

The CPU, or Central Processing Unit, is often referred to as the brain of a computer. The CPU interprets, processes, and executes instructions coming from hardware and software installed on the system. CPUs are present in many of the devices we use today – not just computers –  including your smartphone, tablet, and even smartwatch.

CPUs are integral to cloud hosting, too. In the cloud, you’re essentially renting a portion of a server or a virtual server. Given the nature of cloud computing, which is based on the virtualisation of resources, the CPUs in this context often refer to virtual CPUs, or vCPUs, rather than dedicated physical CPUs.

The capacity and definition of a vCPU can vary between service providers. Some providers equate one physical CPU core to a vCPU, while others might define a vCPU based on hyperthreading capabilities.

What are CPU cores and hyperthreading? Imagine a CPU as a collection of Lego blocks, where each block represents a core. Without hyperthreading enabled, each Lego block can only process one set of instructions (a ‘thread’) at a time. With hyperthreading enabled, each physical Lego block is split into two logical / virtual blocks. Now the single physical Lego block can process two threads at a time. In this context, one vCPU would typically represent one of these virtual cores (or one thread on a hyperthreaded core).

How to calculate your CPU requirements

When in doubt, start with 2 vCPUs and adjust upward as necessary. Alternatively, the following have to be taken into account when calculating the number of vCPUs needed for your cloud server:

Operating system: Most operating systems, especially Linux, can run on a single vCPU and still power a web server. However multiple vCPUs will improve multitasking and overall responsiveness.

Application needs: The applications you run should weigh heavily on the number of vCPUs you choose. Simple HTML websites can easily run on one vCPU. Dynamic sites, especially those running resource-intensive plugins or modules, might benefit from multiple vCPUs. The same is true for applications that are traditionally CPU-intensive, like video encoders and data processors.

CPU utilisation: Running apps or services that require consistently high resource usage (e.g. database servers), may need a permanent assignment of more vCPUs compared to servers where CPU usage occurs in bursts. Where CPU utilisation occurs in bursts, a temporary load balancer can be used to offset any resource demands that may exceed the cloud server’s default configuration.

Traffic: Every connection to your website requires a small amount of processing power. Many connections require more processing power, which necessitates more vCPUs. The actual load on your processor will depend on the CPU usage of your website.

Growth: If you anticipate an increase in the number of users or visitors to your site or an increase in the complexity of your site (e.g. adding a resource-intensive plugin or much more content), you’ll have to include additional processing power in your calculations.

Memory (RAM)

Think of RAM (Random Access Memory) as temporary memory used by the operating system and the applications that run on it. Information typically stored in RAM includes web and database cache, session data, application data, operating system processes, data buffering, and more.

Accessing data from RAM is orders of magnitude faster than accessing data from even the fastest SSDs.

As such, efficient use of RAM is crucial for performance. The amount of RAM is also vital; the more you have, the more session or application data (used by your website) can be stored. This means you can handle higher volumes of information exchange with users while delivering a smooth user experience.

In the past, RAM was predominantly measured in kilobytes (KB), and then, as RAM became more affordable, megabytes (MB) as a unit became commonplace. Today, in most computing contexts, RAM is measured in gigabytes (GB), where 1 GB equals 1024 MB.

How to calculate your RAM requirements

Experience suggests that the minimum amount of RAM required for a cloud server is 4GB. This provides enough memory to the operating system as well as the software stack (Apache, MySQL, PHP) and most applications to ensure smooth operation.

If you want to make the calculation manually, here are additional factors to take into account:

Application needs: Out of the box most applications and content management systems run well on 512MB to 1GB of RAM.

Adding enhancements such as plugins, themes, and other add-ons typically pushes the minimum requirement upward. Unfortunately, theme and add-on authors seldom publish the resource requirements for their software, which means you may have to rely on a trial-and-error approach.

Expected traffic: Just like every request to your web server uses a small amount of processing power, so does it also require a small amount of memory. The aim is to ensure that you always have enough memory to deliver a smooth user experience, even at peak traffic times when requests to your server number in the hundreds or thousands per second.

Caching: Caching mechanisms like Redis can help alleviate the load on your server’s processor. But, since they store frequently used data in memory, they can be memory intensive, especially on busy, larger sites.

Growth: It’s recommended to have a little more memory than you’ll need at any given moment. This ensures that you’ve got the clearance required to handle exceptional events and that there’s room to grow.

Storage

While it’s technically possible to run a website from RAM alone, any information stored will only exist until the server’s next reboot. SSD-based storage is nowadays the norm for non-archival data that needs to be accessed quickly and provides a more permanent home for all your information.

Storage is typically measured in either gigabytes (GB) or terabytes (TB). However, unlike memory which is still represented in binary measurements (1GB = 1024MB), storage has been simplified by the industry to the point where 1GB = 1000MB. Therefore, 1TB = 1000GB.

How to calculate your storage requirements

Storage requirements are a little easier to calculate than CPU or memory. Here’s what to consider:

  • How much storage do you have at the moment and how much are you using?
  • The rate at which you’re filling up available storage
  • The frequency of your storage housekeeping / maintenance
  • Add a little extra for possible near-future growth or expansion

For example:

Your current hosting account has a limit of 5GB, of which you’re using 2GB – operating system included. With new content, email, and logs adding 500MB per month, you’ll hit your limit in 6 months. This can be extended with efficient maintenance for another 3 to 6 months unless you add new content or large files.

Does this mean 5GB is enough for now? Perhaps not if you have a virtual server, since the operating system may temporarily require more disk space during peak traffic times. As such, 10GB of storage space should suffice.

If you’re starting out with a new website, 5GB should do the trick, especially if your email is hosted on a different server. But, with storage being relatively affordable, 10GB should give you ample to work with for the foreseeable future.

Bandwidth

‘Bandwidth’ requires some clarification. Some hosts use the term to describe the total amount of data that may be transferred in a given period of time, for example, 5GB per month. Commonly used scales include:

  • Megabytes (MB)
  • Gigabytes (GB)
  • Terabytes (TB)

(There are 8 bits in 1 byte.)

Strictly speaking, however, ‘bandwidth’ actually refers to the data throughput or speed of a connection. Commonly used scales include:

  • Kilobits per second (Kbps) – thousands of bits per second
  • Megabits per second (Mbps) – millions of bits per second
  • Gigabits per second (Gbps) – billions of bits per second
  • Terabits per second (Tbps) – trillions of bits per second

It’s important to note that data transfer caps apply, in most cases, to shared hosting packages. Server products are intended for high-volume usage, and so may be limited only by the actual bandwidth or data throughput available to that server, which often varies from host to host.

Just remember, when all else fails, your hosting service provider’s support team will know exactly how much processing power, memory, and storage you’ll need to host your website or application and provide your visitors with a smooth user experience. At Storm Internet we’ll provide you with a straightforward recommendation without any upsells or features that’ll add unnecessary bloat to your account – just get in touch.

0800 817 4727