linux-um archives
 help / color / mirror / Atom feed
From: "roland" <for_spam@gmx.de>
To: "Christopher S. Aker" <caker@theshore.net>,
	uml-devel <user-mode-linux-devel@lists.sourceforge.net>
Subject: Re: [uml-devel] [PATCH] I/O-Request Token Bucket Limiter
Date: Sun, 28 Mar 2004 14:28:47 +0200	[thread overview]
Message-ID: <0c2101c414c0$3b2c6ca0$2000000a@schlepptopp> (raw)
In-Reply-To: 004901c414a3$f4d28a80$0201a8c0@hawk

hello christoph, 
could you please explain (in a simple way), what your patch can be used for?
from my point of understanding, we now can limit the maximum i/o bandwidth a single uml can use?
is that right?
i have difficulties in understanding the meaning of token/bucket/filter.

regards
roland


----- Original Message ----- 
From: "Christopher S. Aker" <caker@theshore.net>
To: "uml-devel" <user-mode-linux-devel@lists.sourceforge.net>
Sent: Sunday, March 28, 2004 11:06 AM
Subject: [uml-devel] [PATCH] I/O-Request Token Bucket Limiter


> Patch is also available here:
> http://www.theshore.net/~caker/patches/
> 
> Apply to a tree already patched with 2.4-um or 2.6-um.
> 
> -Chris
> 
> ---token-limiter-v1.README---
> 
> This patch implements a simple token bucket filter/limiter on requests
> processed through the async io_thread.  It will work with or without COW,
> but not on ubd devices in sync mode.
> 
> * Two new command line arguments for setting at boot-time:
> 
> token_max=60000
>     This sets the maximum tokens in the token-bucket I/O request limiter.
>     Each io_thread request subtracts one token from the bucket.  The bucket
>     is supplied with <token_refill> tokens every second.  When the bucket
>     becomes empty, I/O requests are throttled to the <token_refill> rate.
> 
> token_refill=2000
>     This sets the bucket's refill rate, adding <token_refill> tokens to the
>     bucket every second. This becomes the I/O request rate when the bucket
>     becomes empty.
> 
> * Three new mconsole commands to get status information and change the two 
> variables above:
> 
> (mconsole) help
>     io_status - Return current I/O status and settings
>     io_token_max <num> - sets the bucket size
>     io_token_refill <num> - number of tokens to add each second
> 
> * Example io_status output while:
> 
> idle:
> io_count=1845202 io_rate=0 io_tokens=50000 token_refill=1024 \
> token_max=50000
> 
> bursting:
> io_count=1861594 io_rate=6806 io_tokens=35754 token_refill=1024 \
> token_max=50000
> 
> throttled:
> io_count=1994811 io_rate=1087 io_tokens=-153 token_refill=1024 \
> token_max=50000 
> io_count=2052289 io_rate=1057 io_tokens=-286 token_refill=1024 \
> token_max=50000
> io_count=2067794 io_rate=1015 io_tokens=-132 token_refill=1024 \
> token_max=50000
> 
> Our sample shows io_tokens being negative, but - while waiting for the bucket 
> to be re-supplied, requests will still dribble through no faster than 
> token_refill req/second. Or, perhaps this is due to inaccuracies of nanosleep
> or a bug in my logic.
> 
> * TODO
> Stop using an alarm in the io_thread, and instead use gettimeofday to 
> calculate the token credits due and io_rate.
> 
> 
> 


-------------------------------------------------------
This SF.Net email is sponsored by: IBM Linux Tutorials
Free Linux tutorial presented by Daniel Robbins, President and CEO of
GenToo technologies. Learn everything from fundamentals to system
administration.http://ads.osdn.com/?ad_id=1470&alloc_id=3638&op=click
_______________________________________________
User-mode-linux-devel mailing list
User-mode-linux-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/user-mode-linux-devel

  parent reply	other threads:[~2004-03-28 12:22 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2004-03-28  9:06 [uml-devel] [PATCH] I/O-Request Token Bucket Limiter Christopher S. Aker
2004-03-28  9:52 ` Christopher S. Aker
2004-03-28 12:28 ` roland [this message]
2004-03-28 13:41   ` Christopher S. Aker
2004-03-28 16:18     ` roland
2004-03-28 18:26       ` BlaisorBlade
2004-05-28 11:13 ` roland

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to='0c2101c414c0$3b2c6ca0$2000000a@schlepptopp' \
    --to=for_spam@gmx.de \
    --cc=caker@theshore.net \
    --cc=user-mode-linux-devel@lists.sourceforge.net \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox