diff options
author | Kristof Provost <kp@FreeBSD.org> | 2018-08-05 13:54:37 +0000 |
---|---|---|
committer | Kristof Provost <kp@FreeBSD.org> | 2018-08-05 13:54:37 +0000 |
commit | 91e0f2d2006fb726076abb747529e2a01d2af222 (patch) | |
tree | 0fe63eb7135dde24d0b6fbf6963c2d27a019f8f7 /sys/net/pfvar.h | |
parent | 5abe8cb6de5fac0d01979060552407a05e66909b (diff) | |
download | src-91e0f2d2006fb726076abb747529e2a01d2af222.tar.gz src-91e0f2d2006fb726076abb747529e2a01d2af222.zip |
pf: Increase default hash table size
Now that we (by default) limit the number of states to 100.000 it makse sense
to also adjust the default size of the hash table.
Based on the benchmarking results in
https://github.com/ocochard/netbenches/blob/master/Atom_C2758_8Cores-Chelsio_T540-CR/pf-states_hashsize/results/fbsd12-head.r332390/README.md
128K entries offers a good compromise between performance and memory use.
Users may still overrule this setting with the net.pf.states_hashsize and
net.pf.source_nodes_hashsize loader(8) tunables.
Notes
Notes:
svn path=/head/; revision=337350
Diffstat (limited to 'sys/net/pfvar.h')
-rw-r--r-- | sys/net/pfvar.h | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/sys/net/pfvar.h b/sys/net/pfvar.h index fd399dd7b476..9690f086d1c5 100644 --- a/sys/net/pfvar.h +++ b/sys/net/pfvar.h @@ -1470,7 +1470,7 @@ struct pf_idhash { extern u_long pf_hashmask; extern u_long pf_srchashmask; -#define PF_HASHSIZ (32768) +#define PF_HASHSIZ (131072) #define PF_SRCHASHSIZ (PF_HASHSIZ/4) VNET_DECLARE(struct pf_keyhash *, pf_keyhash); VNET_DECLARE(struct pf_idhash *, pf_idhash); |