coreutils
[Top][All Lists]
Advanced

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

Re: [PATCH] cat, cp, mv, install, split: Set the minimum IO block size u


From: Jim Meyering
Subject: Re: [PATCH] cat, cp, mv, install, split: Set the minimum IO block size used, to 64KiB
Date: Mon, 30 Apr 2012 08:16:38 +0200

Pádraig Brady wrote:
> I'm a little wary of this being too aggressive,
> but it does give a noticeable (13%) boost on my new laptop.
> Here are the numbers from dd bs=$blksize if=/dev/zero of=/dev/null
>
>    blksize  system-1   system-2
>    ----------------------------
>       1024  734 MB/s   1.7 GB/s
>       2048  1.3 GB/s   3.0 GB/s
>       4096  2.4 GB/s   5.1 GB/s
>       8192  3.5 GB/s   7.3 GB/s
>      16384  3.9 GB/s   9.4 GB/s
>      32768  5.2 GB/s   9.9 GB/s
>      65536  5.3 GB/s  11.2 GB/s
>     131072  5.5 GB/s  11.8 GB/s
>     262144  5.7 GB/s  11.6 GB/s
>     524288  5.7 GB/s  11.4 GB/s
>    1048576  5.8 GB/s  11.4 GB/s

I think it's time to apply your patch:

    http://lists.gnu.org/archive/html/coreutils/2011-07/msg00059.html

Here are numbers from a 3.2GHz i7-970 with 1333MHz DDR3:

   1024=2.6 GB/s
   2048=4.4 GB/s
   4096=6.5 GB/s
   8192=8.5 GB/s
  16384=10.1 GB/s
  32768=11.1 GB/s
  65536=12.0 GB/s
 131072=12.3 GB/s
 262144=12.5 GB/s
 524288=12.5 GB/s
1048576=12.6 GB/s

One minor suggestion: change s/1/2/ in "-sINT 1" here.

  +     timeout --foreground -sINT 1 \
  +       dd bs=$bs if=/dev/zero of=/dev/null 2>&1 |
  +        sed -n 's/.* \([0-9.]* [GM]B\/s\)/\1/p'

In this comment:

   for i in $(seq 0 10); do
     bs=$((1024*2**$i))
     printf "%7s=" $bs
     timeout --foreground -sINT 2 \
       dd bs=$bs if=/dev/zero of=/dev/null 2>&1 |
         sed -n 's/.* \([0-9.]* [GM]B\/s\)/\1/p'
   done

That makes the numbers more reproducible.
Otherwise, for large block sizes, I'm guessing that the
interrupted transfer can make too large a difference.



reply via email to

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