summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authoravg <avg@FreeBSD.org>2014-10-07 14:30:24 +0000
committeravg <avg@FreeBSD.org>2014-10-07 14:30:24 +0000
commita402f22912f751877b91f20b328c3f8ffc169b1e (patch)
treef34ac9bd5d13a0df4369131b3baa928f7b9c05af
parent073bd9bd13425e6588e77bb94607bc4fea41ba02 (diff)
downloadFreeBSD-src-a402f22912f751877b91f20b328c3f8ffc169b1e.zip
FreeBSD-src-a402f22912f751877b91f20b328c3f8ffc169b1e.tar.gz
reduce L2ARC_WRITE_SIZE on FreeBSD
FreeBSD has ARC_BUFC_NUMMETADATALISTS metadata lists and ARC_BUFC_NUMDATALISTS data lists (currently both are 16) while illumos has just a single list of each kind. L2ARC_WRITE_SIZE determines the default value of l2arc_write_max which defines limits on how much data is scanned and written to a cache device during each run of the l2arc feed thread. The limits are applied on the per buffer list basis. Because FreeBSD has more lists we proportionally reduce the limits. Reviewed by: Brendan Gregg (earlier version) MFC after: 2 weeks Sponsored by: HybridCluster
-rw-r--r--sys/cddl/contrib/opensolaris/uts/common/fs/zfs/arc.c4
1 files changed, 3 insertions, 1 deletions
diff --git a/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/arc.c b/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/arc.c
index 1a1d4d8..fb7d1d8 100644
--- a/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/arc.c
+++ b/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/arc.c
@@ -711,7 +711,9 @@ uint64_t zfs_crc64_table[256];
* Level 2 ARC
*/
-#define L2ARC_WRITE_SIZE (8 * 1024 * 1024) /* initial write max */
+/* initial write max */
+#define L2ARC_WRITE_SIZE \
+ (8 * 1024 * 1024 * 2 / (ARC_BUFC_NUMMETADATALISTS + ARC_BUFC_NUMDATALISTS))
#define L2ARC_HEADROOM 2 /* num of writes */
/*
* If we discover during ARC scan any buffers to be compressed, we boost
OpenPOWER on IntegriCloud