Re: Raw Device Vs.Cooked File
Posted in 1999
Topics: Performance & Tuning, Storage & Space Management, Server Administration
Harish I have never had a chance to benchmark the same system on cooked and raw dbspaces, so much of what I will say is based on theory rather than empirical evidence. Raw devices allow you to bypass the Unix file system when reading and writing from and to the database, thus making your read/writes faster. There was a problem also with losing data with cooked spaces because there is buffering at the Unix level, although I believe now the cooked spaces are created with the O_SYNC flag set, so thats no longer a problem. Some filesystems in Unix have very good lookahead algorithms, so in some cases (as per Elizabeth Suto's book) your read-aheads may be more efficient on cooked spaces than raw spaces. However (IMHO) you can set the RA_* parameters yourself in the ONCONFIG file to achieve same or similar results with raw spaces. To sum up, IMHO, raw devices are better. HTH Sujit hpandu <hpandu@miel.mot.com> on 06/30/99 03:11:26 AM Please respond to hpandu <hpandu@miel.mot.com> To: informix-list@iiug.org cc: (bcc: Sujit Pal) Subject: Raw Device Vs.Cooked File Hi, Informix supports to create dbspace either in a "raw device " space or as a "cooked file" What is the difference in performance in using either of dbspace. And which is advantageous in using. Can any of you brief me, how I can evaluate the performance in using this dbspaces. Thanks, Harish hpandu@miel.mot.com
[Original question SNIPPED] > There was a problem also with losing data with cooked spaces because there > is buffering at the Unix level, although I believe now the cooked spaces > are created with the O_SYNC flag set, so thats no longer a problem. Some Correct - well for Informix and Oracle anyway. Someone recently told me that Sybase STILL does not O_SYNC cooked files! > filesystems in Unix have very good lookahead algorithms, so in some cases A good lookahead algorithm can make up some of the difference for reads but it cannot help with writes at all. > (as per Elizabeth Suto's book) your read-aheads may be more efficient on > cooked spaces than raw spaces. However (IMHO) you can set the RA_* > parameters yourself in the ONCONFIG file to achieve same or similar results > with raw spaces. Also many disk drives and most intelligent cached controllers for RAID also perform readahead even for RAW device files so this is not a difference if you are using more advanced disks and/or RAID configurations. I does mean that you can lower the RA parameters you are using in the engine and improve cache reuse while sacrificing nothing in performance. Art S. Kagel