Hi Krzysztof,
On Sat, Oct 20, 2007 at 12:21:49AM +0200, Krzysztof Oledzki wrote:
> Hello,
>
> This is maybe not strictly haproxy related but I believe that it is worth
> to notice that recently there were two quite important fixes that can
> dramatically improve performance of haproxy installed on a linux server
> with conntrack enabled, especially on the most recent kernels (2.6.22+?)
> that have tcp port randomisation feature implemented:
>
> http://git.kernel.org/?p=linux/kernel/git/torvalds/linux-2.6.git;a=commitdiff;h=17311393f969090ab060540bd9dbe7dc885a76d5
> http://git.kernel.org/?p=linux/kernel/git/torvalds/linux-2.6.git;a=commitdiff;h=bc34b841556aad437baf4199744e55500bfa2088
>
> If any of you are interested, there is a full thread describing the
> problem:
> http://marc.info/?t=119081130100010&r=2&w=4
> http://marc.info/?t=119081130100010&r=1&w=4
Quite interesting, it reminds me the old days when I put netfilter-based firewalls in production for the first time.... I got 10% drops because at this time it would not accept a SYN during TIME_WAIT. I remember to have worked with Joszef precisely on the part which was changed above, and I'm not sure that those changes are enough.
In fact, what is strange is that the TCP stack on the peer accepts the SYN. I've very used to encounter this problem when testing firewalls for instance. You simply chain an HTTP client, a firewall which randomizes ISN (PIX or OpenBSD) and an HTTP server. The common problem is that once you have rolled over the range of source ports, the traffic falls down to a very low rate, and you observe this :
The two solutions I know to this problem are :
In your case, you fixed the firewall, which was the first one to block. But I'm surprized that the server accepts your SYNs. Maybe it's because the TCP stack is different (windows). As Patrick said it in the discussion, it would be better to add PAWS to netfilter (and 8 more bytes aren't that much of a problem, considering the current size of the session table).
I'll see if the patches are also relevant to my 2.4-based kernels (since I still get quite a higher performance with 2.4 than 2.6).
Thanks,
Willy
Received on 2007/10/20 07:56
This archive was generated by hypermail 2.2.0 : 2007/11/04 19:21 CET