Take the 2-minute tour ×
Server Fault is a question and answer site for system and network administrators. It's 100% free, no registration required.

Update: I'm looking for an automated "95th percentile bandwidth limiter". I was originally hoping for something part of the traffic shaping code in the kernel but I think it doesn't exist. I'm aware that I can manually limit at 3Mbps and be safe, but that would be wasting a lot of bandwidth that I could be using.

Original:

Let's assume I have a set of co-located servers and I pay for 3Mbps at 95th percentile. I would like to use as much of that as possible without incurring overage charges. Without any throttling, the servers would generate 10Mbps of traffic, leading to overage charges. What I'm asking is for something that would not throttle at all for 5% of the time becuase the 95th percentile billing rules will throw those out, while keeping me under the 3Mbps the rest of the time.

share|improve this question
    
I don't think that you're wasting "a lot" of bandwidth by not using that 5% overage. However, if you want, you could write a cron job that turns off traffic caps for the last so many hours of the month, or the first so many, or whateer. –  Bill Weiss Aug 24 '09 at 21:04
    
s/whateer/whatever –  Bill Weiss Aug 24 '09 at 21:05
    
Sure I am! If I pay for 3Mps at 95th, and I've got a 100Mpbs line, that's 1.5 days at 100Mbps full blast. That will serve a lot of people quickly. –  kbyrd Sep 2 '09 at 22:51

2 Answers 2

up vote 6 down vote accepted

If you're using linux, check out the Linux Advanced Routing and Traffic Control HOWTO for an introduction on how to use tc and other tools to perform traffic shaping and qos on your link.

There are management systems for tc which abstract away some of the pain, such as MasterShaper and WonderShaper. I've not used either of those, and wondershaper appears to be very poorly maintained, but you might get some use out of them.

Or you can use a bundled firewall/management system like pfsense, m0n0wall, etc.

For a simple task like setting a single cap on traffic, I'd just write a tc script using the LARTC howto though.

And finally, if you want to monitor your link usage to keep a visual and historical record of your utilisation (and your 95th percentile mark), use a tool like cacti or munin to visualise it.

share|improve this answer
1  
I'll edit the question in second to be more clear. I know how to do basic throttling with tc. The problem is the 95th percentile part. I want to have tc (or whatever) dynamically throttle and use everything I am allowed under the 95th percentile rules. –  kbyrd May 31 '09 at 23:13
2  
So use a cron job to turn off TC for one hour a day during your busiest traffic period. That will get you close to the 95% with a bit of leeway for stuff ups. –  Haakon May 31 '09 at 23:39
    
I'm specifically asking for something more automated. The routing machine has all the information it needs. –  kbyrd Jun 1 '09 at 1:05
    
I'll just accept this answer. It's useful even thought I didn't get exactly what I was looking for. I expect the thing I want doesn't exist. –  kbyrd Mar 29 '10 at 16:05

Many routers have the ability to throttle bandwidth to within a Mb/s or so (lots are within a few kb/s, but I like to be cautious) of accuracy. The actual configuration of your router depends a great deal on what router you're using. If you set the throttle at 14Mb/s, you shouldn't have any problems.

As for keeping the pipe filled...well...that part is up to you!

share|improve this answer

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.