[Top][All Lists]

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

Re: dd PATCH: add conv=direct

From: Bryce
Subject: Re: dd PATCH: add conv=direct
Date: Thu, 15 Apr 2004 15:06:30 +0100

On Wed, 2004-04-14 at 20:28, Jim Meyering wrote:
> Paul Eggert <address@hidden> wrote:
> > Assuming Jim Meyering like the idea of adding O_DIRECT support to
> > cp/mv, the next thing is to see how that might be done.
> I'm inclined to support it, based on Philip's anecdote about
> `cp' being much more efficient when using O_DIRECT.
> Philip, before we go too much further, can you describe the
> circumstances (hardware, OS, file system type, file sizes) under
> which O_DIRECT helps, and how much of a performance improvement
> to expect?  It would probably be enough just to describe your graph
>   http://oss.oracle.com/~bryce/cp.gif
> and the test conditions.

*scratch* um ok
Lets see, the test box I used for http://oss.oracle.com/~bryce/cp.gif
was -

HW:  Dell 2.8Ghz Intel P4 box
     1Gb ram
     40Gb IDE drive that gives ~40Mb/s throughput in raw mode

OS:  kernel 2.4 (2.4.21-9.0.1.EL) in a RHAT AS3 environment


The test was conducted on a 1Gb file created from /dev/urandom
The modifications I made to cp allowed for the passing of differing
block sizes for read and write blocks which allowed me to build up
the spreadsheet.

Runs were repeated 10 times and the average taken for each data point.
The average time for cp is in the bottom left with the standard
deviation +/- given.

The read and write axis is in byte sized block units. the value 0 was
relevant as it was a special case the determined the natural block size
(in this case 512 bytes)

So what does it all mean?

Well a NORMAL unmodified cp can copy a 1Gb file in 308 seconds
a O_DIRECT version of cp can copy the 1Gb file in 126 seconds

308 x 100
---        = 244% faster

So a database that takes, say, 8 hours to copy can now be copied in 3.2
hours. Small files eg 1Mb the copying speed differential is too small to
be of note. It's only in the larger file domain that you see definite

Note: OCFS is Oracle's Open Source FS contribution and is not a standard
component of normal linux distributions though it is our preferred FS of
choice for holding databases


reply via email to

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