coreutils
[Top][All Lists]
Advanced

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

Re: Another rfe: "cp" this time


From: Pádraig Brady
Subject: Re: Another rfe: "cp" this time
Date: Tue, 01 May 2012 22:16:06 +0100
User-agent: Mozilla/5.0 (X11; Linux x86_64; rv:6.0) Gecko/20110816 Thunderbird/6.0

On 05/01/2012 05:59 PM, Pádraig Brady wrote:
> Now many coreutils already provide such a hint to the kernel:
> http://git.sv.gnu.org/gitweb/?p=coreutils.git;a=commit;h=47076e3c
> But copy.c does not currently. I'm not sure why I didn't
> do it for copy.c now, but I look into adding it.

The attached seems to give another 5% speedup!

$ dd bs=1MB count=200 if=/dev/zero of=file.in

$ dd of=file.in oflag=nocache conv=notrunc,fdatasync count=0
$ time ./cp-before file.in /dev/shm/; rm /dev/shm/file.in
real    0m0.843s
user    0m0.005s
sys     0m0.417s
$ dd of=file.in oflag=nocache conv=notrunc,fdatasync count=0
$ time ./cp-before file.in /dev/shm/; rm /dev/shm/file.in
real    0m0.856s
user    0m0.002s
sys     0m0.422s

$ dd of=file.in oflag=nocache conv=notrunc,fdatasync count=0
$ time ./cp-after file.in /dev/shm/; rm /dev/shm/file.in
real    0m0.809s
user    0m0.006s
sys     0m0.373s
$ dd of=file.in oflag=nocache conv=notrunc,fdatasync count=0
$ time ./cp-after file.in /dev/shm/; rm /dev/shm/file.in
real    0m0.804s
user    0m0.007s
sys     0m0.405s

cheers,
Pádraig.

Attachment: cp-fadvise.diff
Description: Text document


reply via email to

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