RE: iptable_nat module slows/hoses my Redhat 9.0 box

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Hello Harald & All,

Thanks for your reply. Eventhough I don't use NAT now, I will have to use it
soon. 

Connection setup really sucks after 'iptable_nat' module is inserted, my
Pentium-4 RH9.0 box hangs with 7Mbps traffic using 20,000 concurrent UDP
streams.

Are there any tweaks that I can do in NAT code to increase performance of
NAT, like: increase NAT hash-table size(I have got 1G RAM) or change hash
algorithm etc?. 

For e.g: based on a recommendation from netfilter FAQ, I passed an
odd-number(not a power of 2) as 'hashsize' parameter value  to
'ip_conntrack' module,  session-setup performance improved a lot after that
in my tests when UDP packet streams with incrementing source IP address are
sent. But this 'hashsize' tweak did not improve session-setup performance
when UDP streams with incrementing destination IP address are sent.

Is connection setup slow because of hash collisions i.e due to lot of
connections getting hashed to same hash-bucket? or it due to lot of
memcopies?. Can you please give some specific reasons for poor performance
of NAT, it will help me in optimizing/tuning, if possible, that specifc part
of netfilter nat functionality.

Thanks,
Kishore


-----Original Message-----
From: Harald Welte
To: Kishore Dharmavaram
Cc: 'netfilter@xxxxxxxxxxxxxxxxxxx'; 'netfilter-devel@xxxxxxxxxxxxxxxxxxx'
Sent: 12/11/2003 11:13 PM
Subject: Re: iptable_nat module slows/hoses my Redhat 9.0 box

On Thu, Dec 11, 2003 at 09:47:25PM -0800, Kishore Dharmavaram wrote:
> Hi All,
> 
> I find that after inserting "iptable_nat" module on my
RH9.0(2.4.20-19.9)
> box, session-setup(ip_conntrack)  performance gets very bad. 

yes, that's true.  I think we cannot state often enogh: DO NOT load
iptable_nat if you don't need nat.  

> I am wondering why "iptable_nat" is slowing doing the box so much when
I
> don't have any NAT rules defined.

NAT is inherently complex.  and in order to support any kind of nat,
every connection (even the non-nat'ed ones) need to be placed in two
additional hash tables.  

If you just use conntrack, a single hash table is sufficient.. 

> Do you guys know of any netfilter patches made to address/fix this
issue?.

There is no way to 'address' this issue other than not using NAT.

> Thanks,
> Kishore

-- 
- Harald Welte <laforge@xxxxxxxxxxxxx>
http://www.netfilter.org/
========================================================================
====
  "Fragmentation is like classful addressing -- an interesting early
   architectural error that shows how much experimentation was going
   on while IP was being designed."                    -- Paul Vixie


[Index of Archives]     [Linux Netfilter Development]     [Linux Kernel Networking Development]     [Netem]     [Berkeley Packet Filter]     [Linux Kernel Development]     [Advanced Routing & Traffice Control]     [Bugtraq]

  Powered by Linux