From 9b2d9b07a17158b3a2830e1b77ae77534eed3787 Mon Sep 17 00:00:00 2001 From: Lennart Poettering Date: Fri, 24 May 2024 12:18:23 +0200 Subject: [PATCH] copy: increase copy buffer from 16K to 64K In my tests here this tremendously speeds up things when initializing a 1G file from /dev/urandom --- src/shared/copy.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/shared/copy.c b/src/shared/copy.c index def8bd1933e..ac1a9b5933a 100644 --- a/src/shared/copy.c +++ b/src/shared/copy.c @@ -41,8 +41,8 @@ #include "user-util.h" #include "xattr-util.h" -/* If we copy via a userspace buffer, size it to 16K */ -#define COPY_BUFFER_SIZE (16U*1024U) +/* If we copy via a userspace buffer, size it to 64K */ +#define COPY_BUFFER_SIZE (64U*U64_KB) /* If a byte progress function is specified during copying, never try to copy more than 1M, so that we can * reasonably call the progress function still */ -- 2.47.3