coreutils
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

dd: change default blocksize from 512 to 4096


From: luc-coreutils-patch
Subject: dd: change default blocksize from 512 to 4096
Date: Tue, 25 Apr 2017 09:21:19 +0200

>From 2c9f2ff2c7fd7dacd0131da6a37a9badc2fed62b Mon Sep 17 00:00:00 2001
From: Luc Gommans <address@hidden>
Date: Tue, 25 Apr 2017 07:31:05 +0200
Subject: [PATCH] dd: default blocksize 4096, not 512

In modern use, a block size of 512 bytes is almost never advantageous.
Never have I needed a block size lower than 4096. The speed difference
is often great, for example 30MB/s instead of 120MB/s is not uncommon.
---
 src/dd.c | 8 ++++----
 1 file changed, 4 insertions(+), 4 deletions(-)

diff --git a/src/dd.c b/src/dd.c
index 119f3070e..830b83b79 100644
--- a/src/dd.c
+++ b/src/dd.c
@@ -89,7 +89,7 @@
   while (0)
 
 /* Default input and output blocksize. */
-#define DEFAULT_BLOCKSIZE 512
+#define DEFAULT_BLOCKSIZE 4096
 
 /* How many bytes to add to the input and output block sizes before invoking
    malloc.  See dd_copy for details.  INPUT_BLOCK_SLOP must be no less than
@@ -560,17 +560,17 @@ Usage: %s [OPERAND]...\n\
       fputs (_("\
 Copy a file, converting and formatting according to the operands.\n\
 \n\
-  bs=BYTES        read and write up to BYTES bytes at a time (default: 512);\n\
+  bs=BYTES        read and write up to BYTES bytes at a time (default: 
4096);\n\
                   overrides ibs and obs\n\
   cbs=BYTES       convert BYTES bytes at a time\n\
   conv=CONVS      convert the file as per the comma separated symbol list\n\
   count=N         copy only N input blocks\n\
-  ibs=BYTES       read up to BYTES bytes at a time (default: 512)\n\
+  ibs=BYTES       read up to BYTES bytes at a time (default: 4096)\n\
 "), stdout);
       fputs (_("\
   if=FILE         read from FILE instead of stdin\n\
   iflag=FLAGS     read as per the comma separated symbol list\n\
-  obs=BYTES       write BYTES bytes at a time (default: 512)\n\
+  obs=BYTES       write BYTES bytes at a time (default: 4096)\n\
   of=FILE         write to FILE instead of stdout\n\
   oflag=FLAGS     write as per the comma separated symbol list\n\
   seek=N          skip N obs-sized blocks at start of output\n\
-- 
2.11.0





reply via email to

[Prev in Thread] Current Thread [Next in Thread]