On Mon, Jun 15, 2015 at 10:12:12PM -0700, Sarah Newman wrote:
> xen has a credit based scheduler for outgoing bandwidth. I haven't
> extensively tested it but since it's credit based it should allow for
> the occasional spike. I assume there's also some kind of exponential
> decay for the credits or a maximum amount or something but I haven't
> confirmed.
Ah, yes; a per-VM token-bucket approach would make sense as to how to
handle this. I don't know specifically about Xen, but token-buckets
typically come with two knobs: the long-term-average rate and the
short-term-burst volume. Essentially, the bucket can never hold
more than Burst tokens, tokens are consumed in direct concert with
the controlled resource, and the bucket gets refilled at the rate of
Average-rate tokens per unit time.
More concretely, using arbritrary values and assuming that Xen does
indeed use token-buckets for this, I'd guess that you would set
something like:
Network-Bandwidth: Limit 12 MB/s, Burst 180 MB
allowing a burst of up to 180 MB at full (hardware limited) rates,
with a maximum overall average rate of 12 MB/s. The ability to burst
is recharged whenever the average usage rate is below the maximum,
e.g., 15 s to fully refill the bucket if no activity or 90 s to fully
refill if user is averaging 10 MB/s.
My suggestion earlier in this thread applies to selecting the average
rate. I have no particular inspiration for what a good burst volume
would be for prgmr.com, though I've typically used an heuristic of
somewhere between 10 seconds and one minute worth of average-rate
volume when I've had occasion to set up token-buckets.
Hmmm, hopefully this was interesting, even if not helpful,
--Ken Pizzini
_______________________________________________
discuss mailing list
[email protected]
http://lists.prgmr.com/mailman/listinfo/discuss