Tuesday, September 21, 2010

Check your VPS performance

So you have your brand new shining VPS delivered? Or is your VPS not as fast as it should be? How do you know you get what you're paying for?
Well, there are a few simple tips you can use. Most VPS companies compete on memory, processors, diskspace and bandwidth.

If you have a Linux VPS you can easily check your VPS using the following commands.

Memory

The command "free -m" shows you how much memory you have available and used. The two most important fields for now are total and used, the yellow fields in the picture. Total gives you the memory available on your server. In this case, 1024 MB. The used memory -/+ cache is the memory your server is currently using: 99 MB. The field above has 358 MB, this is including all the temporary cached data and is not relevant for now.
VPS servers often have a certain amount of guaranteed memory and cache or burst memory. Guaranteed memory is 1024, this memory is for this VPS only. This server has no burst memory available, although some VPS companies regard swap space as burst memory, so this server can be sold as a server with 1GB guaranteed RAM and 1GB burst RAM.

Free -m shows the memory on your VPS






Processor

Some VPS servers give you access to one or more CPUs. To check how many you have available use a virtual file in the /proc filesystem called cpuinfo:


wilco@~/$ cat /proc/cpuinfo
processor       : 0
vendor_id       : GenuineIntel
cpu family      : 6
model           : 44
model name      : Intel(R) Xeon(R) CPU           L5630  @ 2.13GHz
stepping        : 2
cpu MHz         : 2133.472
cache size      : 12288 KB
fdiv_bug        : no
hlt_bug         : no
f00f_bug        : no
coma_bug        : no
fpu             : yes
fpu_exception   : yes
cpuid level     : 11
wp              : yes
flags           : fpu de tsc msr pae cx8 apic sep cmov pat clflush acpi mmx fxsr sse sse2 ss ht nx constant_tsc pni ssse3 sse4_1 sse4_2 popcnt ida
bogomips        : 4270.89
clflush size    : 64
power management:

processor       : 1
vendor_id       : GenuineIntel
cpu family      : 6
model           : 44
model name      : Intel(R) Xeon(R) CPU           L5630  @ 2.13GHz
stepping        : 2
cpu MHz         : 2133.472
cache size      : 12288 KB
fdiv_bug        : no
hlt_bug         : no
f00f_bug        : no
coma_bug        : no
fpu             : yes
fpu_exception   : yes
cpuid level     : 11
wp              : yes
flags           : fpu de tsc msr pae cx8 apic sep cmov pat clflush acpi mmx fxsr sse sse2 ss ht nx constant_tsc pni ssse3 sse4_1 sse4_2 popcnt ida
bogomips        : 4270.89
clflush size    : 64
power management:
Output shows this VPS has two CPUs available, processor 0 and processor 1.

Disk space
Use the command df -h to find the available disk space. The disk space that is allocated to you is in the picture below, output of this command is different on each server. The largest partition is often the disk space allocated to your VPS. On this VPS it is 99 GB, which is sold as 100 GB.

Available disk space is 99G on this VPS








Bandwidth
Data traffic is not free. Most VPS companies sell you a set amount of bandwidth for a fixed price. This is often something like 100GB or a 1000GB. The best and most reliable way to check your bandwidth is to use the control panel of your VPS. If this is unavailable you can get a good indication by using the command /sbin/ifconfig

There is a lot of output and at the end is something like:

RX bytes:1878459788 (1.7 GiB)  TX bytes:64280680 (61.3 MiB)

This means we have sent 1.7 GB and received 61 MB. This figure is not very reliable as you can reset your network interface and also reset the data sent and received.

No comments:

Post a Comment