RE: IDS 10.0 performance on RedHat
Posted in 2006
>From a reliability standpoint, even cooked files are exactly same, as raw devices for Informix. Informix opens files with O_SYNC flag, which makes all writes synchronous: write() operation doesn't finish and process, calling it, remains blocked in a kernel, until storage device confirms, that operation is finished. Depending upon storage device type and configuration, this might actually mean, that data are written to the device write-back cache. Storage vendors are making huge efforts to preserve data in the array cache in case of a power failure. EMC Clarion arrays have dedicated UPS, and, in case of power failure, it dumps all contents of write cache to dedicated (!!!!) disk drives. Other vendors (like IBM with DS4000) are using battery to power the cache memory in case of a power failure. I know, that some people think, that cooked files are not safe for databases. This is just not true, at least for Informix. O_DIRECT flag is more about efficiency of memory usage in the operating system (swapping, etc), then about reliability (in case, when O_SYNC flag is already used) -Alexey > -----Original Message----- > From: informix-list-bounces@iiug.org [mailto:informix-list-bounces@iiug.org] > On Behalf Of TBP > Sent: Thursday, July 20, 2006 2:36 AM > To: informix-list@iiug.org > Subject: Re: IDS 10.0 performance on RedHat > > Alexey Sonkin wrote: > > Hi, Neil, > > > > I have very similar results for Suse Enterprise Linux 9 > > (with quad dual-core Opteron machines and very good external arrays): > > overall throughput is better with Informix AIO VP, then with KAIO. > > > > Here are some thought about that. > > > > First of all, for Informix 10 on Linux 2.6 there is no difference > > between > > character and block devices. Starting with kernel 2.6, two new features > > were introduced in Linux: KAIO and O_DIRECT (direct, non-buffered I/O) > > > > When file (or device, block or character) is opened in O_DIRECT > > mode, it behaves exactly like a raw device. That is, all reads and > > writes do not go through a kernel buffer cache (in kernel 2.6 called > > 'page cache'). > > > > Informix opens both block and raw devices with O_DIRECT > > flag. Also, on Linux 2.6, KAIO is supported for raw devices and for > > files and block devices (!!!), opened with O_DIRECT flag. > > Informix 10 uses O_DIRECT flag for block and raw devices > > (not for files :-( ) and uses KAIO for both raw and block devices > > (again, not for files). I think, Informix developers decided not to > > use O_DIRECT and KAIO for files just for compatibility with other > > UNIX flavors. It might be a good feature request to implement > > O_DIRECT and KAIO for files. > > > <snip> > Are writes actually completed on disk when the write request comes back > to the cpu vps as complete? Or are they just complete in kernel buffer > cache? > > Just wondering about an O/S crash and what is actually on disk. With > KAIO and O_DIRECT I thought that the write was completed on disk before > returning to the process; as opposed to completed in buffer cache. > _______________________________________________ > Informix-list mailing list > Informix-list@iiug.org > http://www.iiug.org/mailman/listinfo/informix-list