Raw Device Vs.Cooked File
Posted in 1999
Topics: Performance & Tuning, Storage & Space Management
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
hpandu wrote in message <3779ED4E.ECC50B45@miel.mot.com>... >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 Performance. Most techies will tell you that the performance from raw disk exceeds that of cooked. The percentage gains vary depending upon a number of factors, such as database server usage, disk hardware and OS. It used to be the case that with cooked space UNIX might buffer a write which Informix thought had been committed, thus jeapordising the recovery functionality of the database server. But I've recently read postings from David Williams and others saying that this is no longer so. Neil Truby Londis Stores Hampton Hill, UK
hpandu wrote: > > 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. RAW devices are 15-35% faster than cooked devices and faster still than files in a filesystem. This is because the data does not have to be copied through the OS buffer cache before being flushed to disk or to the Informix buffers. Art S. Kagel
On Wed, 30 Jun 1999 13:55:32 -0400, "Art S. Kagel" <kagel@bloomberg.net> wrote: >hpandu wrote: >> >> 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. > >RAW devices are 15-35% faster than cooked devices and faster still than >files in a filesystem. This is because the data does not have to be >copied through the OS buffer cache before being flushed to disk or to >the Informix buffers. > How about backup, I would really prefer a Unix filesystem. Also if a table grows larger than 2 gig would Informix manage creating another table on a Unix file system?
Gary Quiring wrote:
>
> On Wed, 30 Jun 1999 13:55:32 -0400, "Art S. Kagel" <kagel@bloomberg.net>
> wrote:
>
> >hpandu wrote:
> >>
> >> 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.
> >
> >RAW devices are 15-35% faster than cooked devices and faster still than
> >files in a filesystem. This is because the data does not have to be
> >copied through the OS buffer cache before being flushed to disk or to
> >the Informix buffers.
> >
> How about backup, I would really prefer a Unix filesystem.
You cannot successfully backup a running Informix Dynamic Server (IDS)
instance using FS archiving tools while it is running anyway. You
would have to take the engine offline to do that. It is NOT
recommended. Informix, however, provides two archiving utilities,
ontape and onbar, that can archive the engine and its data while the
engine is online and actively being updated! These tools do not care
whether the data chunks are RAW or COOKED they work the same.
> Also if a table grows larger than 2 gig would Informix manage creating
> another table on a Unix file system?
Informix IDS tables are created in a dbspace, or are fragmented across
more than one dbspace. A dbspace is created from one or more pieces of
disk space called chunks. A chunk is <2GB and can be created from a
RAW (character) device, a COOKED (block) device, or an OS file. So you
see any OS limit on file sizes does not effect Informix tables.
Regardless of the type of disk space used for a chunk Informix limits
chunk sizes to <2GB anyway.
So how can you have a table >2GB?
A dbspace can contain up to 2047 chunks (the engine reserves 12bits of
the page address for a chunk #, 2^11-1=2047). So to create or expand a
table beyond 2GB you simply need to create the table in a dbspace which
is larger than 2GB or fragment it across several dbspaces totaling more
than 2GB. If you use all of the space in a dbspace you just expand the
dbspace by adding another chunk. The portion (fragment) of a table
that lives in a single dbspace can grow to 2^20 pages or 32GB for
ports that use a 2K page size or 64GB for 4K pages ports (ex: AIX).
Now since a table can be fragmented over any number of dbspaces the
actual limit on the size of a table is 2TB the maximum disk space that
an Informix instance can manage. If you need larger tables than that
IDS/XPO (Extended Parallel Option) can create a large number of
co-servers and the table can be further partitioned across all
co-servers with each co-server limited to 2TB so the table size then is
practically unlimited.
Art S. Kagel