Historic archive of defunct list bloat-devel@lists.bufferbloat.net
 help / color / mirror / Atom feed
From: Dave Taht <dave.taht@gmail.com>
To: Sean Conner <sean@conman.org>
Cc: bloat-devel@lists.bufferbloat.net
Subject: Re: A tiny almost sorta kinda nearly minimal perfect hash for a mac classifier?
Date: Mon, 14 Nov 2011 09:21:43 +0100	[thread overview]
Message-ID: <CAA93jw6CbDounn0btc3OmU1--42X7MEmdMeAt35sa_+os4zizg@mail.gmail.com> (raw)
In-Reply-To: <20111114022209.GA5769@brevard.conman.org>

On Mon, Nov 14, 2011 at 3:22 AM, Sean Conner <sean@conman.org> wrote:
> It was thus said that the Great Dave Taht once stated:
>> There's this class of non-algorithms where stupid and brute force
>> nearly works. Then there are the be-all end-all algorithms which scale
>> beautifully O(1) over n - so long as n is large enough to wipe out the
>> overhead of the be-all-end-all algorithm, and taking locks, allocating
>> memory at bad times, etc, is ok.
>>
>> I keep running into problems where brute force and a simple table
>> lookup is almost enough.
>>
>> Here's one. I'd like to classify network streams so that they end up
>> in a unique queue[x], based on their nexthop mac address in the ip
>> header.
>
>  I've checked my home network, and the network of a small webhosting
> company I do work for, and in both cases, the MAC addresses were all unique
> in the lower 10-12 bits, which is understandable given that's the portion of
> the MAC address vendors control.
>
>  Why not just use the lower N bits as the hash function?
>
>  -spc (Or am I missing something?)


In describing it, I realized that what I mostly wanted to do was toss
the increasingly weighty wireless multicast/broadcast packets into
their own class to be scheduled specially, which is easily done by
checking for that bit first then having the hash... The effects of
hash collisions elsewhere would be less dramatic.

but to continue:

The property I was specifically looking for was:

One of a small number (say, x < 2048) of queues, that needs to be
absolutely unique per mac. It's ok if 99% of the queues
are idle at any given point.

*It's OK if the initial classification collides with another mac so
long as eventually it doesn't*

I'd hate to be the guy with the two machines that are colliding (all
the time), scratching his head as to why.

What I wanted was something that would keep permuting a hash algorithm
over time until it actually became perfect (see for example the cmph
library, which can do this for large static data sets).

>
>
>
> _______________________________________________
> Bloat-devel mailing list
> Bloat-devel@lists.bufferbloat.net
> https://lists.bufferbloat.net/listinfo/bloat-devel
>



-- 
Dave Täht
SKYPE: davetaht
US Tel: 1-239-829-5608
FR Tel: 0638645374
http://www.bufferbloat.net

  parent reply	other threads:[~2011-11-14  8:21 UTC|newest]

Thread overview: 11+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2011-11-13 20:43 Dave Taht
2011-11-14  2:22 ` Sean Conner
2011-11-14  2:41   ` Fred Baker
2011-11-14  7:44     ` Dave Taht
2011-11-14  8:13       ` Sean Conner
2011-11-14  8:21   ` Dave Taht [this message]
2011-11-15 21:14 ` Sean Conner
2011-11-15 21:44   ` Jonathan Morton
2011-11-15 22:19     ` Dave Taht
2011-11-15 22:20       ` Dave Taht
2011-11-14  8:20 Sean Conner

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

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

  git send-email \
    --in-reply-to=CAA93jw6CbDounn0btc3OmU1--42X7MEmdMeAt35sa_+os4zizg@mail.gmail.com \
    --to=dave.taht@gmail.com \
    --cc=bloat-devel@lists.bufferbloat.net \
    --cc=sean@conman.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