KVM VM IO Speed

WebHostingNeeds

Renowned Member
Dec 4, 2015
19
1
66
I created a KVM vm using LVM disks


Code:
# qm config 100
bootdisk: virtio0
cores: 3
cpu: Broadwell
ide2: local:iso/CentOS-6.7-x86_64-minimal.iso,media=cdrom
memory: 24576
name: cloud1.oveemo.com
net0: virtio=02:00:00:ED:D0:8C,bridge=vmbr0,rate=100,queues=1
numa: 0
onboot: 1
ostype: l26
protection: 1
smbios1: uuid=738bb67e-4694-4a42-9459-5644d4ee933c
sockets: 1
vga: qxl
virtio0: lvm:vm-100-disk-1,size=500G
virtio1: lvm:vm-100-disk-2,size=500G
#


When i check IO speed inside VM, i get


(INSIDE VM)


Code:
# dd if=/dev/zero of=ddfile bs=8k count=250000 oflag=direct && sync
250000+0 records in
250000+0 records out
2048000000 bytes (2.0 GB) copied, 29.3599 s, 69.8 MB/s
# dd if=ddfile of=/dev/null
4000000+0 records in
4000000+0 records out
2048000000 bytes (2.0 GB) copied, 14.566 s, 141 MB/s
# hdparm -Tt /dev/vdb


/dev/vdb:
 Timing cached reads:   19354 MB in  2.00 seconds = 9691.79 MB/sec
 Timing buffered disk reads: 426 MB in  3.11 seconds = 137.11 MB/sec
#


When i benchmark from Host server on a LV on same LVG, i get better speed.


(HOST SERVER)


Code:
# dd if=/dev/zero of=ddfile bs=8k count=250000 oflag=direct && sync
250000+0 records in
250000+0 records out
2048000000 bytes (2.0 GB) copied, 18.3573 s, 112 MB/s
# dd if=ddfile of=/dev/null
4000000+0 records in
4000000+0 records out
2048000000 bytes (2.0 GB) copied, 12.9525 s, 158 MB/s
#

Is this normal ?
 
I suggest you aquatint yourself with the typical performance for you hard drives first, otherwise you might just be looking at cache effects.
Probably better to use a real world transfer not /dev/null and /dev/zero or a proper i/o benchmark program.