From: Lennart Poettering Date: Fri, 24 May 2024 10:18:23 +0000 (+0200) Subject: copy: increase copy buffer from 16K to 64K X-Git-Tag: v257-rc1~1148^2 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=refs%2Fpull%2F33330%2Fhead;p=thirdparty%2Fsystemd.git 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 --- 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 */