VPS : Basic checks for performance of a VPS and or a Server

0

There is more than one way to check the performance available on a VPS Server but I go for a 1st quick shot to test if something is falling over.

All I one Script:

The Guys @ freevps.us offer a script that does it all or you.
Host info , Download Speed Test , and disk IO.

Give it a try, it does help you quick and dirty to get some results.

wget freevps.us/downloads/bench.sh -O - -o /dev/null | bash


VPS Upload and Download Speed:

Quick check to see your up and downstream speed for the VPS.

wget https://raw.githubusercontent.com/sivel/speedtest-cli/master/speedtest_cli.py speedtest_cli.py --share

IO (also covered by the all in one script):

To get a brief feeling about IO capabilities of a VPS you could use

dd if=/dev/zero of=test bs=64k count=16k conv=fdatasync;rm test
16384+0 records in
16384+0 records out
1073741824 bytes (1.1 GB) copied, 9.91105 s, 108 MB/s

Some com­monly accepted aver­ages for random IO operations, calculated as 1/(seek + latency) = IOPS: (Source wikipedia https://en.wikipedia.org/wiki/IOPS)

Device Type IOPS Interface
7,200 rpm SATA drives HDD ~75-100 IOPS[2] SATA 3 Gbit/s
10,000 rpm SATA drives HDD ~125-150 IOPS[2] SATA 3 Gbit/s
10,000 rpm SAS drives HDD ~140 IOPS[2] SAS
15,000 rpm SAS drives HDD ~175-210 IOPS[2] SAS
Various
(See Wikipedia page for details)
SSD ~ > 5000 IOPS SATA 3 / 6 Gbit/s

More to read about disk performance here http://wintelguy.com/2013/20130406_disk_perf.html

 

Further details about your CPU:

cat /proc/cpuinfo
processor       : 0
vendor_id       : GenuineIntel
cpu family      : 6
model           : 45
model name      : Intel(R) Xeon(R) CPU E5-2650 0 @ 2.00GHz
stepping        : 7
microcode       : 0x710
cpu MHz         : 1995.192
cache size      : 20480 KB
physical id     : 0
siblings        : 2
core id         : 0
cpu cores       : 2
apicid          : 0
initial apicid  : 0
fpu             : yes
fpu_exception   : yes
cpuid level     : 13
wp              : yes
flags           : fpu vme de pse tsc msr pae mce cx8 apic sep mtrr pge mca cmov pat pse36 clflush dts mmx fxsr sse sse2 ss ht syscall nx rdtscp lm constant_tsc arch_perfmon pebs bts nopl xtopology tsc_reliable nonstop_tsc aperfmperf pni pclmulqdq ssse3 cx16 pcid sse4_1 sse4_2 x2apic popcnt aes xsave avx hypervisor lahf_lm ida arat epb xsaveopt pln pts dtherm
bogomips        : 3990.38
clflush size    : 64
cache_alignment : 64
address sizes   : 40 bits physical, 48 bits virtual
power management:

 

SAR / Sysstat

To be able to periodically check the performance even retrospectively, you may want to install sysstat which contains sar.

Sar can give you detail about

  • Collective CPU usage
  • Individual CPU statistics
  • Memory used and available
  • Swap space used and available
  • Overall I/O activities of the system
  • Individual device I/O activities
  • Context switch statistics
  • Run queue and load average data
  • Network statistics
  • Report sar data from a specific time

In CentOS / Redhat you can do so by using

Sudo yum install sysstat

In Debian / Ubuntu you use

sudo apt-get install sysstat

Check that it put in the periodic checks in the crontab

vi /etc/cron.d/sysstat
# Check there is 
PATH=/usr/lib/sysstat:/usr/sbin:/usr/sbin:/usr/bin:/sbin:/bin
# Activity reports every 10 minutes everyday
5-55/10 * * * * root command -v debian-sa1 > /dev/null && debian-sa1 1 1
# Additional run at 23:59 to rotate the statistics file
59 23 * * * root command -v debian-sa1 > /dev/null && debian-sa1 60 2

Many usage examples could be found here
http://www.thegeekstuff.com/2011/03/sar-examples/

sysbench

There is a package named sysbench which could be installed

apt-get install sysbench
#or
yum install sysbench

the man file will provide with loads of options. here are a few quick ones:

CPU

sysbench --test=cpu --cpu-max-prim=10000 run

 

 

File IO

Create a test file.
It is advised to use a file larger than the memory size to avoid it being cached. 

sysbench --test=fileio --file-total-size=20G prepare

The test:

sysbench --test=fileio --file-total-size=20G --file-test-mode=rndrw --init-rng=on --max-time=300 --max-requests=0 run

Cleanup the created test file.

sysbench --test=fileio --file-total-size=150G cleanup

Leave a Reply