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

Re: why copying files so slow in ext3



Li Chengyuan wrote:
> 
> it takes 5 seconds to copy 20M files from one directory to another.However it
> only takes no more than 1 second in the ext2 filesystem.
> 

Sometimes it just seems that way, but it's not really so.

When you copy the files with ext2, all the written data is left
in memory for up to thirty seconds.  So if you run

	time cp -r dir1 dir2

then all you hve measured is the time to read the files, not the
time to write them.  Try this:

	time (cp -r dir1 dir2 ; sync )

and you'll see that the two are closer.

The reason for this is that ext3 only leaves write data in memory
for up to five seconds, not thirty.





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