[libvirt-users] Does Set Block IO tune take effect in the same session.

Hello All, I am using virDomainSetBlockIoTune() API to set the IO tune parameter for a running guest VM. I observed that after setting the value succesfully i ned to Shutdown and start the VM inorder to take the set value in effect. Is there any way with which these values come in effect in the same session of the VM without Shutting down and starting the VM. Please help regards, Vikrant

Hello All, I am using virDomainSetBlockIoTune() API to set the IO tune parameter for a running guest VM. I observed that after setting the value succesfully i need to Shutdown and Start the VM inorder to take the set value in effect. Is there any way with which these values come in effect in the same session of the VM without Shutting down and starting the VM. Please help regards, Vikrant

Hello All, I am using virDomainSetInterfaceParameters() API to set the network interface tune parameter for a running guest VM. I am able to set the Inbound and Outbound values successfully, but not sure how to test it. I tried scp command to copy a file from host to VM but i am not observing the desired throttling over the network. Is there any other way to test network throttling or do i missing something. Please help regards, Vikrant

On 27.05.2013 08:56, vikrant verma wrote:
Hello All,
I am using virDomainSetInterfaceParameters() API to set the network interface tune parameter for a running guest VM.
I am able to set the Inbound and Outbound values successfully, but not sure how to test it. I tried scp command to copy a file from host to VM but i am not observing the desired throttling over the network.
Is there any other way to test network throttling or do i missing something.
Please help
regards, Vikrant
commit 0ac3baee2c2fd56ef89f24f5ea484e39d2bf35f5 Author: Eiichi Tsukata <eiichi.tsukata.xh@hitachi.com> AuthorDate: Fri Jun 29 15:09:16 2012 +0900 Commit: Michal Privoznik <mprivozn@redhat.com> CommitDate: Fri Jun 29 10:56:13 2012 +0200 Fix vm's outbound traffic control problem ... http://libvirt.org/git/?p=libvirt.git;a=commitdiff;h=0ac3baee2c2fd56ef89f24f... The commit is included in the 0.9.13 release. Michal

On 27.05.2013 09:21, Michal Privoznik wrote:
On 27.05.2013 08:56, vikrant verma wrote:
Hello All,
I am using virDomainSetInterfaceParameters() API to set the network interface tune parameter for a running guest VM.
I am able to set the Inbound and Outbound values successfully, but not sure how to test it. I tried scp command to copy a file from host to VM but i am not observing the desired throttling over the network.
Is there any other way to test network throttling or do i missing something.
Please help
regards, Vikrant
Huh, I had a prologue written here but it disappeared :) There was an error in setting the correct QoS values. There's a patch fixing it:
commit 0ac3baee2c2fd56ef89f24f5ea484e39d2bf35f5 Author: Eiichi Tsukata <eiichi.tsukata.xh@hitachi.com> AuthorDate: Fri Jun 29 15:09:16 2012 +0900 Commit: Michal Privoznik <mprivozn@redhat.com> CommitDate: Fri Jun 29 10:56:13 2012 +0200
Fix vm's outbound traffic control problem ...
http://libvirt.org/git/?p=libvirt.git;a=commitdiff;h=0ac3baee2c2fd56ef89f24f...
The commit is included in the 0.9.13 release.
Michal

Hello Michal, Thanks for the reply. I am using libvirt version 1.0.2 , so how should i proceed. Do i need this patch? Regards, Vikrant On Mon, May 27, 2013 at 12:55 PM, Michal Privoznik <mprivozn@redhat.com>wrote:
On 27.05.2013 09:21, Michal Privoznik wrote:
On 27.05.2013 08:56, vikrant verma wrote:
Hello All,
I am using virDomainSetInterfaceParameters() API to set the network interface tune parameter for a running guest VM.
I am able to set the Inbound and Outbound values successfully, but not sure how to test it. I tried scp command to copy a file from host to VM but i am not observing the desired throttling over the network.
Is there any other way to test network throttling or do i missing something.
Please help
regards, Vikrant
Huh, I had a prologue written here but it disappeared :)
There was an error in setting the correct QoS values. There's a patch fixing it:
commit 0ac3baee2c2fd56ef89f24f5ea484e39d2bf35f5 Author: Eiichi Tsukata <eiichi.tsukata.xh@hitachi.com> AuthorDate: Fri Jun 29 15:09:16 2012 +0900 Commit: Michal Privoznik <mprivozn@redhat.com> CommitDate: Fri Jun 29 10:56:13 2012 +0200
Fix vm's outbound traffic control problem ...
http://libvirt.org/git/?p=libvirt.git;a=commitdiff;h=0ac3baee2c2fd56ef89f24f...
The commit is included in the 0.9.13 release.
Michal

On 27.05.2013 10:25, vikrant verma wrote:
Hello Michal,
Thanks for the reply.
I am using libvirt version 1.0.2 , so how should i proceed. Do i need this patch?
You already are using it. So I wonder what is the actual bandwidth you are using. Can you share the setting and actual bandwidth (scp is just fine - but consider copying bigger files - e.g. 700MB iso image). Michal

Hello Michal, I am using the following code - virDomainSetInterfaceParameters(dom, "vnet0", networkParainfoPtr, nparams,0); before calling this i am assigning the following Inbound values inbound.average = 10 (10 kbps) inbound .peak = 10 inbound.burst = 10 Outbound values are zero (default) after calling the API it return success and i am able to see the assigned values in dumpxml of the VM ( so it is cross verified that the values are set ) Now for testing inbound throttling i am using scp command -> i am copying 400MB file from host machine to VM. But what i am onserving is it taking the bandwidth more than 10 kbps ( even it reaches to Mbps sometime) Regards, Vikrant On Mon, May 27, 2013 at 1:59 PM, Michal Privoznik <mprivozn@redhat.com>wrote:
On 27.05.2013 10:25, vikrant verma wrote:
Hello Michal,
Thanks for the reply.
I am using libvirt version 1.0.2 , so how should i proceed. Do i need this patch?
You already are using it. So I wonder what is the actual bandwidth you are using. Can you share the setting and actual bandwidth (scp is just fine - but consider copying bigger files - e.g. 700MB iso image).
Michal

On 27.05.2013 12:36, vikrant verma wrote:
Hello Michal,
I am using the following code -
virDomainSetInterfaceParameters(dom, "vnet0", networkParainfoPtr, nparams,0);
before calling this i am assigning the following Inbound values
inbound.average = 10 (10 kbps) inbound .peak = 10 inbound.burst = 10
I suspect this way too low burst value. Try leaving the limit and it should work correctly. Michal

Hello Michal, Throttling is working now after setting inbound.average = 10 (i have set other values to 0 ) But i am observing an inconsistent behavior in the observed throttling bandwidth when i set inbound.average = 10 , i observed bandwidth of 24 kbps when i set inbound.average = 100 , i observed bandwidth of 186 kbps when i set inbound.average = 1024 , i observed bandwidth of 2MBps i measured the above by doing scp of a 4MB file from host to VM. Is this behavior is expected? Regards, Vikrant On Tue, May 28, 2013 at 6:57 PM, Michal Privoznik <mprivozn@redhat.com>wrote:
On 27.05.2013 12:36, vikrant verma wrote:
Hello Michal,
I am using the following code -
virDomainSetInterfaceParameters(dom, "vnet0", networkParainfoPtr, nparams,0);
before calling this i am assigning the following Inbound values
inbound.average = 10 (10 kbps) inbound .peak = 10 inbound.burst = 10
I suspect this way too low burst value. Try leaving the limit and it should work correctly.
Michal

On 31.05.2013 07:05, vikrant verma wrote:
Hello Michal,
Throttling is working now after setting inbound.average = 10 (i have set other values to 0 ) But i am observing an inconsistent behavior in the observed throttling bandwidth
when i set inbound.average = 10 , i observed bandwidth of 24 kbps when i set inbound.average = 100 , i observed bandwidth of 186 kbps when i set inbound.average = 1024 , i observed bandwidth of 2MBps
i measured the above by doing scp of a 4MB file from host to VM. Is this behavior is expected?
I don't think so. So your other values are set to 0? Can you share the actual <bandwidth/> element from 'virsh dumxpl $dom'? However, I might be hitting the same issue: # tc -s class show dev vnet0 class htb 1:1 root leaf 2: prio 0 rate 80000bit ceil 80000bit burst 1600b cburst 1600b Sent 5146972 bytes 3540 pkt (dropped 0, overlimits 0 requeues 0) rate 536752bit 45pps backlog 0b 4p requeues 0 lended: 359 borrowed: 0 giants: 0 tokens: -937499999 ctokens: -937499999 class sfq 2:36c parent 2: (dropped 0, overlimits 0 requeues 0) backlog 103018b 4p requeues 0 allot 1520 We can see both rate and ceil being 80kbit however the current rate being 536kbit. I wonder what's going on and how to fix this.
Regards, Vikrant
Michal

Hi Michal, Thanks for the analysis, please find the interface details of the dumpxml $dom <interface type='network'> <mac address='52:54:00:4f:8d:cd'/> <source network='default'/> <target dev='vnet0'/> <bandwidth> <inbound average='10'/> </bandwidth> <alias name='net0'/> <address type='pci' domain='0x0000' bus='0x00' slot='0x03' function='0x0'/> </interface> Regards, Vikrant On Fri, May 31, 2013 at 2:58 PM, Michal Privoznik <mprivozn@redhat.com>wrote:
On 31.05.2013 07:05, vikrant verma wrote:
Hello Michal,
Throttling is working now after setting inbound.average = 10 (i have set other values to 0 ) But i am observing an inconsistent behavior in the observed throttling bandwidth
when i set inbound.average = 10 , i observed bandwidth of 24 kbps when i set inbound.average = 100 , i observed bandwidth of 186 kbps when i set inbound.average = 1024 , i observed bandwidth of 2MBps
i measured the above by doing scp of a 4MB file from host to VM. Is this behavior is expected?
I don't think so. So your other values are set to 0? Can you share the actual <bandwidth/> element from 'virsh dumxpl $dom'?
However, I might be hitting the same issue:
# tc -s class show dev vnet0 class htb 1:1 root leaf 2: prio 0 rate 80000bit ceil 80000bit burst 1600b cburst 1600b Sent 5146972 bytes 3540 pkt (dropped 0, overlimits 0 requeues 0) rate 536752bit 45pps backlog 0b 4p requeues 0 lended: 359 borrowed: 0 giants: 0 tokens: -937499999 ctokens: -937499999
class sfq 2:36c parent 2: (dropped 0, overlimits 0 requeues 0) backlog 103018b 4p requeues 0 allot 1520
We can see both rate and ceil being 80kbit however the current rate being 536kbit. I wonder what's going on and how to fix this.
Regards, Vikrant
Michal
participants (2)
-
Michal Privoznik
-
vikrant verma