From: Matthew Dillon Date: Sun, 26 Aug 2012 17:09:19 +0000 (-0700) Subject: kernel - reduce kern.maxvnodes default on 32 bit systems X-Git-Tag: v3.2.0~250 X-Git-Url: https://gitweb.dragonflybsd.org/dragonfly.git/commitdiff_plain/61c0750556b971f960a6783bf22f9f7c22bd856a?ds=sidebyside 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. --- diff --git a/sys/kern/vfs_subr.c b/sys/kern/vfs_subr.c index ca17cfe1e8..e6a0024746 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);