From d591138fb8bc4e3d650883e384879a0014e38087 Mon Sep 17 00:00:00 2001 From: Matthew Ahrens Date: Wed, 1 Jun 2022 15:38:40 -0700 Subject: [PATCH] increase zfs send prefetching (#456) When `zfs send` has to retrieve the data from the object store (as opposed to zettacache), we can benefit from a larger prefetch queue depth, similar to what we see for predictive prefetching. This is because we need a high GetObject queue depth (dozens of requests, covering dozends of MB's of data) to get good throughput from S3. This commit increases the zfs send prefetching to 64MB (from 16MB), and clarifies the comment around it (there's really no downside to increasing it aside from RAM usage, since this is not using ARC prefetching any more). --- module/zfs/dmu_send.c | 10 ++++------ 1 file changed, 4 insertions(+), 6 deletions(-) diff --git a/module/zfs/dmu_send.c b/module/zfs/dmu_send.c index af08cc02bdb0..64aecf8bf0c5 100644 --- a/module/zfs/dmu_send.c +++ b/module/zfs/dmu_send.c @@ -69,13 +69,11 @@ /* Set this tunable to TRUE to replace corrupt data with 0x2f5baddb10c */ static int zfs_send_corrupt_data = B_FALSE; /* - * This tunable controls the amount of data (measured in bytes) that will be - * prefetched by zfs send. If the main thread is blocking on reads that haven't - * completed, this variable might need to be increased. If instead the main - * thread is issuing new reads because the prefetches have fallen out of the - * cache, this may need to be decreased. + * This tunable controls the amount of memory (measured in bytes) that will be + * used to buffer data read for zfs send. If the main thread is blocking on + * reads that haven't completed, this variable might need to be increased. */ -static int zfs_send_queue_length = SPA_MAXBLOCKSIZE; +static int zfs_send_queue_length = 64 * 1024 * 1024; /* * This tunable controls the length of the queues that zfs send worker threads * use to communicate. If the send_main_thread is blocking on these queues,