kvm performance

Just FYI

Run a quick performance test (no raid)

It looks like that the KVM disk performance is very slow with the Cloudmin settings?

Host: [root@vps ~]# 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, 17.9167 seconds, 59.9 MB/s [root@vps ~]# 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, 17.3755 seconds, 61.8 MB/s

VM:

[root@kvm1 ~]# 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, 120.139 seconds, 8.9 MB/s
[root@kvm1 ~]# 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, 137.378 seconds, 7.8 MB/s
Status: 
Active

Comments

Did you enable VirtIO when creating the KVM instance? This improves disk performance .. you can enable in on the system creation page, in the "Advanced options" section.

Unfortunately Cloudmin doesn't have much control over KVM's disk performance ..

One thing that I've found helps significantly is to use LVM to store your VM disk images, instead of regular files. However, this requires that your host system's disks have been setup to use LVM, and that a volume group exists with free space for Cloudmin disk images..

Actually I tried already, it did not make a difference.

Did you read the link I attached earlier?

I'd be interested to know if those suggestions from the link you provided help significantly...

Also, what kind of speed do you get on the host system?

I'd be interested to know if those suggestions from the link you provided help significantly...

Also, what kind of speed do you get on the host system?

I thought I pasted that already, but here you go.

[root@vps ~]# 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, 16.4014 seconds, 65.5 MB/s
[root@vps ~]# 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, 16.3806 seconds, 65.5 MB/s

I think those suggestions would increase performance by a factor of 6 (500% at least). But you are the expert, not sure whether the settings are recommended?

I think those suggestions would increase performance by a factor of 6 (500% at least). But you are the expert, not sure whether the settings are recommended?

We'd certainly encourage experimenting, and using the options that are best for you and your organization.

However, note that if an option isn't enabled by default -- there is often a reason for that, as there may be a catch involved in enabling them.

For example -- the page you linked has this big warning at the end of that article:

Warning: Please note that in the event the host node crashes, data loss can result from this option.

Many folks would consider that a deal breaker; there's a lot of things that can cause the host node to crash. If that causes all the VM's to experience data loss, that can be a pretty big deal :-)

Interesting - on my test system (KVM instance with virtio, using LVM for disk images), performance was comparable between the VM and the host system for a 1GB write with dd (around 20 MB/s)

@jamie, I will try this again (i haven't skipped lvm/raid etc, because of the frequent reinstalls - to save time). But I remember I tried quite a few times. 20MB for your host sounds very slow?

@eric, I am not sure why turning off cache would increase data loss? But I am not an expert (you are :-).

20MB for your host sounds very slow? Maybe that also explains why your site is so slow today (just kidding :-)

IMHO changing the default scheduler should not be up to Cloudmin; it's up to the respective system owners/admins to experiment with such settings.