All of lore.kernel.org
 help / color / mirror / Atom feed
* ip_conntrack_hash() problem
@ 2002-09-04 12:33 Martin Wilck
  2002-09-04 12:56 ` Harald Welte
  0 siblings, 1 reply; 23+ messages in thread
From: Martin Wilck @ 2002-09-04 12:33 UTC (permalink / raw)
  To: Netfilter Mailing List
  Cc: Linux Kernel mailing list, Rusty Russell, Patrick Schaaf,
	Harald Welte, Andreas Kleen

Hi,

I posted a patch to netfilter-devel a week ago that fixes a severe
performance problem with ip_conntrack_hash() (see below).
Harald rejected it (sort of), telling me I should have read past threads
about the hash function first. 

http://marc.theaimsgroup.com/?l=netfilter-devel&m=103054090215896&w=2

I think I have to insist on this, though.

Although it certainly isn't the "optimal" hash function for
ip_conntrack, it fixes a problem that leads to extremely unbalanced
hashing in some situations, in particular in a simple
client<->router<->webserver scenario. 

In that case, all connection tuples from server to client, i.e. 50% of
all tuples, end up in the same bucket(!), as I showed in my posting to
netfilter-devel.

This happens if the hash size is a power of 2, which is the default on
most newer machines.

The fix is rather trivial (mainly the port numbers are accounted for
outside the ntohl() function), and therefore I'd like to ask again that
it be applied.

Unless I am mistaken, the past discussions were mainly concerned with
fine-tuning of the hash function, which is a topic my patch doesn't
address, and can easily be done on top of it.

Regards,
Martin

-- 
Martin Wilck                Phone: +49 5251 8 15113
Fujitsu Siemens Computers   Fax:   +49 5251 8 20409
Heinz-Nixdorf-Ring 1	    mailto:Martin.Wilck@Fujitsu-Siemens.com
D-33106 Paderborn           http://www.fujitsu-siemens.com/primergy






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

end of thread, other threads:[~2002-10-11  3:51 UTC | newest]

Thread overview: 23+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2002-09-04 12:33 ip_conntrack_hash() problem Martin Wilck
2002-09-04 12:56 ` Harald Welte
2002-09-04 13:24   ` Martin Wilck
2002-09-04 13:26     ` Andi Kleen
2002-09-05  0:39       ` Rusty Russell
2002-09-05  6:21         ` Patrick Schaaf
2002-09-05  6:24           ` David S. Miller
2002-09-05  6:33             ` Patrick Schaaf
2002-09-05  6:32               ` David S. Miller
2002-09-05  6:32               ` David S. Miller
2002-09-05  6:39                 ` Patrick Schaaf
2002-09-05  6:40                   ` David S. Miller
2002-09-05 13:37                   ` Rik van Riel
2002-09-05 11:14           ` Rusty Russell
2002-09-05  6:51         ` Patrick Schaaf
2002-09-05  7:19         ` Martin Wilck
2002-09-05 11:15           ` Rusty Russell
2002-09-05 11:54             ` Andi Kleen
2002-09-05 17:55               ` Patrick Schaaf
2002-09-05 18:24                 ` Martin Wilck
2002-10-11  3:51             ` Zheng Weibin
2002-09-05  8:19       ` Harald Welte
2002-09-04 13:40   ` Martin Wilck

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.