Re: Raw vs. Cooked files
Posted in 2005
Yes even with DB2 UDB you can get 20-25% improvement going with RAW over Cooked. If you use cooked the IO has to be written by the Unix Operating system - another set of commands to execute. Raw is controlled by the database. Why o Why Are we still having this discussion? Rob Vorbroker --- Rajesh Kapur <rkapur@mpr.org> wrote: > Hello, > > I am installing IDS 10 on RHEL3 on an intel x86 > server. I need to make the > choice between raw devices and cooked files. > I found the following information in the FAQ's. Is > this information still > accurate? Do cooked files continue to be > significantly slower than the raw > files? I have heard that UNIX file systems have > improved over the years and > the performance divide between raw and cooked files > has narrowed > considerabley. Is it true? > > Thanks! > - Rajesh > -------------------------------------------------------------------------------------- > > 6.38 Is raw disk faster than cooked files? > On 22nd Jun 1998 kagel@bloomberg.net (Art S. Kagel) > wrote:- > > ....................the safety issue of cooked files > is no longer a problem. > The big problem with cooked files still is > performance. All writes and reads > to/from cooked files MUST go through the UNIX buffer > cache. This means an > additional copy from the server's output buffer to > the UNIX buffer page then > a synchronous write to disk. This is opposed to a > write to a way file where > the server's output buffer is written directly to > disk without the > intervening copy. This is just faster. Anyone who > has written anything that > can test this can attest to the difference in speed. > Here are my test > results: > > > FileType Sync? Times (real/user/system) 2run avg > --------------- ----- > ----------------------------------------- > Filesystem file N 14.40/3.70/2.52 > Y 15.02/3.61/2.63 > Cooked disk N 12.81/3.74/2.24 > Y 13.42/3.84/2.43 > Raw disk N 9.32/3.67/1.52 > Y 9.40/3.66/1.44 > > From this you can clearly see the cost of Cooked > files and of synced cooked > files. The tests were done with a version of my > ul.ec utility modified to > optionally open the output file O_SYNC. Cooked disk > partition is almost 50% > slower than raw disk partition and cooked filesystem > files are almost 60% > slower. The penalty for O_SYNC is an additional 5% > for cooked files and > negligible for RAW files (as expected). The test > file was 2.85MB written > using 4K I/O pages (the default fopen application > buffer size) which should > simulate Informix performance. The Cooked and Raw > disk partition tests were > conducted to a singleton 9GB Fast Wide SCSI II drive > using the raw and > cooked device files corresponding to the same drive. > > > Rob Vorbroker Phone: 513/309-1112 sending to informix-list