Author: kp Date: Sun Aug 5 13:54:37 2018 New Revision: 337350 URL: https://svnweb.freebsd.org/changeset/base/337350
Log: 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. Modified: head/share/man/man4/pf.4 head/sys/net/pfvar.h Modified: head/share/man/man4/pf.4 ============================================================================== --- head/share/man/man4/pf.4 Sun Aug 5 11:15:28 2018 (r337349) +++ head/share/man/man4/pf.4 Sun Aug 5 13:54:37 2018 (r337350) @@ -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 Modified: head/sys/net/pfvar.h ============================================================================== --- head/sys/net/pfvar.h Sun Aug 5 11:15:28 2018 (r337349) +++ head/sys/net/pfvar.h Sun Aug 5 13:54:37 2018 (r337350) @@ -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); _______________________________________________ [email protected] mailing list https://lists.freebsd.org/mailman/listinfo/svn-src-head To unsubscribe, send any mail to "[email protected]"
