Skip to content

Commit 2cc6c8d

Browse files
Garrett D'Amorebehlendorf
authored andcommitted
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 - illumos/illumos-gate@b68a40a845 Reviewed by: George Wilson <george.wilson@delphix.com> Reviewed by: Eric Schrock <eric.schrock@delphix.com> Approved by: Richard Lowe <richlowe@richlowe.net> Signed-off-by: Brian Behlendorf <behlendorf1@llnl.gov> Issue #340
1 parent ef3c1de commit 2cc6c8d

File tree

1 file changed

+8
-1
lines changed

1 file changed

+8
-1
lines changed

module/zfs/vdev_cache.c

Lines changed: 8 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -71,9 +71,16 @@
7171
* 1<<zfs_vdev_cache_bshift byte reads by the vdev_cache (aka software
7272
* track buffer). At most zfs_vdev_cache_size bytes will be kept in each
7373
* vdev's vdev_cache.
74+
*
75+
* TODO: Note that with the current ZFS code, it turns out that the
76+
* vdev cache is not helpful, and in some cases actually harmful. It
77+
* is better if we disable this. Once some time has passed, we should
78+
* actually remove this to simplify the code. For now we just disable
79+
* it by setting the zfs_vdev_cache_size to zero. Note that Solaris 11
80+
* has made these same changes.
7481
*/
7582
int zfs_vdev_cache_max = 1<<14; /* 16KB */
76-
int zfs_vdev_cache_size = 10ULL << 20; /* 10MB */
83+
int zfs_vdev_cache_size = 0;
7784
int zfs_vdev_cache_bshift = 16;
7885

7986
#define VCBS (1 << zfs_vdev_cache_bshift) /* 64KB */

0 commit comments

Comments
 (0)