diff options
author | Garrett D'Amore <[email protected]> | 2011-04-22 00:49:41 -0700 |
---|---|---|
committer | Brian Behlendorf <[email protected]> | 2011-08-01 12:09:11 -0700 |
commit | 2cc6c8db12eaf8d1a1c17a13fbc6d25d8244486e (patch) | |
tree | 6d5219dac8f1b82e4ccfd05a0f15d1d473838a07 /module/zfs/vdev_cache.c | |
parent | ef3c1dea7024b07b4ace6115de9f22a99c1394d8 (diff) |
Illumos #175: zfs vdev cache consumes excessive memory
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.
References to Illumos issue and patch:
- https://www.illumos.org/issues/175
- https://github.com/illumos/illumos-gate/commit/b68a40a845
Reviewed by: George Wilson <[email protected]>
Reviewed by: Eric Schrock <[email protected]>
Approved by: Richard Lowe <[email protected]>
Signed-off-by: Brian Behlendorf <[email protected]>
Issue #340
Diffstat (limited to 'module/zfs/vdev_cache.c')
-rw-r--r-- | module/zfs/vdev_cache.c | 9 |
1 files changed, 8 insertions, 1 deletions
diff --git a/module/zfs/vdev_cache.c b/module/zfs/vdev_cache.c index 0d1fe7d2c..e2f8040d1 100644 --- a/module/zfs/vdev_cache.c +++ b/module/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 */ |