Volo M.
2017-Nov-02 13:03 UTC
[libvirt-users] What global_quota option mean? What's its logic?
Hi techs, Could you please explain or refer me to documentation where I could find a description of global_quota schedinfo option. Someone told me that it could mean a cpu limitation in percents like: global_quota : 25000 (does it mean cpu limit % set to 25 ?) Is it true? What other parameters mean in below output? I didn't find any related documentation at libvirt.org. Could you help me to describe me or refer to some description what below schedinfo options mean? Thanks. [root@cpkvm ~]# virsh list Id Name State ---------------------------------------------------- 3 kvmtestvm running [root@cpkvm ~]# virsh schedinfo 3 Scheduler : posix cpu_shares : 154 vcpu_period : 100000 vcpu_quota : -1 emulator_period: 100000 emulator_quota : -1 global_period : 100000 global_quota : -1 iothread_period: 100000 iothread_quota : -1 [root@cpkvm ~]# virsh schedinfo 3 --set global_quota=25 Scheduler : posix error: invalid argument: value of 'global_quota' is out of range [1000, 18446744073709551] [1000, 18446744073709551] - what this range mean? [root@cpkvm ~]# [root@cpkvm ~]# virsh schedinfo 3 --set global_quota=25000 Scheduler : posix cpu_shares : 154 vcpu_period : 100000 vcpu_quota : 12500 emulator_period: 100000 emulator_quota : -1 global_period : 100000 global_quota : 25000 iothread_period: 100000 iothread_quota : 25000 [root@cpkvm ~]#
Ján Tomko
2017-Nov-02 15:58 UTC
Re: [libvirt-users] What global_quota option mean? What's its logic?
On Thu, Nov 02, 2017 at 03:03:56PM +0200, Volo M. wrote:>Hi techs, > >Could you please explain or refer me to documentation where I could find a >description of global_quota schedinfo option. Someone told me that it could >mean a cpu limitation in percents like: >global_quota : 25000 (does it mean cpu limit % set to 25 ?) >The _quota values are relative to the _period, both in milliseconds and refer to the cumulative CPU time available to all the processes/threads in a group. See the documentation in the kernel: https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/tree/Documentation/scheduler/sched-bwc.txt So with global_period being set to 100000, a value of 25000 would mean that all the threads of the virtual machine would be limited to use at most 25 % of 1 CPU.>Is it true? >What other parameters mean in below output? >I didn't find any related documentation at libvirt.org. >Could you help me to describe me or refer to some description what below >schedinfo options mean? Thanks. >[...]> >[root@cpkvm ~]# virsh schedinfo 3 --set global_quota=25 > >Scheduler : posix > >error: invalid argument: value of 'global_quota' is out of range [1000, >18446744073709551] > >[1000, 18446744073709551] - what this range mean? >These are the minimum and maximum values that were accepted by the kernel at the time when this error message was implemented in libvirt. Jan
Thiago Oliveira
2017-Nov-03 23:35 UTC
Re: [libvirt-users] What global_quota option mean? What's its logic?
Very interesting! I did this configuration and I can see my core working just in 25%. I would like to try the same with memory.....I am looking for that. Thanks. 2017-11-02 13:58 GMT-02:00 Ján Tomko <jtomko@redhat.com>:> On Thu, Nov 02, 2017 at 03:03:56PM +0200, Volo M. wrote: > >> Hi techs, >> >> Could you please explain or refer me to documentation where I could find a >> description of global_quota schedinfo option. Someone told me that it >> could >> mean a cpu limitation in percents like: >> global_quota : 25000 (does it mean cpu limit % set to 25 ?) >> >> > The _quota values are relative to the _period, both in milliseconds and > refer > to the cumulative CPU time available to all the processes/threads in a > group. > > See the documentation in the kernel: > https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/lin > ux.git/tree/Documentation/scheduler/sched-bwc.txt > > So with global_period being set to 100000, a value of 25000 would mean > that all the threads of the virtual machine would be limited to use at > most 25 % of 1 CPU. > > Is it true? >> What other parameters mean in below output? >> I didn't find any related documentation at libvirt.org. >> Could you help me to describe me or refer to some description what below >> schedinfo options mean? Thanks. >> >> > [...] > > >> [root@cpkvm ~]# virsh schedinfo 3 --set global_quota=25 >> >> Scheduler : posix >> >> error: invalid argument: value of 'global_quota' is out of range [1000, >> 18446744073709551] >> >> [1000, 18446744073709551] - what this range mean? >> >> > These are the minimum and maximum values that were accepted by the > kernel at the time when this error message was implemented in libvirt. > > Jan > > _______________________________________________ > libvirt-users mailing list > libvirt-users@redhat.com > https://www.redhat.com/mailman/listinfo/libvirt-users >