From 61c0750556b971f960a6783bf22f9f7c22bd856a Mon Sep 17 00:00:00 2001 From: Matthew Dillon Date: Sun, 26 Aug 2012 10:09:19 -0700 Subject: [PATCH] kernel - reduce kern.maxvnodes default on 32 bit systems * Reduce maximum kern.maxvnodes on standard-configured 32 bit systems from ~100K vnodes to ~80K vnodes to reduce kmem usage. --- sys/kern/vfs_subr.c | 4 ++-- 1 files changed, 2 insertions(+), 2 deletions(-) diff --git a/sys/kern/vfs_subr.c b/sys/kern/vfs_subr.c index ca17cfe..e6a0024 100644 --- a/sys/kern/vfs_subr.c +++ b/sys/kern/vfs_subr.c @@ -179,7 +179,7 @@ vfs_subr_init(void) * Desiredvnodes is kern.maxvnodes. We want to scale it * according to available system memory but we may also have * to limit it based on available KVM, which is capped on 32 bit - * systems. + * systems, to ~80K vnodes or so. * * WARNING! For machines with 64-256M of ram we have to be sure * that the default limit scales down well due to HAMMER @@ -187,7 +187,7 @@ vfs_subr_init(void) * We want around ~5800 on a 128M machine. */ factor1 = 20 * (sizeof(struct vm_object) + sizeof(struct vnode)); - factor2 = 22 * (sizeof(struct vm_object) + sizeof(struct vnode)); + factor2 = 25 * (sizeof(struct vm_object) + sizeof(struct vnode)); desiredvnodes = imin((int64_t)vmstats.v_page_count * PAGE_SIZE / factor1, KvaSize / factor2); -- 1.7.7.2