diff options
author | ivoras <ivoras@FreeBSD.org> | 2010-07-18 10:15:33 +0000 |
---|---|---|
committer | ivoras <ivoras@FreeBSD.org> | 2010-07-18 10:15:33 +0000 |
commit | 56cd1257b071a0d0f69cc9fb7b5664e12f442a95 (patch) | |
tree | d7182317550e770976bf8bdca3c0232b532c2ebd /sys | |
parent | 9a4f2044db5ac1e57a0a6bf065e461621b4e32dd (diff) | |
download | FreeBSD-src-56cd1257b071a0d0f69cc9fb7b5664e12f442a95.zip FreeBSD-src-56cd1257b071a0d0f69cc9fb7b5664e12f442a95.tar.gz |
In keeping with the Age-of-the-fruitbat theme, scale up hirunningspace on
machines which can clearly afford the memory.
This is a somewhat conservative version of the patch - more fine tuning may be
necessary.
Idea from: Thread on hackers@
Discussed with: alc
Diffstat (limited to 'sys')
-rw-r--r-- | sys/kern/vfs_bio.c | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/sys/kern/vfs_bio.c b/sys/kern/vfs_bio.c index b1b760a..35ea932 100644 --- a/sys/kern/vfs_bio.c +++ b/sys/kern/vfs_bio.c @@ -621,7 +621,9 @@ bufinit(void) lobufspace = hibufspace - MAXBSIZE; lorunningspace = 512 * 1024; - hirunningspace = 1024 * 1024; + hirunningspace = lmin(roundup(hibufspace/64, MAXBSIZE), 16*1024*1024); + if (hirunningspace < 1024 * 1024) + hirunningspace = 1024 * 1024; /* * Limit the amount of malloc memory since it is wired permanently into |