Re: [Vserver] Shares and Reservations in the token-bucket-algorithm

From: Herbert Poetzl <herbert_at_13thfloor.at>
Date: Wed 26 Jul 2006 - 21:04:13 BST
Message-ID: <20060726200413.GA14012@MAIL.13thfloor.at>

On Wed, Jul 26, 2006 at 08:56:32PM +0200, Wilhelm Meier wrote:
> Am Mittwoch, 26. Juli 2006 17:02 schrieb Herbert Poetzl:
>
> > > But what happens if only one vserver has runnable processes?
> >
> > nothing is changed here, i.e. it is still the upper
> > limit of cpu resources, but there is an additional
> > pair of fillrate/interval values, which will kick
> > in when a cpu would go idle (advance idle time)
> >
> > > Then it gets only (fillrate/intervall) of all cpus (not taking
> > > tokensmax and tokensmin into account).
> >
> > from the first token bucket settings, yes
>
> If a cpu goes idle, then the actual (fillrate/intervall) is
> (fillrate/intervall)_1 + (fillrate/intervall)_2 for all vservers?

no, when the cpu is not idle, the 'normal' time
advances and fillrate/interval is used for all
guests, when the cpu goes idle, then 'idle time'
is advanced, and fillrate2/interval2 is used for
all guests havin idle time enabled

> > > Shouldn't this be called a reservation instead of a share?
> >
> > no, because nothing is 'reserved' here, for example
> > if you give 50% to each of your 5 guests, they will
> > not be able to utilize 250% cpu :)
>
> Sure, (fillrate/intervall) is the maximum achievable portion of
> all cpus.

well, except that it can be set on a per cpu basis :)

> > > A share should be the amount of cpus a vserver gets if all
> > > vservers have runnable processes.
> >
> > a misleading term, what if you have three guests
> > running and two are idle? how to calculate shares
> > then?
>
> O.k, this wasn't well written. What I meant was the solaris fss
> algorithm.
>
> > > If one vserver has no runnable processes, then the
> > > cpus should be given proportianal to the active vservers
> > > (at least this is what Solaris-10 does).
> >
> > well, not all solaris does is a good idea per se
> > and I think the current hard cpu scheduler is much
> > more powerful than the solaris proportional stuff
> > (i.e. you can consider the solaris settings a subset
> > of what you can achieve with the hard cpu scheduler)
>
> If the solaris fss is a subset, how do I set the token bucket values?
> With 3 vservers and 0.5 , 0.25 , 0.25 as (fillrate/intervall) for
> these, how do I get 2/3 for the first and 1/3 for the second vserver
> if the third vserver is idle as in the solaris fss case? Where is the
> hidden parameter?

I take it that you 'simply' want fair scheduling
between three guests in a 2:1:1 ratio when all three
guests are hogging cpu, yes?

in this case you simply forget the maximum values
i.e. set them to something very low to give some
kind of minimum amount of tokens per time unit, e.g.
1/100 and use a set of 2:1:1 for the idle time values
e.g. 1/3,1/6 and 1/6. once hard cpu and indle time
is enabled for those guests, they will run in the
specified ratio, as long as host processes do not
consume cpu resources, in which case the remaining
cpu resources will be divided 2:1:1 between them

HTC,
Herbert

> > > In the paper
> > >
> > > http://www.cs.princeton.edu/~mef/research/vserver/paper.pdf
> > >
> > > I found the terms "shares" and "reservations" but I can't find the
> > > point to setup both types of parameters.
> >
> > I'm not sure the current tools already support all
> > the features the scheduler has, but I think they
> > will catch up pretty soon ...
>
> O.k., this would explain my misunderstanding ... then I have to look
> into the sources ;-)
>
> >
> > > I would be glad if someone could explain this to me.
> >
> > when I find some time, I'll write a detailed wiki
> > page about the various parameters and features
>
> This would be of great help.
>
> >
> > HTC,
> > Herbert
> >
> > > --
> > > Wilhelm Meier
> > > email: wilhelm.meier@fh-kl.de
> > > _______________________________________________
> > > Vserver mailing list
> > > Vserver@list.linux-vserver.org
> > > http://list.linux-vserver.org/mailman/listinfo/vserver
>
> --
> Wilhelm Meier
> email: wilhelm.meier@fh-kl.de
_______________________________________________
Vserver mailing list
Vserver@list.linux-vserver.org
http://list.linux-vserver.org/mailman/listinfo/vserver
Received on Wed Jul 26 21:16:11 2006

[Next/Previous Months] [Main vserver Project Homepage] [Howto Subscribe/Unsubscribe] [Paul Sladen's vserver stuff]
Generated on Wed 26 Jul 2006 - 21:16:18 BST by hypermail 2.1.8