RAM v CPU v HDD for a Webserver VPS

What is a VPS?

A Virtual Private Server (VPS) can be thought of as a virtual computer. How a VPS works is that a single powerful computer server is divided up into multiple smaller less power virtual servers. Each virtual server is private, meaning that generally users cannot reach across one VPS and use the resources of another VPS. The most simple way to think about it is to imagine a VPS as being a computer in “the cloud“. You access this virtual computer remotely through tools such as SSH. Unlike shared webhosting, a VPS is managed and controlled by the VPS user; you. The user is responsible for all the system administration that goes on. This means that a VPS can be customized to perform just about any task; from webhosting to backing up data to running a game server.

Choosing a Webhosting VPS

Webhosting is the practice of serving websites to users. The site you are reading right now is on a VPS. When someone you told your browser to visit adminhacks.com, what happened is your browser sent out a querry to the Internet asking where to get the adminhacks.com website. The Internet responded with the address of the VPS that adminhacks.com is on, then your browser asked that VPS to send it the adminhacks.com website. Your browser interpreted that code for you and that is how you are able to view this site. A webserver replies to queries asking for a website.

Every site on the internet is on a webserver. Some are on shared webservers or dedicated servers, but many run on a virtual server. Using a VPS as a webserver is a great idea. What to look for in a VPS webserver depends on what type of websites you will be hosting. Will there be a lot of data such as large images or videos? Will there be a lot of queries to the database? Here are some general guidlines for what the most important factors are in choosing a VPS webhost.

Bandwidth

Bandwidth can be a serious consideration if you plan to host a popular site with lots of larger downloads. If you have a good number of users and they are all accessing a large amount of data, such as downloading videos, your bandwidth will get eaten up rather quickly. There are tools to help you deal with this. Compression and content delivery networks can help.

However if your website is largely text / HTML files, then even with a large number of users the bandwidth usage will not be terribly large.

Whatever the case is, bandwidth is easy to monitor and you should be able to see exactly how much you are using every month. Based on this you should be able to upgrade your bandwidth amounts if needed. Be sure to keep an eye on this as bandwidth overage charges can add up very quickly.

Hard Drive Space

This is somewhat related to Bandwidth. If you are hosting very large files, such as videos, harddrive space might be a constraint. For webhosting itself, hard drive space is rarely a problem. That being said, if you plan on running email on the same server that you host websites on, then you may have an issue. I have certainly come across users who have gigabytes worth of spam saved on their email server.

Hard drive space usage is actually very easy to estimate before going live. You probably already have a decent idea of how large your website will be, and at what rate it might grow. You can estimate this and make sure the VPS you do choose gives you enough headroom for growth.

If you do plan to have a site where users read and write a lot of data, such as a site with many images or a site which often reads and writes to a database, be sure to get a VPS with faster hard drives. While harddrive space is not going to be a limiting factor for your site, hard drive speed might be. Websites need to be fast. The faster the better for your users and for your search engine rankings. SSD drives are well worth the extra costs and should be used on just about every webserver.

CPU

Serving websites is not very CPU intensive. Generally the CPU power should not be your main concern when choosing the requirements for your webserver. Serving an HTTP page is a simple process for the CPU. Hosting a chat server on the other hand will be a bit more CPU intensive. But if you are looking to host static websites, do not fret too much over CPU.

Many webservers utilize the leftover CPU power they have on HTTP compression. HTTP compression makes the webpage data smaller. This decreases the bandwidth and load time of the website. HTTP compression uses CPU power to make the site faster. Even with HTTP compression, it is unlikely that the CPU will be the limiting factor for a HTTP webhost on an average day.

However, if you are running a web application which will use a lot of computing power, then the CPU becomes more important. If your server is using backend code to do a lot of manipulations, then the CPU will be used more intensely. Basically if you need the server to constantly be thinking or calculating, such as when hosting a chat application, or a game server or even streaming video, then you will need to be concerned with CPU.

RAM

For many webservers RAM is what matters most. This is because almost every webservers uses caching. Caching saves webpages (and other data) in memory (RAM). This allows the RAM to reply to browser queries for web pages without touching the hard drive.

Getting data from RAM is a ton faster than getting data from a hard disk. Because of this, if a webpage is able to load directly from RAM it will load much faster than if the webserver has to read from the hard drive.

Many websites have a few pages that are more popular than the rest of the site combined. When this is true, caching becomes gold. Those few extremely popular pages can be cached in RAM and are served with lightning speed compared to pages served from the hard disk.

Conclusion

  • Always get a faster harddrive. This means SSD and RAID when possible.
  • If you are hosting static webpages, where a user downloads the page and then does not interact with the server a whole bunch while reading the page, worry more about RAM.
  • If you are hosting something where users are constantly interacting with the server, consider CPU to be more important.
  • Harddrive space and bandwidth needs can be estimated/monitored pretty well once you start using the VPS. Because of this, monitor them both, and if you do need to increase one or the other, upgrade your VPS plan.

Also see: Top VPS Providers

Leave a Reply

Your email address will not be published. Required fields are marked *