diff options
author | Gleb Smirnoff <glebius@FreeBSD.org> | 2019-02-15 23:36:22 +0000 |
---|---|---|
committer | Gleb Smirnoff <glebius@FreeBSD.org> | 2019-02-15 23:36:22 +0000 |
commit | 66fb0b1ad7b9342699e890d311f36742a15660f7 (patch) | |
tree | 909fcfd7d4102547c682594bc805132d0d41f99c /sys/vm/vnode_pager.c | |
parent | 3c324b9465710947abef23044cdcd8bfce8d982d (diff) |
For 32-bit machines rollback the default number of vnode pager pbufs
back to the lever before r343030. For 64-bit machines reduce it slightly,
too. Together with r343030 I bumped the limit up to the value we use at
Netflix to serve 100 Gbit/s of sendfile traffic, and it probably isn't a
good default.
Provide a loader tunable to change vnode pager pbufs count. Document it.
Notes
Notes:
svn path=/head/; revision=344188
Diffstat (limited to 'sys/vm/vnode_pager.c')
-rw-r--r-- | sys/vm/vnode_pager.c | 12 |
1 files changed, 11 insertions, 1 deletions
diff --git a/sys/vm/vnode_pager.c b/sys/vm/vnode_pager.c index 3e71ab4436cc..ded9e65e4e4c 100644 --- a/sys/vm/vnode_pager.c +++ b/sys/vm/vnode_pager.c @@ -115,13 +115,23 @@ SYSCTL_PROC(_debug, OID_AUTO, vnode_domainset, CTLTYPE_STRING | CTLFLAG_RW, &vnode_domainset, 0, sysctl_handle_domainset, "A", "Default vnode NUMA policy"); +static int nvnpbufs; +SYSCTL_INT(_vm, OID_AUTO, vnode_pbufs, CTLFLAG_RDTUN | CTLFLAG_NOFETCH, + &nvnpbufs, 0, "number of physical buffers allocated for vnode pager"); + static uma_zone_t vnode_pbuf_zone; static void vnode_pager_init(void *dummy) { - vnode_pbuf_zone = pbuf_zsecond_create("vnpbuf", nswbuf * 8); +#ifdef __LP64__ + nvnpbufs = nswbuf * 2; +#else + nvnpbufs = nswbuf / 2; +#endif + TUNABLE_INT_FETCH("vm.vnode_pbufs", &nvnpbufs); + vnode_pbuf_zone = pbuf_zsecond_create("vnpbuf", nvnpbufs); } SYSINIT(vnode_pager, SI_SUB_CPU, SI_ORDER_ANY, vnode_pager_init, NULL); |