copy: increase copy buffer from 16K to 64K
authorLennart Poettering <lennart@poettering.net>
Fri, 24 May 2024 10:18:23 +0000 (12:18 +0200)
committerLennart Poettering <lennart@poettering.net>
Fri, 14 Jun 2024 11:44:29 +0000 (13:44 +0200)
In my tests here this tremendously speeds up things when initializing a
1G file from /dev/urandom

src/shared/copy.c

index def8bd1933e4464e0386b12d6176a9b98aa25541..ac1a9b5933a2444b6848b00d386a39ed6c5f6b9d 100644 (file)
@@ -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 */