All of lore.kernel.org
 help / color / mirror / Atom feed
* bloom filter in netfilter?
@ 2007-03-20 15:07 Sebastien Tandel
  2007-03-20 15:20 ` Patrick McHardy
  2007-03-20 15:25 ` Pablo Neira Ayuso
  0 siblings, 2 replies; 12+ messages in thread
From: Sebastien Tandel @ 2007-03-20 15:07 UTC (permalink / raw)
  To: netfilter-devel

-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA512

Hi,


   I'm wondering if bloom filters could not improve performance of the
conntracker. For a quick overwiew of bloom filters see
http://www.eecs.harvard.edu/~michaelm/NEWWORK/postscripts/BloomFilterSurvey.pdf

In a few words, a bloom filter is a data structure which represents
concisely a set. When you have a set, you can decide very quickly if an
element belongs to it.

I was then wondering if we could not get rid of these two
list_for_each_entry in the __nf_conntrack_confirm by using the bloom
filters.

You can use it as a key for a hash table as well. And therefore we may
use them at a later stage for the hash table as well. But let's see
first if you're interested by the previous idea ;)

What do you think?


Regards,
Sebastien Tandel
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.6 (GNU/Linux)
Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org

iD8DBQFF//jDw76McB8jGxkRClszAJ0Zp2Jw1ctmldL3EX4NPhNchz9OZQCgluPh
i8edz1Zv/JuBUso/mqTx4EQ=
=xkDc
-----END PGP SIGNATURE-----

^ permalink raw reply	[flat|nested] 12+ messages in thread
* Re: bloom filter in netfilter?
@ 2007-03-20 16:31 Robert Iakobashvili
  0 siblings, 0 replies; 12+ messages in thread
From: Robert Iakobashvili @ 2007-03-20 16:31 UTC (permalink / raw)
  To: netfilter-devel

> You're right, tuple reuse is a problem, it seems counting bloom
> filters would be needed to deal with that, which are a lot less
> memory efficient. The increasing probabilities of false positives
> with increasing number of entries could be dealt with by using a
> second bloom filter that is filled with new entries once a low
> threshold is exceeded and replaces the active one once a high
> threshold is exceeded.
>
> I have to admit that I'm a huge fan of bloom filters and always
> wanted to use them for something cool :)

Recent paper from Luca Deri could be relevant here:
http://luca.ntop.org/Blooms.pdf

-- 
Sincerely,
Robert Iakobashvili,
coroberti %x40 gmail %x2e com
...................................................................
Navigare necesse est, vivere non est necesse
...................................................................
http://curl-loader.sourceforge.net
A powerful open-source HTTP/S, FTP/S traffic
generating, loading and testing tool.

^ permalink raw reply	[flat|nested] 12+ messages in thread
* [Fwd: Re: bloom filter in netfilter?]
@ 2007-03-20 16:37 Sebastien Tandel
  2007-03-20 19:27 ` bloom filter in netfilter? Pablo Neira Ayuso
  0 siblings, 1 reply; 12+ messages in thread
From: Sebastien Tandel @ 2007-03-20 16:37 UTC (permalink / raw)
  To: netfilter-devel

-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA512

forgot to CC to the list ... :-/


Patrick McHardy wrote:
> Pablo Neira Ayuso wrote:
>>> I was then wondering if we could not get rid of these two
>>> list_for_each_entry in the __nf_conntrack_confirm by using the bloom
>>> filters.
>>
>> We can't just get rid of it since bloom filters have false positives, so
>> it could happen that we could miss some new connections that are not
>> actually in the conntrack table.
>
>
> That wouldn't be a big problem in my opinion, you can freely tune the
> probability.
>

In the specific case I was speaking about, you don't expect to find
anything. Therefore, as Patrick says, if you tune the probability of
false positives, you should not expect ones really often. If one occurs,
of course, you have to verify it in the list.

Regards,
Sebastien Tandel

-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.6 (GNU/Linux)
Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org

iD8DBQFGAA3fw76McB8jGxkRCnGjAJ0diPmS3tmxWs/sqymSuSXS1S/aWgCgm/JO
Abrg/mwtbgdUzbnXhqR9GcA=
=LBzy
-----END PGP SIGNATURE-----

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

end of thread, other threads:[~2007-03-21 15:00 UTC | newest]

Thread overview: 12+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2007-03-20 15:07 bloom filter in netfilter? Sebastien Tandel
2007-03-20 15:20 ` Patrick McHardy
2007-03-20 15:25 ` Pablo Neira Ayuso
2007-03-20 15:26   ` Patrick McHardy
2007-03-20 15:34     ` Patrick Schaaf
2007-03-20 15:43       ` Patrick McHardy
  -- strict thread matches above, loose matches on Subject: below --
2007-03-20 16:31 Robert Iakobashvili
2007-03-20 16:37 [Fwd: Re: bloom filter in netfilter?] Sebastien Tandel
2007-03-20 19:27 ` bloom filter in netfilter? Pablo Neira Ayuso
2007-03-20 21:41   ` Sebastien Tandel
2007-03-21 12:45     ` Sebastien Tandel
2007-03-21 12:46   ` Sebastien Tandel
2007-03-21 15:00     ` Jozsef Kadlecsik

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.