Linux Advanced Routing and Traffic Control list
 help / color / mirror / Atom feed
* [LARTC] Any danger in thrashing 'tc'?
@ 2004-03-12  2:44 David McNab
  0 siblings, 0 replies; only message in thread
From: David McNab @ 2004-03-12  2:44 UTC (permalink / raw)
  To: lartc

Hi,

Is there any danger in a prog which repeatedly clears the ingress and 
root egress qdiscs, and sets up new ones, even as frequently as every 
5-15 seconds?

I'm writing a shaper app which dynamically shapes traffic on some weird 
attributes such as:
  * country of remote peer
  * program on local machine (and/or each program's arguments)

The objective is to apply limits to any overseas traffic to/from 
long-running p2p apps, such as I2P and Freenet, to help ADSL users in NZ 
prevent blowing their 'overseas traffic caps' and getting hit with nasty 
bills.

It's based on a loop which:
* does a netstat
* reads /proc/[pid] to get the dirt on each program with an active
   TCP connection
* runs a set of tests (matching for programs to traffic-shape, and how
   they should be traffic-shaped)
* derives from all this a set of ingress and root egress shaping rules
* clears the ingress and root egress qdisc, and fires off n tc commands
   to implement the shaping which is needed in the moment.

As you can see, the prog will be frequently spitting heaps of tc 
commands, constantly taking down the ingress and root egress qdiscs, and 
creating new ones.

So, am I likely to hit on any unintended consequences (apart from the 
minor cpu spikes)?

Thx in advance for your insights.

-- 

Kind regards
David

--

leave this line intact so your email gets through my junk mail filter
_______________________________________________
LARTC mailing list / LARTC@mailman.ds9a.nl
http://mailman.ds9a.nl/mailman/listinfo/lartc HOWTO: http://lartc.org/

^ permalink raw reply	[flat|nested] only message in thread

only message in thread, other threads:[~2004-03-12  2:44 UTC | newest]

Thread overview: (only message) (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2004-03-12  2:44 [LARTC] Any danger in thrashing 'tc'? David McNab

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox