VPS Notes

Beginner Tutorial - Buying a VPS

Buying a VPS is not trivial.  There are many things that you need to consider.  This section will guide you in making your decision, and will also walk you through the steps when signing up with a company. 

Selecting a Company

The first step that you need is to have  shortlist of companies to choose from.  If you have a good budget, I recommend well known brands (but a bit pricey) such as:
If you are on a tight budget, there is a community  that specializes on budget friendly VPS offers.  Lowendbox and Lowentalk only posts VPS offers that costs at most USD$7 per month.  You have to note that most of the companies here are very small, usually consisting of 1-5 persons.  From time to time, there are some scammers too.  But to save you trouble of research, I recommend the following host from LEB/LET:
  • Prometeus - a very respected company that offer services from Milan Italy, Dallas Texas, and Pune India.
  • CatalystHost - a company that is well known for providing good support.
  • Hostigation - known for having fast and highly technical support
  • ServerDragon - low cost but very professional host
(Note: I am not affiliated with these companies, but have used services from each for at least a year.)

Terms of Service

It is generally recommended to read the Terms of Service (TOS) of a company to know what they allow and don't allow. Usually, you don't need to worry anything if you intend to use the service for normal legal purposes such as hosting a personal blog. Companies are usually particular of illegal use or resource intentive purpose such as games servers. If your need is special, read the TOS carefully or open a sales ticket.

Selecting Location

Select a location near you or your intended visitors/customers. Preferably in the same country or continent. But having close proximity does not usually mean faster network responses. To be sure, use the command ping (Available both in Windows and Linux environments) to test the latency of your server. For example:

Ping from my country to Milan Italy is ~ 370 ms.

$ ping 37.247.53.10
PING 37.247.53.10 (37.247.53.10) 56(84) bytes of data.
64 bytes from 37.247.53.10: icmp_req=1 ttl=44 time=372 ms
64 bytes from 37.247.53.10: icmp_req=2 ttl=44 time=374 ms
64 bytes from 37.247.53.10: icmp_req=3 ttl=44 time=382 ms

ping from my country to Los Angeles is ~ 165 ms.

 $ ping 206.253.164.3
PING 206.253.164.3 (206.253.164.3) 56(84) bytes of data.
64 bytes from 206.253.164.3: icmp_req=1 ttl=54 time=168 ms
64 bytes from 206.253.164.3: icmp_req=2 ttl=54 time=169 ms
64 bytes from 206.253.164.3: icmp_req=3 ttl=54 time=168 ms

This tells me that LA is much nearer to me because of the lower ping. For people living in Asia, try getting services from California area(e.g. Los Angeles).

Interpreting benchmarks

People usually posts benchmarks of different hosts.  The important ones to consider are tests for disks and network performance, because they contribute the most to the overall experience. (If you are buying from a good hosts, you may skip checking benchmarks.)
dd test - this is a measurement of how fast it is to write to disks.  If your VPS usage is just moderate, a value of 100Mb/s and above is considered good.  You don't have to chase very high number such as 400Mb/s and above. A value of 60Mb/s is still okay, but it's a sign that the host is using very old hardware, or they crammed up too many people in their servers. A value of 40Mb/s and below is considered bad.

This is okay:

$ dd if=/dev/zero of=test bs=64k count=16k conv=fdatasync
16384+0 records in
16384+0 records out
1073741824 bytes (1.1 GB) copied, 7.61077 seconds, 141 MB/s

This is bad:
$ dd if=/dev/zero of=test bs=64k count=16k conv=fdatasync
16384+0 records in
16384+0 records out
1073741824 bytes (1.1 GB) copied, 47.6071 s, 22.6 MB/s
ioping - this is a measurement of how responsive the disk is for ramdom access. This is more important than the dd test above. A low ioping is desirable.

This is good. As you notice, ping is very low at 0.1 ms. You also want the iops and the mb/s at the bottom to be high:

4096 bytes from /vz (ext4 /dev/sdb2): request=1 time=0.1 ms
4096 bytes from /vz (ext4 /dev/sdb2): request=2 time=0.1 ms
4096 bytes from /vz (ext4 /dev/sdb2): request=3 time=0.1 ms
4096 bytes from /vz (ext4 /dev/sdb2): request=4 time=0.1 ms
4096 bytes from /vz (ext4 /dev/sdb2): request=5 time=0.1 ms
4096 bytes from /vz (ext4 /dev/sdb2): request=6 time=0.1 ms
4096 bytes from /vz (ext4 /dev/sdb2): request=7 time=0.1 ms
4096 bytes from /vz (ext4 /dev/sdb2): request=8 time=0.1 ms
4096 bytes from /vz (ext4 /dev/sdb2): request=9 time=0.1 ms
4096 bytes from /vz (ext4 /dev/sdb2): request=10 time=0.1 ms

--- /vz (ext4 /dev/sdb2) ioping statistics --- 10 requests completed in 9001.7 ms, 10309 iops, 40.3 mb/s min/avg/max/mdev = 0.1/0.1/0.1/0.0 ms

this is bad:
4096 bytes from / (simfs /dev/simfs): request=1 time=0.2 ms
4096 bytes from / (simfs /dev/simfs): request=2 time=0.2 ms
...
4096 bytes from / (simfs /dev/simfs): request=20 time=510.0 ms
4096 bytes from / (simfs /dev/simfs): request=21 time=349.6 ms
4096 bytes from / (simfs /dev/simfs): request=22 time=204.3 ms
4096 bytes from / (simfs /dev/simfs): request=23 time=185.9 ms
4096 bytes from / (simfs /dev/simfs): request=24 time=1008.0 ms
4096 bytes from / (simfs /dev/simfs): request=25 time=344.9 ms

--- / (simfs /dev/simfs) ioping statistics --- 25 requests completed in 32301.0 ms, 3 iops, 0.0 mb/s min/avg/max/mdev = 0.2/331.0/1008.0/226.6 ms
(Note: If performance is an issue, consider buying a VPS with huge amount of RAM and SSD disks.)
Network Speed - people usually test network by downloading a very large file from different location. From the example below, you should look for a high number to the location near where you are. You may ignore the speed from CacheFly as those usually means a server very near your host.

Generally, you would want a speed of at least 10MB/s. Having 100MB/s and above is considered great!

Download speed from CacheFly: 53.2MB/s
Download speed from Coloat, Atlanta GA: 34.5MB/s
Download speed from Softlayer, Dallas, TX: 46.8MB/s
Download speed from Linode, Tokyo, JP: 7.84MB/s
Download speed from i3d.net, NL: 9.01MB/s
Download speed from Leaseweb, Haarlem, NL: 9.49MB/s
Download speed from Softlayer, Singapore: 4.58MB/s
Download speed from Softlayer, Seattle, WA: 20.0MB/s
Download speed from Softlayer, San Jose, CA: 19.8MB/s
Download speed from Softlayer, Washington, DC: 29.5MB/s

Selecting Virtualization

When going through a host website, you will notice that they usually offer VPS using different virtualizatinon technology. The popular choices are: OpenVZ, KVM, and Xen. You will notice that OpenVZ are cheaper compared to KVM and Xen. If you are a beginner with VPS and Linux, I recommend that you buy either KVM or Xen, as they are more predictable and behaves like a dedicated server. Only consider OpenVZ when you get more experience later.

Selecting Resources

For this tutorial of setting up a web server from scratch, I recommend getting a server with 256Mb RAM, 10Gb disks, and 50Gb bandwidth. This is enough for hosting several static sites and low traffic PHP blogs (i.e. Wordpress). If you plan to play with other applications later, feel free to increase the resources as you like.

Sign-Up Walkthrough

These are the steps when signing up with a host:
select a package from the company's website
z01
Fill up the Product Configuration Page. Choose a monthly billing cycle first to try the quality of the service, and just commit to a longer cycle later if you wish. For operating system, if you are new to Linux, choose Ubuntu 32bit. You can still change the operating system later after you bought the VPS.
z02
Enter your billing details, select your Payment Method, click on agree checkbox and hist the Complete Order button.
z03
After payment, you should receive a welcome email like this:
z04
If the host claims instant provision, you should receive the welcome email within 10 minutes. Some host does it manually and takes a few hours to provision your service.

References

https://romanrm.net/dd-benchmark
http://lowendtalk.com/discussion/7029/what-does-ioping-mean-similar-to-dd
Tags: benchmark