Cake - FQ_codel the next generation
 help / color / mirror / Atom feed
From: John Yates <john@yates-sheets.org>
To: "Dave Täht" <dave@taht.net>
Cc: lede-dev@lists.infradead.org, cake@lists.bufferbloat.net
Subject: Re: [Cake] [LEDE-DEV] Cake SQM killing my DIR-860L - was: [17.01] Kernel: bump to 4.4.51
Date: Thu, 2 Mar 2017 18:55:29 -0500	[thread overview]
Message-ID: <CAJnXXogMukBtVQjc9r4pU+JTsPr0thYW+QMnvxptsosmZztYpQ@mail.gmail.com> (raw)
In-Reply-To: <d946a3b2-88d9-f2fe-44d5-c2104fc3e0cf@taht.net>

On Thu, Mar 2, 2017 at 4:10 PM, Dave Täht <dave@taht.net> wrote:

> As for speeding up hashing, I've been looking over various algorithms to
> do that for years now, I'm open to suggestions. The fastest new ones
> tend to depend on co-processor support. The fastest I've seen relies on
> the CRC32 instruction which is only in some intel platforms.

This is an area where I have a fair amount of experience.

It is a misconception that CRC is a good hash function.  It is good
at detecting errors but has poor avalanche performance.

What are the requirements for this hashing function?
- How much data is being hashed?  (I would guess a limited number
  of bytes rather than an entire packet payload.)
- What is the typical number of hash table buckets?  Must it be a
  power of 2?  Or are you willing to make it a prime number?

Assuming you can afford a 1KB lookup table I would suggest
the SBox hash in figure four of this article:

http://papa.bretmulvey.com/post/124028832958/hash-functions

The virtue of a prime number of buckets is that when you mod
your 32-bit hash value to get a bucket index you harvest _all_
of the entropy in the hash, not just the entropy in the bits you
preserve.

/john

  parent reply	other threads:[~2017-03-02 23:55 UTC|newest]

Thread overview: 14+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
     [not found] <e955b05f85fea5661cfe306be0a28250@inventati.org>
     [not found] ` <07479F0A-40DD-44E5-B67E-28117C7CF228@gmx.de>
     [not found]   ` <1488400107.3610.1@smtp.autistici.org>
     [not found]     ` <2B251BF1-C965-444D-A831-9981861E453E@gmx.de>
     [not found]       ` <1488484262.16753.0@smtp.autistici.org>
2017-03-02 21:10         ` Dave Täht
2017-03-02 23:16           ` John Yates
2017-03-03  0:00             ` Jonathan Morton
2017-03-02 23:55           ` John Yates [this message]
2017-03-03  0:02             ` Jonathan Morton
2017-03-03  4:31               ` Eric Luehrsen
2017-03-03  4:35                 ` Jonathan Morton
2017-03-03  5:00                   ` Eric Luehrsen
2017-03-03  5:49                     ` Jonathan Morton
2017-03-03  6:21                       ` Dave Taht
2017-03-06 13:30                         ` Benjamin Cronce
2017-03-06 14:44                           ` Jonathan Morton
2017-03-06 18:08                             ` Benjamin Cronce
2017-03-06 18:46                               ` Jonathan Morton

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

  List information: https://lists.bufferbloat.net/postorius/lists/cake.lists.bufferbloat.net/

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=CAJnXXogMukBtVQjc9r4pU+JTsPr0thYW+QMnvxptsosmZztYpQ@mail.gmail.com \
    --to=john@yates-sheets.org \
    --cc=cake@lists.bufferbloat.net \
    --cc=dave@taht.net \
    --cc=lede-dev@lists.infradead.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox