bug-coreutils
[Top][All Lists]
Advanced

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

Re: cp: performance improvement with small files


From: Phillip Susi
Subject: Re: cp: performance improvement with small files
Date: Fri, 23 May 2008 11:05:28 -0400
User-agent: Thunderbird 2.0.0.14 (Windows/20080421)

Hauke Laging wrote:
Hello,

I just read an interesting hint in the German shell Usenet group (<address@hidden>). As I could not find anything about that point in your mailing list archive I would like to mention it here.

The author claims that he achieved a huge performance increase (more than factor 10) when copying a big amount of small files (1-10 KiB) by sorting by inode numbers first. This probably reduces the disk access time which becomes the dominating factor for small files.

It depends on what filesystem you are using. In ext3 this would help, but not on reiserfs, where there is no relationship between inode number and disk position.

In any case, this would significantly increase the complexity of cp for at best, dubious gains, so it isn't likely to happen. Rather than sort by inode, it would be better if filesystems that would benefit from that would keep the directory list sorted that way so that the list would already be sorted when passed to cp. IIRC, the defrag package sorts directories this way on ext2/3.





reply via email to

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