diff options
author | pjd <pjd@FreeBSD.org> | 2008-01-24 11:24:16 +0000 |
---|---|---|
committer | pjd <pjd@FreeBSD.org> | 2008-01-24 11:24:16 +0000 |
commit | fbc761a694e650e4864a1f02a29ecbc7548904da (patch) | |
tree | a820204e8ef19eca7491de369577046ba88e3ad7 /sys/contrib | |
parent | 435a09e625aa62f4e1a89ab7741d374e4c4d0954 (diff) | |
download | FreeBSD-src-fbc761a694e650e4864a1f02a29ecbc7548904da.zip FreeBSD-src-fbc761a694e650e4864a1f02a29ecbc7548904da.tar.gz |
- Reduce how much ZFS caches by default. This is another change to mitigate
'kmem_map too small panics'.
- Print two warnings if there is not enough memory and not enough address
space.
- Improve comment.
Diffstat (limited to 'sys/contrib')
-rw-r--r-- | sys/contrib/opensolaris/uts/common/fs/zfs/arc.c | 9 |
1 files changed, 5 insertions, 4 deletions
diff --git a/sys/contrib/opensolaris/uts/common/fs/zfs/arc.c b/sys/contrib/opensolaris/uts/common/fs/zfs/arc.c index 4c7d559..420f802 100644 --- a/sys/contrib/opensolaris/uts/common/fs/zfs/arc.c +++ b/sys/contrib/opensolaris/uts/common/fs/zfs/arc.c @@ -1439,7 +1439,7 @@ arc_reclaim_needed(void) return (1); #endif #else - if (kmem_used() > (kmem_size() * 4) / 5) + if (kmem_used() > (kmem_size() * 3) / 4) return (1); #endif @@ -2729,7 +2729,7 @@ arc_init(void) arc_c_max = (arc_c * 8) - (1<<30); else arc_c_max = arc_c_min; - arc_c_max = MAX(arc_c * 6, arc_c_max); + arc_c_max = MAX(arc_c * 5, arc_c_max); #ifdef _KERNEL /* * Allow the tunables to override our calculations if they are @@ -2800,11 +2800,12 @@ arc_init(void) arc_dead = FALSE; #ifdef _KERNEL - /* Warn about ZFS memory requirements. */ + /* Warn about ZFS memory and address space requirements. */ if (((uint64_t)physmem * PAGESIZE) < (256 + 128 + 64) * (1 << 20)) { printf("ZFS WARNING: Recommended minimum RAM size is 512MB; " "expect unstable behavior.\n"); - } else if (kmem_size() < 512 * (1 << 20)) { + } + if (kmem_size() < 512 * (1 << 20)) { printf("ZFS WARNING: Recommended minimum kmem_size is 512MB; " "expect unstable behavior.\n"); printf(" Consider tuning vm.kmem_size and " |