All of lore.kernel.org
 help / color / mirror / Atom feed
* long ruleset perfomance issue
@ 2005-04-04 11:44 anton
  2005-04-04 12:34 ` John A. Sullivan III
  2005-04-04 15:35 ` Grant Taylor
  0 siblings, 2 replies; 4+ messages in thread
From: anton @ 2005-04-04 11:44 UTC (permalink / raw)
  To: netfilter

Hello,
I need to mark packets going through a linux router with iptables for some 4500 ip addresses(to use with tc bandwidth shaping filters).
This list needs to be updated every 10 minutes.
So i made a shell script file looking like:

/usr/local/sbin/iptables -F 
/usr/local/sbin/iptables -A FORWARD -t mangle -d 1.1.1.1 -j MARK --set-mark 1
/usr/local/sbin/iptables -A FORWARD -t mangle -d 1.1.1.3 -j MARK --set-mark 2
/usr/local/sbin/iptables -A FORWARD -t mangle -d 1.1.1.2 -j MARK --set-mark 1
and so on for 4500 times.

When i run this script on Xeon 2.4ghz cpu it takes 2-3 minutes real time with 100% cpu load to process.
During this time server becomes unusable. 
Is there any way to make it run faster, like optimizing ruleset or trying a different approach?
I have tried to search on this issue but was not successful.

Any input is greatly appreciatred.

Thank you,
Anton


^ permalink raw reply	[flat|nested] 4+ messages in thread

end of thread, other threads:[~2005-04-05  6:46 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2005-04-04 11:44 long ruleset perfomance issue anton
2005-04-04 12:34 ` John A. Sullivan III
2005-04-04 15:35 ` Grant Taylor
2005-04-05  6:46   ` Jozsef Kadlecsik

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.