diff options
author | mm <mm@FreeBSD.org> | 2011-06-28 06:32:35 +0000 |
---|---|---|
committer | mm <mm@FreeBSD.org> | 2011-06-28 06:32:35 +0000 |
commit | 953bf4fcbd8cfe9a78938869f7f1178e80ac1da5 (patch) | |
tree | b05fd3a8eb1c490834ac64b92a2c498f08c51125 /sys/cddl | |
parent | ff36ddb644d4c0177451a08b8f042ed7ccabd196 (diff) | |
download | FreeBSD-src-953bf4fcbd8cfe9a78938869f7f1178e80ac1da5.zip FreeBSD-src-953bf4fcbd8cfe9a78938869f7f1178e80ac1da5.tar.gz |
Disable vdev cache (readahead) by default.
The vdev cache is very underutilized (hit ratio 30%-70%) and may consume
excessive memory on systems with many vdevs.
Illumos-gate revision: 13346
Obtained from: Illumos (Bug #175)
MFC after: 1 week
Diffstat (limited to 'sys/cddl')
-rw-r--r-- | sys/cddl/contrib/opensolaris/uts/common/fs/zfs/vdev_cache.c | 9 |
1 files changed, 8 insertions, 1 deletions
diff --git a/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/vdev_cache.c b/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/vdev_cache.c index 7978d61..ef9d4b5 100644 --- a/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/vdev_cache.c +++ b/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/vdev_cache.c @@ -71,9 +71,16 @@ * 1<<zfs_vdev_cache_bshift byte reads by the vdev_cache (aka software * track buffer). At most zfs_vdev_cache_size bytes will be kept in each * vdev's vdev_cache. + * + * TODO: Note that with the current ZFS code, it turns out that the + * vdev cache is not helpful, and in some cases actually harmful. It + * is better if we disable this. Once some time has passed, we should + * actually remove this to simplify the code. For now we just disable + * it by setting the zfs_vdev_cache_size to zero. Note that Solaris 11 + * has made these same changes. */ int zfs_vdev_cache_max = 1<<14; /* 16KB */ -int zfs_vdev_cache_size = 10ULL << 20; /* 10MB */ +int zfs_vdev_cache_size = 0; int zfs_vdev_cache_bshift = 16; #define VCBS (1 << zfs_vdev_cache_bshift) /* 64KB */ |