Setting aio=native for a kvm is not supported by qm?

Hanne

New Member
Aug 16, 2011
3
0
1
Hello Proxmox forum

I am new to virtualization. I have tried to google and RTFM, but have some difficulties in finding the answers I am looking for. I hope someone can clarify a few points for me.

I am trying to access a device directly from a kvm guest. The device is /dev/sdc seen from the host. What I want is for this device to belong to guest "testkvm2" with a proper I/O performance, comparable to the performance to the device directly from the host. It should not be accessed from the host or any other guest, and it is OK that we cannot migrate to another host.

First I found out I could do it this way:

qm set 106 --virtio1 /dev/sdc

Or I could add "virtio1: /dev/sdc" to /etc/qemu-server/106.conf.

However, my I/O performance was not impressive, especially with small block sizes.

Then I found this document:

http://publib.boulder.ibm.com/infocenter/lnxinfo/v3r0m0/topic/liaav/LPC/LPCKVMSSPV2.1.pdf

which has nice plots and basically tells me to use virtio, cache=no, aio=native, and deadline scheduler on both host and guest.

cache=no could be set with the qm command, and I know how to change the scheduler.

However, to test with aio=native I had to run kvm manually from the command line:

/usr/bin/kvm -monitor unix:/var/run/qemu-server/106.mon,server,nowait -vnc unix:/var/run/qemu-server/106.vnc,password -pidfile /var/run/qemu-server/106.pid -daemonize -usbdevice tablet -name testkvm2 -smp sockets=3,cores=1 -nodefaults -boot menu=on -vga cirrus -tdf -k da -drive file=/var/lib/vz/template/iso/debian-6.0.1a-amd64-CD-1.iso,if=ide,index=2,media=cdrom -drive file=/var/lib/vz/images/106/vm-106-disk-1.qcow2,if=virtio,index=0,boot=on -drive file=/dev/sdc,if=virtio,index=1,cache=none,aio=native -m 512 -netdev type=tap,id=vlan0d0,ifname=vmtab106i0d0,script=/var/lib/qemu-server/bridge-vlan -device virtio-net-pci,mac=4E:5C:D0:55:7E:E4,netdev=vlan0d0

I found most of the command parameters by saying "ps ax | grep kvm" while running a kvm I had started from proxmox GUI, I just
added the aio=native.

qm does not recognize the option if I add it in the /etc/qemu-server/106.conf file or on the command line.

So my first question is: If I decide to run with aio=native, how can I enable it and still use the gui to start and stop my kvm?

I am running qemu-server 1.1-25 on debian Lenny, and I noticed that there is a never version in the repository now, will that support aio=native in qm? I don't want to upgrade just for the sake of upgrading, since I am already running another kvm in production. Is there a changelog somewhere?

My second question is whether I should use LVM on my raw partition. That way, I can add it from within the GUI, and off course it gives me some flexibility later if I want to expand the volume by adding another disk. However, will it make a difference in performance in any way? I still cannot see that I can set any options like cache=no,aio=native in the gui when I add an lvm group.

My third question is if there is anyway I can protect /dev/sdc from the host os and let it know that it is already mounted in a virtual host.


A suggestion of a whole different approach is welcome, too.

Thanks in advance for enlightening me on any of these points.
 
if you want the best performance, update to the latest KVM from the pvetest repo (KVM 0.15), see announcement from today - I suggest you use the 2.6.32 kernel, also from pvetest (just change your /etc/apt/sources.list to "deb http://download.proxmox.com/debian lenny pvetest")

if you got performance issues, post the details:

  • your hardware, storage, raid config
  • post your 'pveperf' results
  • post your detailed benchmark results from host and guest, so others can compare it. it would make sense you test this drive first on host and then on the guest.
 
Thank you for pointing me to the changelogs. Yes, I might upgrade, however, I am still interested in answers to my questions. The changelogs does not mention aio at all, or anything else that is clearly block device performance related, though timer and interrupt related improvements in the 0.14 changelog could be interesting. A link to the proper documentation would also be welcome. I have some difficulty finding out what is proxmox and what is qemu-kvm, how the stuff I can do on the command line can be done from the gui, and where to look for authoritative documentation.
 
...

However, my I/O performance was not impressive, especially with small block sizes.

...

provide the details as requested, not impressive is just not that informative.
 
I am sorry that I have not expressed myself clearly. I did not ask for you to solve my performance issue. I asked for help with 1) The relation between the command line parameters I can pass to kvm, to qm and in the GUI. 2) Recommendations about accessing a raw device from a guest in the best way. The rest was background information. However, I guess I can find the answers I need in the source code, if not in the documentation. My apologies for apparently wasting your time.
 
We currently do not support setting the 'aio' parameter. You can find a list of all parameters you can set in

# man qm

I have no idea if it make sense to set that option? Do you have any pointers to documentation?
 
I have no idea if it make sense to set that option? Do you have any pointers to documentation?

The paper you send does not really show great improvements, but it is still worth to consider. Unfortunately our old libc (lenny) has problems with eventfd so it is not possible to enable aio for 1.X (but i will enable it in 2.x).
 

About

The Proxmox community has been around for many years and offers help and support for Proxmox VE, Proxmox Backup Server, and Proxmox Mail Gateway.
We think our community is one of the best thanks to people like you!

Get your subscription!

The Proxmox team works very hard to make sure you are running the best software and getting stable updates and security enhancements, as well as quick enterprise support. Tens of thousands of happy customers have a Proxmox subscription. Get yours easily in our online shop.

Buy now!