Virtualization

From CompBio
Jump to: navigation, search

Virtualization by the numbers.

These basic tests were run on a research cluster, known as the sandbox, provided to us by Hard Drives North West with the following configuration:

Host:

Ubuntu Natty (development branch)
AMD Phenom(tm) II X6 1090T Processor
Kingston 2GB (3x2GB) 1333 DDR3
kernel command line:
BOOT_IMAGE=/boot/vmlinuz-2.6.38-8-virtual root=UUID=cfcecd06-a3b6-4cca-85c7-2df7fc3c0eb2 ro nosplash verbose elevator=deadline ipv6.disable=1 nomodeset
mike@sb4 ~ 20:43:40
# fglrxinfo 
display: :0  screen: 0
OpenGL vendor string: ATI Technologies Inc.
OpenGL renderer string: ATI Radeon HD 5800 Series
OpenGL version string: 4.1.10665 Compatibility Profile Context

Environmental status:

mike@sb4 ~ 20:46:14
# sensors
atk0110-acpi-0
Adapter: ACPI interface
Vcore Voltage:     +1.18 V  (min =  +0.85 V, max =  +1.60 V)
 +3.3 Voltage:     +3.36 V  (min =  +2.97 V, max =  +3.63 V)
 +5 Voltage:       +5.12 V  (min =  +4.50 V, max =  +5.50 V)
 +12 Voltage:     +11.98 V  (min = +10.20 V, max = +13.80 V)
CPU FAN Speed:    2636 RPM  (min =  200 RPM)
CHASSIS FAN Speed:1108 RPM  (min =  200 RPM)
CPU Temperature:   +39.0°C  (high = +60.0°C, crit = +95.0°C)  
MB Temperature:    +29.0°C  (high = +45.0°C, crit = +75.0°C)  

k10temp-pci-00c3
Adapter: PCI adapter
temp1:       +31.5°C  (high = +70.0°C, crit = +99.5°C)  


The guest have been virtualized using default natty kvm+qemu packages.

kvm command line:

mike@sb4 /etc/libvirt/qemu 20:48:47
# ps -ef | grep gitosis | grep -w kvm | sed -e 's/ -/\n   -/g'
kvm      11366     1  0 14:57 ?        00:00:00 /bin/bash /usr/bin/kvm.nested
   -S
   -M pc-0.14
   -enable-kvm
   -enable-nesting
   -m 512
   -smp 1,sockets=1,cores=1,threads=1
   -name gitosis
   -uuid ceb5a022-5ede-d9cb-0ea0-29e8e25a94fc
   -nodefconfig
   -nodefaults
   -chardev socket,id=charmonitor,path=/var/lib/libvirt/qemu/gitosis.monitor,server,nowait
   -mon chardev=charmonitor,id=monitor,mode=readline
   -rtc base=utc
   -boot c
   -drive file=/spare/libvirt/images/ubuntu-kvm/tmpzbszHy.img,if=none,id=drive-virtio-disk0,boot=on,format=raw,cache=none
   -device virtio-blk-pci,bus=pci.0,addr=0x6,drive=drive-virtio-disk0,id=virtio-disk0
   -netdev tap,fd=16,id=hostnet0
   -device virtio-net-pci,netdev=hostnet0,id=net0,mac=52:54:00:a9:51:66,bus=pci.0,addr=0x3
   -usb
   -device usb-tablet,id=input0
   -vnc 127.0.0.1:0
   -vga std
   -device virtio-balloon-pci,id=balloon0,bus=pci.0,addr=0x4


CPU: I've used a benchmarking tool called savage to produce these results.

# cat savage.c
#include <stdio.h>
#include <math.h>

int i=0;
double a=1.0;

int main()
{
  while(i<10000000)
    {
      a = tan(atan(exp(log(sqrt(a*a)))))+1.0;
      i++;
    }
  printf("result = %f\n", a);
}
# gcc -lm -O1 -o savage-1 savage.c


Host:

mike@sb4 ~/src 20:59:25
# time ./savage-1
result = 9999817.515948

real	0m1.855s
user	0m1.840s
sys	0m0.000s

mike@sb4 ~/src 20:59:34
# time ./savage-1
result = 9999817.515948

real	0m1.827s
user	0m1.820s
sys	0m0.000s

Guest:

mike@gitosis ~/src 21:00:18
# time ./savage-1
result = 9999817.515948

real    0m1.865s
user    0m1.840s
sys     0m0.010s

mike@gitosis ~/src 21:00:25
# time ./savage-1
result = 9999817.515948

real    0m1.854s
user    0m1.850s
sys     0m0.000s

CPU analysis: CPU performance is surprisingly reasonable under virtualization.

IO

Using dd to do basic IO sanity checks:

host:

mike@sb2 /maxc/tmp 20:32:53
# dd if=/dev/zero of=sb2.tmp bs=1M count=1024
1024+0 records in
1024+0 records out
1073741824 bytes (1.1 GB) copied, 7.49638 s, 143 MB/s
mike@sb4 ~ 21:56:35
# sudo hdparm -t /dev/sdb

/dev/sdb:
 Timing buffered disk reads: 436 MB in  3.01 seconds = 144.81 MB/sec


guest:

root@gitosis ~ 20:52:36
# dd if=/dev/zero of=tmpfile bs=1M count=1024
dd: writing `tmpfile': No space left on device
1022+0 records in
1021+0 records out
1071431680 bytes (1.1 GB) copied, 11.4578 s, 93.5 MB/s


mike@gitosis ~ 04:55:25
# sudo hdparm -t /dev/vda

/dev/vda:
 Timing buffered disk reads: 384 MB in  3.00 seconds = 127.81 MB/sec


Disk analysis: The numbers provided by hdparm indicate there is a maximum possible through put efficiency of about 88%, however, file system performance was only able to achieve 95MB/s, and this is considerable overhead, for now, this is not recommended for IO intensive workloads, but because of the results of hdparm there seems to be a lot of room for improvement. Would like to test using Solid State devices. Both the host and the guest use ext4. The guest image is of the raw disk format. Using a raw device was not attempted, suspect gains, but at the cost of ease of management. 94MB/s is more than adequate for services, cpu bound tasks, or general use environments. May also benefit from RAID backed device.

Network latency:

To host:

mike@abyss Shrike ~ 21:12:41
# ping sb4 -c 4
PING sb4.compbio.washington.edu (10.20.40.4) 56(84) bytes of data.
64 bytes from sb4 (10.20.40.4): icmp_seq=1 ttl=64 time=0.173 ms
64 bytes from sb4 (10.20.40.4): icmp_seq=2 ttl=64 time=0.160 ms
64 bytes from sb4 (10.20.40.4): icmp_seq=3 ttl=64 time=0.177 ms
64 bytes from sb4 (10.20.40.4): icmp_seq=4 ttl=64 time=0.147 ms

--- sb4.compbio.washington.edu ping statistics ---
4 packets transmitted, 4 received, 0% packet loss, time 2997ms
rtt min/avg/max/mdev = 0.147/0.164/0.177/0.014 ms

To guest:

mike@abyss Shrike ~ 21:12:49
# ping gitosis -c 4
PING gitosis.compbio.washington.edu (10.20.50.2) 56(84) bytes of data.
64 bytes from gitosis (10.20.50.2): icmp_seq=1 ttl=64 time=0.492 ms
64 bytes from gitosis (10.20.50.2): icmp_seq=2 ttl=64 time=0.507 ms
64 bytes from gitosis (10.20.50.2): icmp_seq=3 ttl=64 time=0.456 ms
64 bytes from gitosis (10.20.50.2): icmp_seq=4 ttl=64 time=0.540 ms

--- gitosis.compbio.washington.edu ping statistics ---
4 packets transmitted, 4 received, 0% packet loss, time 3004ms
rtt min/avg/max/mdev = 0.456/0.498/0.540/0.040 ms

Network: Guest device is paravirtualized using the virtio guest drivers and a tap device on the host bridged with a physical device. Virtualization appears to add ~.4 ms latency. would not recommend use on applications with ultra low latency requirements.

Personal tools
Namespaces

Variants
Actions
Navigation
Toolbox