Cooked files vs. raw partitions
Posted in 2004
A user rebuilding his database asked whether to use cooked files or raw partitions for IDS chunks, having heard Informix's advice had shifted toward cooked files. The consensus reply was overwhelmingly 'raw': raw devices bypass OS page caching and extra software layers, giving direct, faster I/O (one poster reported loads roughly 10x faster than on cooked space) and better control over data placement across disks. Caveats were noted: results depend on OS, filesystem type, controller caching and KAIO availability (e.g. Linux at the time), so benchmarking your own setup was advised.
Auto-generated by DrWatson from the posts below — may be imperfect; read the full thread.
Topics: Installation, Setup & Upgrades
We're preparing to update our application software which requires some database structure changes. Our plan is to copy our current database, and let the vendor update the copy. This brings up the question of cooked-files vs. raw-partitions. When we first installed IDS, Informix' recommendation was to use raw disk partitions. When I took a couple classes from Informix, I seem to recall that they changed their recommendation to cooked files. What is the general consensus on this amongst users? Thanks, Brian McLaughlin Administrative Computing George Fox University (503) 554-2587
Always use raw partitions for Informix !!!. Where and who recommended you to use cooked files with informix and which doucumentation has that wrirtten in? "BRIAN MCLAU...." <bmclaugh@georgefox.edu> wrote:We're preparing to update our application software which requires some database structure changes. Our plan is to copy our current database, and let the vendor update the copy. This brings up the question of cooked-files vs. raw-partitions. When we first installed IDS, Informix' recommendation was to use raw disk partitions. When I took a couple classes from Informix, I seem to recall that they changed their recommendation to cooked files. What is the general consensus on this amongst users? Thanks, Brian McLaughlin Administrative Computing George Fox University (503) 554-2587 Do you Yahoo!? Yahoo! Finance Tax Center - File online. File on time.
forever raw. Christine Normile I/T Specialist, Informix Solutions Data Management Worldwide Technical Enablement Telephone: 877-252-5399 T/L 273-0981 Mobile: 210-365-5073 "BRIAN MCLAU...." <bmclaugh@georgefox.edu> Sent by: forum.subscriber@iiug.org 03/22/2004 01:58 PM To: ids@iiug.org cc: Subject: Cooked files vs. raw partitions [2705] We're preparing to update our application software which requires some database structure changes. Our plan is to copy our current database, and let the vendor update the copy. This brings up the question of cooked-files vs. raw-partitions. When we first installed IDS, Informix' recommendation was to use raw disk partitions. When I took a couple classes from Informix, I seem to recall that they changed their recommendation to cooked files. What is the general consensus on this amongst users? Thanks, Brian McLaughlin Administrative Computing George Fox University (503) 554-2587
Brian -- We use Informix 9.3 and I see noticable speed improvements in using raw files, especially for databases with large amounts of disk access. Loading 39 million rows of spatial data takes an hour or two on our Sun box; loading the same data into cooked spaces seems to take longer by a factor of about 10. Greg Williamson DBA GlobeXplorer LLC >> We're preparing to update our application software which requires some >> database structure changes. Our plan is to copy our current database, and let >> the vendor update the copy. This brings up the question of cooked-files vs. >> raw-partitions. >> >> When we first installed IDS, Informix' recommendation was to use raw disk >> partitions. When I took a couple classes from Informix, I seem to recall that >> they changed their recommendation to cooked files. >> >> What is the general consensus on this amongst users? >> >> Thanks, >> >> Brian McLaughlin
Hi Christine, Now that oughta be on a t-shirt!! ;) Norma Jean -----Original Message----- From: cnormile@us.ibm.com [mailto:cnormile@us.ibm.com] Sent: Monday, March 22, 2004 4:18 PM To: ids@iiug.org; forum.subscriber@iiug.org Subject: Re: Cooked files vs. raw partitions [2707] forever raw. Christine Normile I/T Specialist, Informix Solutions Data Management Worldwide Technical Enablement Telephone: 877-252-5399 T/L 273-0981 Mobile: 210-365-5073 "BRIAN MCLAU...." <bmclaugh@georgefox.edu> Sent by: forum.subscriber@iiug.org 03/22/2004 01:58 PM To: ids@iiug.org cc: Subject: Cooked files vs. raw partitions [2705] We're preparing to update our application software which requires some database structure changes. Our plan is to copy our current database, and let the vendor update the copy. This brings up the question of cooked-files vs. raw-partitions. When we first installed IDS, Informix' recommendation was to use raw disk partitions. When I took a couple classes from Informix, I seem to recall that they changed their recommendation to cooked files. What is the general consensus on this amongst users? Thanks, Brian McLaughlin Administrative Computing George Fox University (503) 554-2587 ----------------------------------------- ============================================================ The information contained in this message may be privileged and confidential and protected from disclosure. If the reader of this message is not the intended recipient, or an employee or agent responsible for delivering this message to the intended recipient, you are hereby notified that any reproduction, dissemination or distribution of this communication is strictly prohibited. If you have received this communication in error, please notify us immediately by replying to the message and deleting it from your computer. Thank you. Tellabs ============================================================
Brian, Here is a very heart felt if somewhat less fervent response to your inquiry. I must agree with both Ravi, Christine and Greg that raw is the way to go. When you build your database using cooked files, you rely upon the operating system for all file storage/access/maintenance needs. While on the surface, this would appear to provide ease of use benefits, there are certain more critical areas left unmentioned. One of these is performance. When you use cooked files with your Informix engine you are inserting one or more additional layers of software in between the engine and the data. When you use raw volumes, the engine can access the data directly, or at least more so than otherwise. There is another aspect of the performance issue, but it only pertains to installations without RAID or under RAID 5. In the past, with either RAID-less or sub-5 RAID, I have had the opportunity to take a severely swap-happy configuration and turn it into a real performer buy redesigning the physical distribution of the raw volumes across the separate hard drives. While this sort of thing may be possible with cooked files, I'm not aware if it. I hope this helps. Larry -----Original Message----- From: BRIAN MCLAU.... [mailto:bmclaugh@georgefox.edu] Sent: Monday, March 22, 2004 11:59 AM To: ids@iiug.org Subject: Cooked files vs. raw partitions [2705] We're preparing to update our application software which requires some database structure changes. Our plan is to copy our current database, and let the vendor update the copy. This brings up the question of cooked-files vs. raw-partitions. When we first installed IDS, Informix' recommendation was to use raw disk partitions. When I took a couple classes from Informix, I seem to recall that they changed their recommendation to cooked files. What is the general consensus on this amongst users? Thanks, Brian McLaughlin Administrative Computing George Fox University (503) 554-2587
Raw = Informix (advanced DBAs, Informix = Information for Unix,) Cooked = Oracle (poor DBAs, they don't know how to define, so they say, Informix stuf) Raw forever !!! (you must be a real DBA, with Unix Skills of course) (Francisco Virgilio, ex-informix Brazil) -----Original Message----- From: forum.subscriber@iiug.org [mailto:forum.subscriber@iiug.org]On Behalf Of Christine N.... Sent: segunda-feira, 22 de março de 2004 19:18 To: ids@iiug.org Subject: Re: Cooked files vs. raw partitions [2707] forever raw. Christine Normile I/T Specialist, Informix Solutions Data Management Worldwide Technical Enablement Telephone: 877-252-5399 T/L 273-0981 Mobile: 210-365-5073 "BRIAN MCLAU...." <bmclaugh@georgefox.edu> Sent by: forum.subscriber@iiug.org 03/22/2004 01:58 PM To: ids@iiug.org cc: Subject: Cooked files vs. raw partitions [2705] We're preparing to update our application software which requires some database structure changes. Our plan is to copy our current database, and let the vendor update the copy. This brings up the question of cooked-files vs. raw-partitions. When we first installed IDS, Informix' recommendation was to use raw disk partitions. When I took a couple classes from Informix, I seem to recall that they changed their recommendation to cooked files. What is the general consensus on this amongst users? Thanks, Brian McLaughlin Administrative Computing George Fox University (503) 554-2587
All things being equal raw is always faster. For raw disk I/O, page cacheing and the paging mechanism are not used; the data is read or written directly between the device and the user address space. Thus, raw disk I/O avoids the need to copy between the kernel address space and user address space. Each read or write system call results in a physical disk transfer. Raw I/O, coupled with synchronous writes is often used by database management systems. They control when the data is read and/or written to or from the disk, and perform disk updates only when necessary. Raw disk I/O is achieved using character special files with associated character device software. However, a driver that is implemented with both block and character functionality will use indirect calls to the block driver strategy() function via physiock() to the achieve the physical I/O operation However, all things are not always equal. Some of the earlier disk caching techniques were only applied to filesystem io, such as Veritas directio, so when writing to disk you were actually writing to NVRAM backed cache and getting memory write speeds. AFAIK all these 'clever' controllers/software are now capable of using the same techniques on raw. Bottom line: raw is faster, but if in doubt test it "BRIAN MCLAU...." wrote: > > We're preparing to update our application software which requires some database structure changes. Our plan is to copy our current database, and let the vendor update the copy. This brings up the question of cooked-files vs. raw-partitions. > > When we first installed IDS, Informix' recommendation was to use raw disk partitions. When I took a couple classes from Informix, I seem to recall that they changed their recommendation to cooked files. > > What is the general consensus on this amongst users? > > Thanks, > > Brian McLaughlin > Administrative Computing > George Fox University > (503) 554-2587 -- Paul Watson # Oninit Ltd # Growing old is mandatory Tel: +44 1436 672201 # Growing up is optional Fax: +44 1436 678693 # Mob: +44 7818 003457 # www.oninit.com #
Hi, generally speaking, raw devices are the preferred choice - as everybody else who responded so far has already said. However, performance of raw devices and cooked files might vary rather widely, depending on several factors like: - operating system and version of it, - file system in use for cooked files, - disk storage hardware (including controllers), - (software) driver availability for the respective hardware, - kernel asynchoneous I/O (KAIO) availability. E.g. consider Linux : - there are now several file system types to choose from, some performing very well for IDS using cooked files (e.g. ext2), some rather badly (e.g. reiserfs) and some may be mediocre (e.g. xfs or jfs ?), - there is raw device support, but KAIO is only now beginning to be supported by Linux distributions (kernel 2.6), - so you might find that a "fast filesystem" for cooked files might be better performing than raw devices without KAIO. Once more this shows that reaping the last 10 % of possible performance increase will also cost the most effort. In this case mostly for determining which combination of parameters for the above factors will be best for your scenario/environment ... So to the T-shirt print "forever raw" I would add (in smaller print): "most of the time" ... ;) Regards, Martin -- Martin Fuerderer IBM Informix Development Munich Data Management Solutions "BRIAN MCLAU...." <bmclaugh@georgefox.edu> Sent by: forum.subscriber@iiug.org 22.03.2004 20:58 To ids@iiug.org cc Subject Cooked files vs. raw partitions [2705] We're preparing to update our application software which requires some database structure changes. Our plan is to copy our current database, and let the vendor update the copy. This brings up the question of cooked-files vs. raw-partitions. When we first installed IDS, Informix' recommendation was to use raw disk partitions. When I took a couple classes from Informix, I seem to recall that they changed their recommendation to cooked files. What is the general consensus on this amongst users? Thanks, Brian McLaughlin Administrative Computing George Fox University (503) 554-2587
Yes,
In Oracle don't exists an equivalent to "ontape" then they stop the server
and backup the "datafiles" (chunks) with "tar" o "cpio" commands.
Quique.
At 20:17 22/03/2004 -0500, Francisco V.... wrote:
>Raw = Informix (advanced DBAs, Informix = Information for Unix,)
>
>Cooked = Oracle (poor DBAs, they don't know how to define, so they say,
>Informix stuf)
>
>Raw forever !!! (you must be a real DBA, with Unix Skills of course)
>
>(Francisco Virgilio, ex-informix Brazil)
>
>-----Original Message-----
>From: forum.subscriber@iiug.org [mailto:forum.subscriber@iiug.org]On
>Behalf Of Christine N....
>Sent: segunda-feira, 22 de março de 2004 19:18
>To: ids@iiug.org
>Subject: Re: Cooked files vs. raw partitions [2707]
>
>
>forever raw.
>
>Christine Normile
>I/T Specialist, Informix Solutions
>Data Management Worldwide Technical Enablement
>Telephone: 877-252-5399 T/L 273-0981
>Mobile: 210-365-5073
>
>
>
>
>
>
>
>"BRIAN MCLAU...." <bmclaugh@georgefox.edu>
>Sent by: forum.subscriber@iiug.org
>03/22/2004 01:58 PM
>
> To: ids@iiug.org
> cc:
> Subject: Cooked files vs. raw partitions [2705]
>
>
>We're preparing to update our application software which requires some
>database structure changes. Our plan is to copy our current database, and
>let the vendor update the copy. This brings up the question of
>cooked-files vs. raw-partitions.
>
>When we first installed IDS, Informix' recommendation was to use raw disk
>partitions. When I took a couple classes from Informix, I seem to recall
>that they changed their recommendation to cooked files.
>
>What is the general consensus on this amongst users?
>
>Thanks,
>
>Brian McLaughlin
>Administrative Computing
>George Fox University
>(503) 554-2587
Now you guys have me thinking about being back in Florida and eating some oysters. I thought this was a database thread.... mac ps. I will take one of those shirts. :-) ----- Original Message ----- From: "NormaJean.S...." <NormaJean.Sebastian@tellabs.com> To: <ids@iiug.org> Sent: Monday, March 22, 2004 4:54 PM Subject: RE: Cooked files vs. raw partitions [2709] > > Hi Christine, > > Now that oughta be on a t-shirt!! ;) > > Norma Jean > > > -----Original Message----- > From: cnormile@us.ibm.com [mailto:cnormile@us.ibm.com] > Sent: Monday, March 22, 2004 4:18 PM > To: ids@iiug.org; forum.subscriber@iiug.org > Subject: Re: Cooked files vs. raw partitions [2707] > > > forever raw. > > Christine Normile > I/T Specialist, Informix Solutions > Data Management Worldwide Technical Enablement > Telephone: 877-252-5399 T/L 273-0981 > Mobile: 210-365-5073 > > > > > > > > "BRIAN MCLAU...." <bmclaugh@georgefox.edu> > Sent by: forum.subscriber@iiug.org > 03/22/2004 01:58 PM > > To: ids@iiug.org > cc: > Subject: Cooked files vs. raw partitions [2705] > > > We're preparing to update our application software which requires some > database structure changes. Our plan is to copy our current database, > and > let the vendor update the copy. This brings up the question of > cooked-files vs. raw-partitions. > > When we first installed IDS, Informix' recommendation was to use raw > disk > partitions. When I took a couple classes from Informix, I seem to > recall > that they changed their recommendation to cooked files. > > What is the general consensus on this amongst users? > > Thanks, > > Brian McLaughlin > Administrative Computing > George Fox University > (503) 554-2587 > > > > > > > > > ----------------------------------------- > ============================================================ > The information contained in this message may be privileged > and confidential and protected from disclosure. If the > reader of this message is not the intended recipient, or an > employee or agent responsible for delivering this message to > the intended recipient, you are hereby notified that any > reproduction, dissemination or distribution of this > communication is strictly prohibited. If you have received > this communication in error, please notify us immediately by > replying to the message and deleting it from your computer. > > Thank you. > Tellabs > ============================================================ > >