Skip to contentSkip to conversation

nf_conntrack hashsize change during runtime?

DISCUSSION Steven Kath 1 participant 1 message Sep 13, 2010 1 message not in the archive

lore
Share & tools
lore

A message that is not in the archive (sent off-list or not yet received): [email protected]

#1 lore raw

I have seen a number of resources online saying that the nf_conntrack hashsize parameter can be modified during runtime, with instructions like the following:

Quoted 7 lines

Since 2.6.14, it is possible to set hashsize dynamically at runtime, after boot and module load.

Between 2.6.14 and 2.6.19 (included), use:
echo $HASHSIZE > /sys/module/ip_conntrack/parameters/hashsize

Since 2.6.20, use:
echo $HASHSIZE > /sys/module/nf_conntrack/parameters/hashsize

These instructions are repeated word-for-word at a number of sites, but I haven't seen anything authoritative to substantiate it and I suspect it might be apocryphal advice.

The netfilter FAQ describes the hashsize as a load-time parameter only, but its last-modified date is over seven years ago.

Is it necessary to reload the conntrack module to properly adjust the hash size, or is it viable to change it during runtime? Any caveats to be aware of?

Thanks,
Steven