Re: hash functions distribution test

From: Aleksandar Lazic <al-haproxy#none.at>
Date: Thu, 27 Dec 2007 10:55:17 +0100


On Don 27.12.2007 08:43, Willy Tarreau wrote:
>On Thu, Dec 27, 2007 at 08:30:41AM +0100, Aleksandar Lazic wrote:
>
>> Thanks ;-).
>> Please can you bzip -9 it and tell me, offlist, where I can get it,
>> so that I can investigate to debug this issues.
>
>Unfortunately I cannot anymore. I found it to be a good opportunity to
>save 200 megs in /var on this machine a few minutes ago :-(

Oh :-(.
I will try go get some datas from another source ;-)

>> I will look into it.
>
>OK

I think the *problem* could be the underlaying list implementation, I will move to mini-clist.h and see if this fix the problem.   

>> What this mean, don't use FNV or don't use it with more then N values?!
>
>It just means that all such functions should generally be avoided on
>data sources fed from uncontrolled sources such as external users. If a
>perl script is enough to generate URLs, cookies or anything which
>always uses the same bucket, you will get a program which constantly
>slows down as long as it gets fed with crafted values. When you get
>>100k values in the same hash bucket, you may end up with lookup times
>in seconds or even minutes, which is very dangerous.

Ah ok, thanks for hint.

>> >I attach the patch to report the stats.
>>
>> As always thanks I will add it and run the tests again ;-)
>> Thank you very much for the *speedlight* response.
>
>I found it amusing, but I'm late now, I must go to work :-)

I'am now there, have fun :-)

Cheers

Aleks Received on 2007/12/27 10:55

This archive was generated by hypermail 2.2.0 : 2007/12/27 11:00 CET