Cake - FQ_codel the next generation
 help / color / mirror / Atom feed
* [Cake] Fwd: curious about hashing comments on cake
       [not found] <CAJts4a2fW-j3hw-gKhshrJ9O115jf_gWqsdOAb=XikVgqiXGUw@mail.gmail.com>
@ 2016-01-08 20:58 ` Dave Taht
  2016-01-08 21:15   ` Jonathan Morton
  0 siblings, 1 reply; 2+ messages in thread
From: Dave Taht @ 2016-01-08 20:58 UTC (permalink / raw)
  To: cake

---------- Forwarded message ----------
From: Dave Acker <soldack@gmail.com>
Date: Fri, Jan 8, 2016 at 12:48 PM
Subject: curious about hashing comments on cake
To: dave.taht@gmail.com


On http://www.bufferbloat.net/projects/codel/wiki/CakeTechnical, it
says that the hash used by fq_codel had various issues and that "we
have also found that the hash function fq_codel relies on is
suboptimal."  I believe that fq_codel uses the Jenkins hash like many
other parts of linux.  What was suboptimal about it?  The page notes
the birthday problem but was there anything else?
-Dave Acker

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

* Re: [Cake] Fwd: curious about hashing comments on cake
  2016-01-08 20:58 ` [Cake] Fwd: curious about hashing comments on cake Dave Taht
@ 2016-01-08 21:15   ` Jonathan Morton
  0 siblings, 0 replies; 2+ messages in thread
From: Jonathan Morton @ 2016-01-08 21:15 UTC (permalink / raw)
  To: Dave Acker; +Cc: cake

> On http://www.bufferbloat.net/projects/codel/wiki/CakeTechnical, it
> says that the hash used by fq_codel had various issues and that "we
> have also found that the hash function fq_codel relies on is
> suboptimal."  I believe that fq_codel uses the Jenkins hash like many
> other parts of linux.  What was suboptimal about it?  The page notes
> the birthday problem but was there anything else?

In some tests, we were seeing a higher rate of collisions than even the birthday theorem would predict.  That generally points to a hash function insufficiently indistinguishable from white noise, at least when truncated for use in a small table.

I don’t think there’s anything fundamentally wrong with the Jenkins hash, but there are possibly limitations with the input conditioning, especially with IPv6 addresses.

Cake does still use the Jenkins hash directly when compiled for older kernels, but that’s a backwards compatibility measure.  For newer kernels, Cake uses whichever hash function is supplied as part of the new flow-dissection API.  It strikes me that this would probably be updated in future if a serious weakness was discovered, and probably uses better input conditioning than the old system.

The birthday paradox is the big one, though, and this is what the set-associative hash function addresses directly.

 - Jonathan Morton


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

end of thread, other threads:[~2016-01-08 21:16 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
     [not found] <CAJts4a2fW-j3hw-gKhshrJ9O115jf_gWqsdOAb=XikVgqiXGUw@mail.gmail.com>
2016-01-08 20:58 ` [Cake] Fwd: curious about hashing comments on cake Dave Taht
2016-01-08 21:15   ` Jonathan Morton

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox