* Iptables execution time
@ 2008-10-16 17:29 Michele Petrazzo - Unipex srl
2008-10-16 17:48 ` Pablo Neira Ayuso
0 siblings, 1 reply; 4+ messages in thread
From: Michele Petrazzo - Unipex srl @ 2008-10-16 17:29 UTC (permalink / raw)
To: netfilter
Hi list,
I'm seeing that the execution of an iptables update via a shell script
take very different time into a my "in production" server and on my test
server. My script has about 1500 iptables commands and simple insert a
rule on a table.
On my in production server, it takes about 45 sec and on my test server 4!
My server are 2x Xeon 2.6GHz (so 4 cpus) with 2.6.26 on x86_64 SMP with
2GB ram and my test server amd 3000+ with 2.6.26 i686 1GB,
Can be that, on the production server that has a lot of connection it
take so lot of time due the connections (I try to say that it has to "lock"
the kernel before and "unlock" after an iptables add) or there can be some
problems?
Thanks,
Michele
P.s. Yes, I know that the same rules with iptables-restore on my test
server takes about 0.5 sec :)
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: Iptables execution time
2008-10-16 17:29 Iptables execution time Michele Petrazzo - Unipex srl
@ 2008-10-16 17:48 ` Pablo Neira Ayuso
2008-10-16 18:17 ` Michele Petrazzo - Unipex srl
0 siblings, 1 reply; 4+ messages in thread
From: Pablo Neira Ayuso @ 2008-10-16 17:48 UTC (permalink / raw)
To: Michele Petrazzo - Unipex srl; +Cc: netfilter
Michele Petrazzo - Unipex srl wrote:
> Hi list,
> I'm seeing that the execution of an iptables update via a shell script
> take very different time into a my "in production" server and on my test
> server. My script has about 1500 iptables commands and simple insert a
> rule on a table.
>
> On my in production server, it takes about 45 sec and on my test server 4!
> My server are 2x Xeon 2.6GHz (so 4 cpus) with 2.6.26 on x86_64 SMP with
> 2GB ram and my test server amd 3000+ with 2.6.26 i686 1GB,
>
> Can be that, on the production server that has a lot of connection it
> take so lot of time due the connections (I try to say that it has to "lock"
> the kernel before and "unlock" after an iptables add) or there can be some
> problems?
I think that it's taking the time in forking and executing, but you can
do some profiling so we can stop speculating.
> P.s. Yes, I know that the same rules with iptables-restore on my test
> server takes about 0.5 sec :)
So, why don't you use that interface? :)
--
"Los honestos son inadaptados sociales" -- Les Luthiers
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: Iptables execution time
2008-10-16 17:48 ` Pablo Neira Ayuso
@ 2008-10-16 18:17 ` Michele Petrazzo - Unipex srl
[not found] ` <002301c92fe5$3234ff00$969efd00$@bourke@mobileinternet.com>
0 siblings, 1 reply; 4+ messages in thread
From: Michele Petrazzo - Unipex srl @ 2008-10-16 18:17 UTC (permalink / raw)
To: Pablo Neira Ayuso; +Cc: netfilter
Pablo Neira Ayuso wrote:
> I think that it's taking the time in forking and executing, but you
> can do some profiling so we can stop speculating.
>
How do it? It's a "simple" script that repeater N times that same thing,
more or less (where N are ~1500)
And after, also if it's not a iptables-related question, why that so
time for do the fork and execute when It's, at least, two time faster
than the test one?
>> P.s. Yes, I know that the same rules with iptables-restore on my
>> test server takes about 0.5 sec :)
>
> So, why don't you use that interface? :)
>
Why leave the right way for follow the new one that you don't know where
it'll bing you? :). Ok I'll take a look for update my script system!
Thanks,
Michele
^ permalink raw reply [flat|nested] 4+ messages in thread
end of thread, other threads:[~2008-10-17 11:53 UTC | newest]
Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2008-10-16 17:29 Iptables execution time Michele Petrazzo - Unipex srl
2008-10-16 17:48 ` Pablo Neira Ayuso
2008-10-16 18:17 ` Michele Petrazzo - Unipex srl
[not found] ` <002301c92fe5$3234ff00$969efd00$@bourke@mobileinternet.com>
2008-10-17 11:53 ` Pablo Neira Ayuso
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.