Re: Rate limiting with "tc"?
- From: Rick Jones <rick.jones2@xxxxxx>
- Date: Wed, 24 Sep 2008 17:14:36 +0000 (UTC)
Ravenpi <ken@xxxxxxxx> wrote:
Hi, all. My company has a reasonably large pipe to the Internet;
however, certain large transfers (e.g., our hourly database
replication with our offsite server) spike the usage. I'd like to
limit our traffic, both inbound and outbound, such that no single
user can use more than 50% of our bandwidth.
No single _user_ as in the sum of her connections, or do you mean no
single connection/flow?
I've poked around, and it seems that the best way to accomplish this
is by way of the "tc" command... unfortunately, its documentation
is, ummmm... "in depth." While I'm willing to wade through it, and
play with trial-and-error, this is one of those times where I just
want that one magic command, and then I'll move on. So any help
would be greatly appreciated.
What is used to implement this hourly database replication? Is it a
transfer via TCP?
Ostensibly the congestion control and avoidance stuff is supposed to
do the "reasonably right thing" wrt sharing the bandwidth. Are you
simply concerned that the utilization gets high, or does it actually
meaninfully affect other uses of the link?
One limit to the performance of a TCP connection is:
Throughput < Window/RTT
The Window in Linux will be bound by the socket buffer size, which can
be controlled via some sysctls for defaults (look at sysctl -a | grep
wmem; sysctl -a | grep rmem; etc) or applications can make explicit
setsockopt() calls.
Assuming you have a reasonable estimate for the RTT to the replication
site you could use that knowledge to cap the window sizes and so keep
TCP from being able to use more bandwidth than desired without having
to use tc.
Not suggesting you _don't_ use tc, just offering another possiblity.
rick jones
--
portable adj, code that compiles under more than one compiler
these opinions are mine, all mine; HP might not want them anyway... :)
feel free to post, OR email to rick.jones2 in hp.com but NOT BOTH...
.
- References:
- Rate limiting with "tc"?
- From: Ravenpi
- Rate limiting with "tc"?
- Prev by Date: LTSP Thin Client Configuration
- Next by Date: Re: Netgear RP614 leaking
- Previous by thread: Rate limiting with "tc"?
- Next by thread: Re: Rate limiting with "tc"?
- Index(es):
Relevant Pages
|