From: "Nishit Shah" <nishit@elitecore.com>
To: 'Jozsef Kadlecsik' <kadlec@blackhole.kfki.hu>
Cc: netfilter@vger.kernel.org
Subject: RE: iphash vs iptreemap
Date: Thu, 19 Jun 2008 15:11:26 +0530 [thread overview]
Message-ID: <000a01c8d1f0$a48d2990$eda77cb0$@com> (raw)
In-Reply-To: <Pine.LNX.4.64.0806191119580.11904@blackhole.kfki.hu>
Thanks Sir,
Is it a way to find memory usage by both of them ?
How much difference in terms of memory do we have ?
Rgds,
Nishit Shah.
-----Original Message-----
From: Jozsef Kadlecsik [mailto:kadlec@blackhole.kfki.hu]
Sent: Thursday, June 19, 2008 3:00 PM
To: Nishit Shah
Cc: netfilter@vger.kernel.org
Subject: Re: iphash vs iptreemap
Hi,
On Thu, 19 Jun 2008, Nishit Shah wrote:
> If I have list of only IP Addresses, which set type is better to use
> in terms of Matching speed and memory ? iphash or iptreemap ?
Good questions! I'd say iptree(map) is faster. But if the IP addresses are
random, then iphash can use less memory than iptree(map), if the probes
parameter of the hash is small.
> Does the decision depends of number of IP Addresses ?
Not really, the number of addresses are a neutral factor. But if you
create an iphash with small hashsize (compared to the IP addresses
planned to store), it can be slow when adding the IP addresses due to
rehashing if it has to grow the hash.
Best regards,
Jozsef
-
E-mail : kadlec@blackhole.kfki.hu, kadlec@mail.kfki.hu
PGP key : http://www.kfki.hu/~kadlec/pgp_public_key.txt
Address : KFKI Research Institute for Particle and Nuclear Physics
H-1525 Budapest 114, POB. 49, Hungary
next prev parent reply other threads:[~2008-06-19 9:41 UTC|newest]
Thread overview: 8+ messages / expand[flat|nested] mbox.gz Atom feed top
2008-06-19 8:57 iphash vs iptreemap Nishit Shah
2008-06-19 9:30 ` Jozsef Kadlecsik
2008-06-19 9:41 ` Nishit Shah [this message]
2008-06-19 9:56 ` Jozsef Kadlecsik
2008-06-19 10:25 ` Nishit Shah
2008-06-19 11:03 ` Jozsef Kadlecsik
2008-06-19 11:35 ` Nishit Shah
2008-06-19 12:04 ` Jozsef Kadlecsik
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='000a01c8d1f0$a48d2990$eda77cb0$@com' \
--to=nishit@elitecore.com \
--cc=kadlec@blackhole.kfki.hu \
--cc=netfilter@vger.kernel.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