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.
This commit is contained in:
parent
5abe8cb6de
commit
91e0f2d200
@ -28,7 +28,7 @@
|
||||
.\"
|
||||
.\" $FreeBSD$
|
||||
.\"
|
||||
.Dd November 14, 2013
|
||||
.Dd August 5, 2018
|
||||
.Dt PF 4
|
||||
.Os
|
||||
.Sh NAME
|
||||
@ -84,11 +84,11 @@ tunables are available.
|
||||
.It Va net.pf.states_hashsize
|
||||
Size of hash tables that store states.
|
||||
Should be power of 2.
|
||||
Default value is 32768.
|
||||
Default value is 131072.
|
||||
.It Va net.pf.source_nodes_hashsize
|
||||
Size of hash table that store source nodes.
|
||||
Should be power of 2.
|
||||
Default value is 8192.
|
||||
Default value is 32768.
|
||||
.El
|
||||
.Pp
|
||||
Read only
|
||||
|
@ -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);
|
||||
|
Loading…
x
Reference in New Issue
Block a user