[libvirt-users] libvirt on OpenStack

Hi, I am running OpenStack Cluster and use libvirt + cgroup to limit vm’s performance https://wiki.openstack.org/InstanceResourceQuota What I am confusing is.. 1. After running a vm instance with some croup limit applied, I can’t find any related cgroup settings. 2. Can I change limit value after instance is running? like change disk_read_iops_sec from 10 to 20. One of the xml file like below. <domain type="kvm"> <uuid>27f49e5c-8ee0-4a09-8269-5fa31acd2983</uuid> <name>instance-000000da</name> <memory>2097152</memory> <vcpu cpuset="1-12">1</vcpu> <sysinfo type="smbios"> <system> <entry name="manufacturer">Red Hat Inc.</entry> <entry name="product">OpenStack Nova</entry> <entry name="version">2013.2.3-1.el6</entry> <entry name="serial">9fa4736a-2b02-11e1-a8e4-5cf3fcb968b4</entry> <entry name="uuid">27f49e5c-8ee0-4a09-8269-5fa31acd2983</entry> </system> </sysinfo> <os> <type>hvm</type> <boot dev="hd"/> <smbios mode="sysinfo"/> </os> <features> <acpi/> <apic/> </features> <clock offset="utc"> <timer name="pit" tickpolicy="delay"/> <timer name="rtc" tickpolicy="catchup"/> </clock> <cpu mode="host-model" match="exact"/> <devices> <disk type="file" device="disk"> <driver name="qemu" type="qcow2" cache="none"/> <source file="/data1/lib/nova/instances/27f49e5c-8ee0-4a09-8269-5fa31acd2983/disk"/> <target bus="virtio" dev="vda"/> <iotune> <read_bytes_sec>25600000</read_bytes_sec> <write_bytes_sec>40960000</write_bytes_sec> </iotune> </disk> <interface type="bridge"> <mac address="fa:16:3e:49:04:ce"/> <model type="virtio"/> <source bridge="br-int"/> <target dev="tape30b3c05-12"/> <virtualport type="openvswitch"> <parameters interfaceid="e30b3c05-126c-45bd-ac31-e5eb5481a652"/> </virtualport> </interface> <serial type="file"> <source path="/data1/lib/nova/instances/27f49e5c-8ee0-4a09-8269-5fa31acd2983/console.log"/> </serial> <serial type="pty"/> <input type="tablet" bus="usb"/> <graphics type="vnc" autoport="yes" keymap="en-us" listen="10.13.128.43"/> </devices> </domain> ✉ -- 朴元奎 kerwin

On 06/27/2014 05:48 PM, kerwin wrote:
Hi,
I am running OpenStack Cluster and use libvirt + cgroup to limit vm's performance https://wiki.openstack.org/InstanceResourceQuota
What I am confusing is..
1. After running a vm instance with some croup limit applied, I can't find any related cgroup settings.
well, there are two kinds of iotune for vm instance storage. 1. cgroup way: as http://libvirt.org/formatdomain.html#elementsBlockTuning described, the <blkiotune> element should be configured under <domain>. 2. qemu way: For some reason, qemu provides block iotune, see http://libvirt.org/formatdomain.html#elementsDisks This capability you used is implemented inside qemu.
2. Can I change limit value after instance is running? like change disk_read_iops_sec from 10 to 20.
One of the xml file like below.
<domain type="kvm"> <uuid>27f49e5c-8ee0-4a09-8269-5fa31acd2983</uuid> <name>instance-000000da</name> <memory>2097152</memory> <vcpu cpuset="1-12">1</vcpu> <sysinfo type="smbios"> <system> <entry name="manufacturer">Red Hat Inc.</entry> <entry name="product">OpenStack Nova</entry> <entry name="version">2013.2.3-1.el6</entry> <entry name="serial">9fa4736a-2b02-11e1-a8e4-5cf3fcb968b4</entry> <entry name="uuid">27f49e5c-8ee0-4a09-8269-5fa31acd2983</entry> </system> </sysinfo> <os> <type>hvm</type> <boot dev="hd"/> <smbios mode="sysinfo"/> </os> <features> <acpi/> <apic/> </features> <clock offset="utc"> <timer name="pit" tickpolicy="delay"/> <timer name="rtc" tickpolicy="catchup"/> </clock> <cpu mode="host-model" match="exact"/> <devices> <disk type="file" device="disk"> <driver name="qemu" type="qcow2" cache="none"/> <source file="/data1/lib/nova/instances/27f49e5c-8ee0-4a09-8269-5fa31acd2983/disk"/> <target bus="virtio" dev="vda"/> <iotune> <read_bytes_sec>25600000</read_bytes_sec> <write_bytes_sec>40960000</write_bytes_sec> </iotune> </disk> <interface type="bridge"> <mac address="fa:16:3e:49:04:ce"/> <model type="virtio"/> <source bridge="br-int"/> <target dev="tape30b3c05-12"/> <virtualport type="openvswitch"> <parameters interfaceid="e30b3c05-126c-45bd-ac31-e5eb5481a652"/> </virtualport> </interface> <serial type="file"> <source path="/data1/lib/nova/instances/27f49e5c-8ee0-4a09-8269-5fa31acd2983/console.log"/> </serial> <serial type="pty"/> <input type="tablet" bus="usb"/> <graphics type="vnc" autoport="yes" keymap="en-us" listen="10.13.128.43"/> </devices> </domain>
? -- ??? kerwin
_______________________________________________ libvirt-users mailing list libvirt-users@redhat.com https://www.redhat.com/mailman/listinfo/libvirt-users
participants (2)
-
Jincheng Miao
-
kerwin