From 55efc5f3ee485b3e31a91c331f07c89aeccc4e89 Mon Sep 17 00:00:00 2001 From: Pádraig Brady Date: Fri, 6 Mar 2009 22:30:55 +0000 Subject: cat,cp,mv,install,split: Set the minimum IO block size used to 32KiB This is following on from this change: [02c3dc9d 2008-03-06 cat: use larger buffer sizes ...] which increased the IO block size used by cat by 8 times, but also capped it at 32KiB. * NEWS: Mention the change in behavior. * src/system.h: Add a new io_blksize() function that returns the max of ST_BLKSIZE or 32KiB, as this was seen as a good value for a minimum block size to use to get good performance while minimizing system call overhead. * src/cat.c: Use it. * src/copy.c: ditto * src/split.c: ditto --- src/split.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'src/split.c') diff --git a/src/split.c b/src/split.c index 1d8a94ca7..f8e26835b 100644 --- a/src/split.c +++ b/src/split.c @@ -554,7 +554,7 @@ main (int argc, char **argv) if (fstat (STDIN_FILENO, &stat_buf) != 0) error (EXIT_FAILURE, errno, "%s", infile); - in_blk_size = ST_BLKSIZE (stat_buf); + in_blk_size = io_blksize (stat_buf); buf = ptr_align (xmalloc (in_blk_size + 1 + page_size - 1), page_size); -- cgit v1.2.3-54-g00ecf