[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-ID: <48B67570.2020704@cosmosbay.com>
Date: Thu, 28 Aug 2008 11:52:48 +0200
From: Eric Dumazet <dada1@...mosbay.com>
To: David Miller <davem@...emloft.net>
Cc: shemminger@...tta.com, andi@...stfloor.org, davej@...hat.com,
netdev@...r.kernel.org
Subject: Re: cat /proc/net/tcp takes 0.5 seconds on x86_64
David Miller a écrit :
> From: Eric Dumazet <dada1@...mosbay.com>
> Date: Thu, 28 Aug 2008 09:13:13 +0200
>
>> David Miller a écrit :
>>> We could not define a reasonable way to trigger hash table growth.
>>> GC attempts to keep a resident set of entries in the cache, and these
>>> heuristics are guided by the table size itself. So if you grow the
>>> table too aggressively this never has a chance to work.
>> Maybe because of overcomplicated algos in net/ipv4/route.c, and
>> mixing "number of entries in cache", and "hash table size" things...
>
> But it is exactly what we want to use to create equilabrium
> when the size is large enough.
>
>> Fact is that nobody wants to have eight elements per hash bucket,
>> especially in case of DDOS.
>
> Of this there is no doubt. But also, nobody wants to use 1GB hash
> table simply because of poorly implemented interactions between GC and
> hash table growth :-)
Sure, but we have /proc/sys/net/ipv4/route/max_size, so hash table size would be
at most (sizeof(void *) * max_size) of course.
>
> It was a series of patches I started posting in August 2006:
>
> http://marc.info/?l=linux-netdev&m=115510979129323&w=2
>
> There was a bunch of discussion, the locking and synchronization
> were worked out but the resize logic was not.
Thanks David, I remembered this stuff but was unable to find it again in my archives.
Give me some days/weeks to work on this subject.
(Hans removed from CC)
--
To unsubscribe from this list: send the line "unsubscribe netdev" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Powered by blists - more mailing lists