Linux Netfilter discussions
 help / color / mirror / Atom feed
* ipset memory usage
@ 2005-09-25  6:31 tedemo
  2005-09-26  6:54 ` Jozsef Kadlecsik
  0 siblings, 1 reply; 12+ messages in thread
From: tedemo @ 2005-09-25  6:31 UTC (permalink / raw)
  To: netfilter

Hello,

The ipset modules seems to eat a lot of memory :
with a test set of  :
- 150 000 networks in a nethash
- 10 000 hosts in a iphash
ipset sometimes fails with out of memory errors :
"kernel: allocation failed: out of vmalloc space - use vmalloc=<size> to 
increase size"

The VmAllocUsed variable from /proc/meminfo goes from 6Mo to 160Mo after 
loading sets.

Is this normal ? Is there some way to reduce memory usage ?

Thanks


^ permalink raw reply	[flat|nested] 12+ messages in thread
* ipset memory usage
@ 2015-08-25 12:05 Akshat Kakkar
  2015-08-26  6:08 ` Akshat Kakkar
  2015-08-26 18:22 ` Jozsef Kadlecsik
  0 siblings, 2 replies; 12+ messages in thread
From: Akshat Kakkar @ 2015-08-25 12:05 UTC (permalink / raw)
  To: netfilter@vger.kernel.org

As per info in http://lists.netfilter.org/pipermail/netfilter/2005-September/062859.html,
ipset of iphash of 20Million IPs, takes around only 80MB. I understand
that this might be simply multiplication of 20Million with 4 bytes
which IP takes if stored normally.

But when I try to replicate this I am getting size in memory as
506,481,176 (around 483MB) for number of entries 16,581,375.

This comes to around 30Bytes per IP.

I have got this values from ipset -L command

Is this much size anticipated?

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

end of thread, other threads:[~2015-08-26 18:22 UTC | newest]

Thread overview: 12+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2005-09-25  6:31 ipset memory usage tedemo
2005-09-26  6:54 ` Jozsef Kadlecsik
2005-09-26  8:17   ` tedemo
2005-09-26  9:28     ` Jozsef Kadlecsik
2005-09-26 11:03       ` tedemo
2005-09-26 11:16         ` Jozsef Kadlecsik
2005-09-26 12:10           ` tedemo
2005-09-27  3:01       ` tedemo
2005-09-27  6:55         ` Jozsef Kadlecsik
  -- strict thread matches above, loose matches on Subject: below --
2015-08-25 12:05 Akshat Kakkar
2015-08-26  6:08 ` Akshat Kakkar
2015-08-26 18:22 ` Jozsef Kadlecsik

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox