You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@cloudstack.apache.org by Yitao Jiang <wi...@gmail.com> on 2014/03/18 08:44:59 UTC
QoS of VIF not working
Hi,
In CirtixResourceBase.java(
https://github.com/apache/cloudstack/blob/4.2.1/plugins/hypervisors/xen/src/com/cloud/hypervisor/xen/resource/CitrixResourceBase.java)
of createVif method , i see that the network rate value will be multiplied
by 128 .
if (nic.getNetworkRateMbps() != null
&& nic.getNetworkRateMbps().intValue() != -1) {
vifr.qosAlgorithmType = "ratelimit";
vifr.qosAlgorithmParams = new HashMap<String, String>();
// convert mbs to kilobyte per second
vifr.qosAlgorithmParams.put("kbps",
Integer.toString(nic.getNetworkRateMbps() * 128));
}
and when i create a service_offering with 1Mb/s QoS, the vm's networking
will be limited in 128Kb/s.
All works fine.
But what i wanna do is when a service_offering with 1Mb/s then the vm will
be limited in 1Kb/s,so I change the coded like that
vifr.qosAlgorithmParams.put("kbps",
Integer.toString(nic.getNetworkRateMbps()));
without multiplied by 128.
But acctualy the vm still limit in 128Kb/s.
Did i miss anyting?
My environments is :
CS 4.2.1
Xenserver 6.2.0
Thanks,
Yitao
Re: QoS of VIF not working
Posted by Yitao Jiang <wi...@gmail.com>.
Sorry,guys it's my mistake.i set up two mgmt server and forget to sync
codes to another.
On Mar 18, 2014 3:44 PM, "Yitao Jiang" <wi...@gmail.com> wrote:
> Hi,
>
> In CirtixResourceBase.java(
> https://github.com/apache/cloudstack/blob/4.2.1/plugins/hypervisors/xen/src/com/cloud/hypervisor/xen/resource/CitrixResourceBase.java)
> of createVif method , i see that the network rate value will be multiplied
> by 128 .
> if (nic.getNetworkRateMbps() != null
> && nic.getNetworkRateMbps().intValue() != -1) {
> vifr.qosAlgorithmType = "ratelimit";
> vifr.qosAlgorithmParams = new HashMap<String, String>();
> // convert mbs to kilobyte per second
> vifr.qosAlgorithmParams.put("kbps",
> Integer.toString(nic.getNetworkRateMbps() * 128));
> }
> and when i create a service_offering with 1Mb/s QoS, the vm's networking
> will be limited in 128Kb/s.
> All works fine.
>
> But what i wanna do is when a service_offering with 1Mb/s then the vm will
> be limited in 1Kb/s,so I change the coded like that
> vifr.qosAlgorithmParams.put("kbps",
> Integer.toString(nic.getNetworkRateMbps()));
> without multiplied by 128.
>
> But acctualy the vm still limit in 128Kb/s.
>
> Did i miss anyting?
>
> My environments is :
> CS 4.2.1
> Xenserver 6.2.0
>
> Thanks,
>
> Yitao
>
Re: QoS of VIF not working
Posted by Yitao Jiang <wi...@gmail.com>.
Ok, just a minute
Thanks,
Yitao
2014-03-18 15:49 GMT+08:00 Rajesh Battala <ra...@citrix.com>:
> HI Yitao,
> Can you please raise a bug for the same with your findings.
>
> Thanks
> Rajesh Battala
>
> -----Original Message-----
> From: Yitao Jiang [mailto:willierjyt@gmail.com]
> Sent: Tuesday, March 18, 2014 1:15 PM
> To: dev@cloudstack.apache.org
> Subject: QoS of VIF not working
>
> Hi,
>
> In CirtixResourceBase.java(
>
> https://github.com/apache/cloudstack/blob/4.2.1/plugins/hypervisors/xen/src/com/cloud/hypervisor/xen/resource/CitrixResourceBase.java
> )
> of createVif method , i see that the network rate value will be multiplied
> by 128 .
> if (nic.getNetworkRateMbps() != null
> && nic.getNetworkRateMbps().intValue() != -1) { vifr.qosAlgorithmType =
> "ratelimit"; vifr.qosAlgorithmParams = new HashMap<String, String>(); //
> convert mbs to kilobyte per second vifr.qosAlgorithmParams.put("kbps",
> Integer.toString(nic.getNetworkRateMbps() * 128)); } and when i create a
> service_offering with 1Mb/s QoS, the vm's networking will be limited in
> 128Kb/s.
> All works fine.
>
> But what i wanna do is when a service_offering with 1Mb/s then the vm will
> be limited in 1Kb/s,so I change the coded like that
> vifr.qosAlgorithmParams.put("kbps",
> Integer.toString(nic.getNetworkRateMbps()));
> without multiplied by 128.
>
> But acctualy the vm still limit in 128Kb/s.
>
> Did i miss anyting?
>
> My environments is :
> CS 4.2.1
> Xenserver 6.2.0
>
> Thanks,
>
> Yitao
>
RE: QoS of VIF not working
Posted by Rajesh Battala <ra...@citrix.com>.
HI Yitao,
Can you please raise a bug for the same with your findings.
Thanks
Rajesh Battala
-----Original Message-----
From: Yitao Jiang [mailto:willierjyt@gmail.com]
Sent: Tuesday, March 18, 2014 1:15 PM
To: dev@cloudstack.apache.org
Subject: QoS of VIF not working
Hi,
In CirtixResourceBase.java(
https://github.com/apache/cloudstack/blob/4.2.1/plugins/hypervisors/xen/src/com/cloud/hypervisor/xen/resource/CitrixResourceBase.java)
of createVif method , i see that the network rate value will be multiplied by 128 .
if (nic.getNetworkRateMbps() != null
&& nic.getNetworkRateMbps().intValue() != -1) { vifr.qosAlgorithmType = "ratelimit"; vifr.qosAlgorithmParams = new HashMap<String, String>(); // convert mbs to kilobyte per second vifr.qosAlgorithmParams.put("kbps",
Integer.toString(nic.getNetworkRateMbps() * 128)); } and when i create a service_offering with 1Mb/s QoS, the vm's networking will be limited in 128Kb/s.
All works fine.
But what i wanna do is when a service_offering with 1Mb/s then the vm will be limited in 1Kb/s,so I change the coded like that
vifr.qosAlgorithmParams.put("kbps",
Integer.toString(nic.getNetworkRateMbps()));
without multiplied by 128.
But acctualy the vm still limit in 128Kb/s.
Did i miss anyting?
My environments is :
CS 4.2.1
Xenserver 6.2.0
Thanks,
Yitao