From ec02650a6ba5ecc4a59004471fccbff23f2fb073 Mon Sep 17 00:00:00 2001 From: Kirk McKusick Date: Mon, 4 Mar 1985 01:22:10 -0800 Subject: [PATCH] only allocate 5% of memory to the buffer pool after the first 2M SCCS-vsn: sys/vax/vax/machdep.c 6.12 --- usr/src/sys/vax/vax/machdep.c | 11 ++++++++--- 1 file changed, 8 insertions(+), 3 deletions(-) diff --git a/usr/src/sys/vax/vax/machdep.c b/usr/src/sys/vax/vax/machdep.c index bf6e13861f..327a2d419c 100644 --- a/usr/src/sys/vax/vax/machdep.c +++ b/usr/src/sys/vax/vax/machdep.c @@ -1,4 +1,4 @@ -/* machdep.c 6.11 85/03/01 */ +/* machdep.c 6.12 85/03/03 */ #include "reg.h" #include "pte.h" @@ -125,11 +125,16 @@ startup(firstaddr) /* * Determine how many buffers to allocate. - * Use 10% of memory, with min of 16. + * Use 10% of memory for the first 2 Meg, 5% of the remaining + * memory. Insure a minimum of 16 buffers. * We allocate 1/2 as many swap buffer headers as file i/o buffers. */ if (bufpages == 0) - bufpages = physmem / 10 / CLSIZE; + if (physmem < (2 * 1024 * 1024)) + bufpages = physmem / 10 / CLSIZE; + else + bufpages = + ((2 * 1024 * 1024) / 5 + physmem / 5) / CLSIZE; if (nbuf == 0) { nbuf = bufpages / 2; if (nbuf < 16) -- 2.20.1