All of lore.kernel.org
 help / color / mirror / Atom feed
* Defaults for rte_hash
@ 2014-09-09 10:31 Matthew Hall
       [not found] ` <20140909103153.GA7969-Hv3ogNYU3JfZZajBQzqCxQ@public.gmane.org>
  0 siblings, 1 reply; 4+ messages in thread
From: Matthew Hall @ 2014-09-09 10:31 UTC (permalink / raw)
  To: dev-VfR2kkLFssw

Hello,

I was looking at the code which inits rte_hash objects in examples/l3fwd. It's 
using approx. 1M to 4M hash 'entries' depending on 32-bit vs 64-bit, but it's 
setting the 'bucket_entries' to just 4.

Normally I'm used to using somewhat deeper hash buckets than that... it seems 
like having a zillion little tiny hash buckets would cause more TLB pressure 
and memory overhead... or does 4 get shifted / exponentiated into 2**4 ?

The documentation in http://dpdk.org/doc/api/structrte__hash__parameters.html 
and http://dpdk.org/doc/api/rte__hash_8h.html isn't that clear... is there a 
better place to look for this?

In my case I'm looking to create a table of 4M or 8M entries, containing 
tables of security threat IPs / domains, to be detected in the traffic. So it 
would be good to have some understanding how not to waste a ton of memory on a 
table this huge without making it run super slow either.

Did anybody have some experience with how to get this right?

Another thing... the LPM table uses 16-bit Hop IDs. But I would probably have 
more than 64K CIDR blocks of badness on the Internet available to me for 
analysis. How would I cope with this, besides just letting some attackers 
escape unnoticed? ;)

Have we got some kind of structure which allows a greater number of CIDRs even 
if it's not quite as fast?

Thanks,
Matthew.

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

end of thread, other threads:[~2014-09-09 20:42 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2014-09-09 10:31 Defaults for rte_hash Matthew Hall
     [not found] ` <20140909103153.GA7969-Hv3ogNYU3JfZZajBQzqCxQ@public.gmane.org>
2014-09-09 10:45   ` Richardson, Bruce
     [not found]     ` <59AF69C657FD0841A61C55336867B5B0343EFBBD-kPTMFJFq+rELt2AQoY/u9bfspsVTdybXVpNB7YpNyf8@public.gmane.org>
2014-09-09 11:42       ` De Lara Guarch, Pablo
     [not found]         ` <E115CCD9D858EF4F90C690B0DCB4D89722614BD2-kPTMFJFq+rEMvF1YICWikbfspsVTdybXVpNB7YpNyf8@public.gmane.org>
2014-09-09 20:42           ` Matthew Hall

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.