LVS
lvs-users
Google
 
Web LinuxVirtualServer.org

Re: Connection table hashing

To: "LinuxVirtualServer.org users mailing list." <lvs-users@xxxxxxxxxxxxxxxxxxxxxx>
Subject: Re: Connection table hashing
From: Roberto Nibali <ratz@xxxxxxxxxxxx>
Date: Thu, 19 Jun 2003 02:22:18 +0200
Hi Julian, me again,

that uses 2654435761 and the Jenkins hash that is present in
recent 2.4 and 2.5 kernels. We need some help from math
perspective.

Have you done tests with the FNV hash [1]? People in *BSD use it for certain parts in their kernel (NFS for example). According to an email from Luke Mewburn to the NetBSD list:

"There is a potential issue however; FNV uses multiply (*) and xor (^),
whereas a lot of the existing hashes on strings and buffers just use
addition (+). Whilst FNV has much better distribution than the latter,
it will be slower on platforms without hardware multiply. The question
is as to whether the reduction in hash collisions (and the subsequent
following of collision list chains) is effective on these systems."

Which would be perfectly fine for LVS as it is only for i386 and most people will have a Pentium II at least. so we have hardware multiply on 99.9999% of the machines.

[1] http://www.isthe.com/chongo/tech/comp/fnv/

Best regards,
Roberto Nibali, ratz
--
echo '[q]sa[ln0=aln256%Pln256/snlbx]sb3135071790101768542287578439snlbxq'|dc

<Prev in Thread] Current Thread [Next in Thread>