summaryrefslogtreecommitdiffstats
path: root/sys/kern/subr_param.c
diff options
context:
space:
mode:
authorpeter <peter@FreeBSD.org>1996-05-31 00:20:34 +0000
committerpeter <peter@FreeBSD.org>1996-05-31 00:20:34 +0000
commita6023afadfbb05340c7296f1384561e1ecce012e (patch)
treeb446a70fccaa7fb3b4a986f5104bd02c2d030856 /sys/kern/subr_param.c
parentb46e8cf885570613bfe0bf9fff30d835444fbf0f (diff)
downloadFreeBSD-src-a6023afadfbb05340c7296f1384561e1ecce012e.zip
FreeBSD-src-a6023afadfbb05340c7296f1384561e1ecce012e.tar.gz
Add an option "EXTRA_VNODES" to cause an extra number of vnode structures
to be allocated at boot time. This is an expensive option, as they consume physical ram and are not pageable etc. In certain situations, this kind of option is quite useful, especially for news servers that access a large number of directories at random and torture the name cache. Defining 5000 or 10000 extra vnodes should cut down the amount of vnode recycling somewhat, which should allow better name and directory caching etc. This is a "your mileage may vary" option, with no real indication of what works best for your machine except trial and error. Too many will cost you ram that you could otherwise use for disk buffers etc. This is based on something John Dyson mentioned to me a while ago.
Diffstat (limited to 'sys/kern/subr_param.c')
-rw-r--r--sys/kern/subr_param.c7
1 files changed, 6 insertions, 1 deletions
diff --git a/sys/kern/subr_param.c b/sys/kern/subr_param.c
index f86e749..92c06c1 100644
--- a/sys/kern/subr_param.c
+++ b/sys/kern/subr_param.c
@@ -36,7 +36,7 @@
* SUCH DAMAGE.
*
* @(#)param.c 8.3 (Berkeley) 8/20/94
- * $Id: param.c,v 1.18 1996/05/02 14:19:18 phk Exp $
+ * $Id: param.c,v 1.19 1996/05/10 19:28:32 wollman Exp $
*/
#include "opt_sysvipc.h"
@@ -89,6 +89,11 @@ int maxfiles = NPROC*2; /* system wide open files limit */
int maxfilesperproc = NPROC*2; /* per-process open files limit */
int ncallout = 16 + NPROC; /* maximum # of timer events */
+#ifndef EXTRAVNODES
+#define EXTRAVNODES 0
+#endif
+int extravnodes = EXTRAVNODES; /* spare vnodes to allocate */
+
/* maximum # of mbuf clusters */
#ifndef NMBCLUSTERS
#define NMBCLUSTERS (512 + MAXUSERS * 16)
OpenPOWER on IntegriCloud