Hi all, i know that for each virtual machine i can set up a number of vcpu. But if i want to give only a % of the real CPU? For example: how can i set up a virtual domain for using only 20% of the real CPU? is it possible? Ty in advance D. _______________________________________________ Xen-users mailing list Xen-users@lists.xensource.com http://lists.xensource.com/xen-users
HI Yes you can restrict the virtual machine to use the % of cpu. This can be done through Suppose you have a 2 virtual machine in your system. So you can give a Weight in such a ratio so that one virtual machine can use 20% cpu. For ex: Suppose you have provided the domain0 a weight 1 Command for giving the weight is: xm sched-sedf <domain id> -e 0 -w 1 Vm01 ---virtual machine 1 ---> weight 2 Command for giving the weight is: xm sched-sedf <domain id> -e 0 -w 2 Vm02 ---virtual machine 2 ---> weight 3 Command for giving the weight is: xm sched-sedf <domain id> -e 0 -w 3 And set the extra time option in xm sched-sedf to 0. Now se all the virtual machine will use cpu in this propotion only. 1:2:3 = 16.5%:33%:51% Means domain0 will use only 16.5% cpu Vm01 use only 33% cpu Vm02 use only 51% cpu. I hope it is cleared to you. If you do have any problem let me know I will elaborate it. Thanks and regards Nitesh Gangrade -----Original Message----- From: xen-users-bounces@lists.xensource.com [mailto:xen-users-bounces@lists.xensource.com] On Behalf Of Diego Parasecoli Sent: Friday, July 21, 2006 2:16 PM To: xen-users@lists.xensource.com Subject: [Xen-users] How set up CPU time Hi all, i know that for each virtual machine i can set up a number of vcpu. But if i want to give only a % of the real CPU? For example: how can i set up a virtual domain for using only 20% of the real CPU? is it possible? Ty in advance D. _______________________________________________ Xen-users mailing list Xen-users@lists.xensource.com http://lists.xensource.com/xen-users DISCLAIMER: ----------------------------------------------------------------------------------------------------------------------- The contents of this e-mail and any attachment(s) are confidential and intended for the named recipient(s) only. It shall not attach any liability on the originator or HCL or its affiliates. Any views or opinions presented in this email are solely those of the author and may not necessarily reflect the opinions of HCL or its affiliates. Any form of reproduction, dissemination, copying, disclosure, modification, distribution and / or publication of this message without the prior written consent of the author of this e-mail is strictly prohibited. If you have received this email in error please delete it and notify the sender immediately. Before opening any mail and attachments please check them for viruses and defect. ----------------------------------------------------------------------------------------------------------------------- _______________________________________________ Xen-users mailing list Xen-users@lists.xensource.com http://lists.xensource.com/xen-users
Nitesh Gangarde, Noida ha scritto:> HI > > > Yes you can restrict the virtual machine to use the % of cpu. This can > be done through > Suppose you have a 2 virtual machine in your system. So you can give a > Weight in such a ratio so that one virtual machine can use 20% cpu. > For ex: > Suppose you have provided the domain0 a weight 1 > Command for giving the weight is: xm sched-sedf <domain id> -e 0 -w 1 > Vm01 ---virtual machine 1 ---> weight 2 > Command for giving the weight is: xm sched-sedf <domain id> -e 0 -w 2 > Vm02 ---virtual machine 2 ---> weight 3 > Command for giving the weight is: xm sched-sedf <domain id> -e 0 -w 3 > > And set the extra time option in xm sched-sedf to 0. > > Now se all the virtual machine will use cpu in this propotion only. > 1:2:3 = 16.5%:33%:51% > Means domain0 will use only 16.5% cpu > Vm01 use only 33% cpu > Vm02 use only 51% cpu. > > I hope it is cleared to you. If you do have any problem let me know I > will elaborate it. > > Thanks and regards > Nitesh Gangrade > > > -----Original Message----- > From: xen-users-bounces@lists.xensource.com > [mailto:xen-users-bounces@lists.xensource.com] On Behalf Of Diego > Parasecoli > Sent: Friday, July 21, 2006 2:16 PM > To: xen-users@lists.xensource.com > Subject: [Xen-users] How set up CPU time > > Hi all, > i know that for each virtual machine i can set up a number of vcpu. But > if i want to give only a % of the real CPU? For example: how can i set > up a virtual domain for using only 20% of the real CPU? is it possible? > > Ty in advance > > D. > > > _______________________________________________ > Xen-users mailing list > Xen-users@lists.xensource.com > http://lists.xensource.com/xen-users > > DISCLAIMER: > ----------------------------------------------------------------------------------------------------------------------- > > The contents of this e-mail and any attachment(s) are confidential and intended for the named recipient(s) only. > It shall not attach any liability on the originator or HCL or its affiliates. Any views or opinions presented in > this email are solely those of the author and may not necessarily reflect the opinions of HCL or its affiliates. > Any form of reproduction, dissemination, copying, disclosure, modification, distribution and / or publication of > this message without the prior written consent of the author of this e-mail is strictly prohibited. If you have > received this email in error please delete it and notify the sender immediately. Before opening any mail and > attachments please check them for viruses and defect. > > ----------------------------------------------------------------------------------------------------------------------- > >Ty, so if i want to give only 10% of the cpu time i must set the weight as follow: Dom0 16 Vm01 2 Vm02 2 16:2:2 = 80%:10%:10% Is it right? and this configuration is permanent after a reboot? ty D. _______________________________________________ Xen-users mailing list Xen-users@lists.xensource.com http://lists.xensource.com/xen-users
On Fri, Jul 21 ''06 at 11:40, Diego Parasecoli wrote:> > > i know that for each virtual machine i can set up a number of > > > vcpu. But if i want to give only a % of the real CPU? For example: > > > how can i set up a virtual domain for using only 20% of the real > > > CPU? is it possible? > > > > Yes you can restrict the virtual machine to use the % of cpu. This > > can be done through. > > Suppose you have a 2 virtual machine in your system. So you can give > > a Weight in such a ratio so that one virtual machine can use 20% > > cpu. > > Ty, so if i want to give only 10% of the cpu time i must set the weight > as follow: [ ... ]The version currently in untable (or testing?) supporst a new creditbased sceduler. Unlike the weight based aproace the creditbased is supposed to be more easy to configure and actually work. BTW: Please learn to quote: http://www.netmeister.org/news/learn2quote2.html -- /"\ Goetz Bock at blacknet dot de -- secure mobile Linux everNETting \ / (c) 2006 Creative Commons, Attribution-ShareAlike 2.0 de X [ 1. Use descriptive subjects - 2. Edit a reply for brevity - ] / \ [ 3. Reply to the list - 4. Read the archive *before* you post ] _______________________________________________ Xen-users mailing list Xen-users@lists.xensource.com http://lists.xensource.com/xen-users