RE: The old raw devices chestnut.
Posted in 2004
Jim, I have two major concerns about using cooked files Vs raw devices 1. Unpredictable swapping On some operating systems (WinXX, Linux, Solaris) there is no way to limit the maximum size of the file system cache (may be, I'm missing something, please, tell me, how to limit cache on Linux and SUN) In some situations, OS might decide that file system cache is 'more important' then Informix's shared memory segments and swap-out 'V' and even 'R' (on Linux 'resident' is not supported) data to disk... I had a customer, who accidentally created Informix chunks on 'block' devices under Solaris. The result was terrible. Periodically, Informix was freezing for several minutes in checkpoints - because Solaris decided to swap-out Informix. No need to say that the problem went away forever after we changed the links to point them to 'char' devices. I think, with 'cooked' files, one can experience the same problem as with block devices. 2. Poor DSS performance. I think that OLTP performance should be pretty the same for cooked files and raw devices - just because for random reads (typical for OLTP), disk access times are much bigger then file system cache overhead. (Of course, if You do not run into a problem mentioned above). Some time ago, I was making a big Oracle-based OLTP benchmark, and the difference between raw device and file system was unnoticeable (below 2%). During that benchmark, we didn't have swapping just because we had enormous amount of RAM in the machine. With DSS systems, the situation is different. When the database server is making a sequential scan of huge fragmented table at, say, 100MB/sec, file system cache overhead becomes significant. ------------------------------------------ Alexey Sonkin > -----Original Message----- > From: Jim Smith [mailto:jim@jimsmith.demon.co.uk] > Sent: Monday, April 12, 2004 3:54 AM > To: informix-list@iiug.org > Subject: The old raw devices chestnut. > > Note the cross-posting - but no flame wars please. > > This question was prompted by a thread on the a postgres mailing list > during which someone (Gregory Williamson) claimed > > <quote> > raw devices, at least on Solaris, are about 10 times as fast as cooked > file systems for Informix. > <quote> > > This made me think about the old arguments, and I wondered about the > current state of thinking. Some of my knowledge will be a bit out of > date. > > Oracle: (my main experience) > At various times Oracle have claimed (talking to consultants, not > marketers) that raw devices are 5-20% faster than filesystems. This may > vary on the current state of the oracle code and/or the filesystem being > compared against. Veritas seem to agree by producing QuickIO for Oracle, > claiming "performance of raw with the management of filesystem". > > I have never been sufficiently convinced to implement a major system > with raw. > > Sybase: (some experience) > Sybase claim filesystems are faster, because of OS buffering, but unsafe > for the same reason. They only ever suggest filesystem for tempdb. They > don't seem to have heard of fsync()[1] > > DB2: > No idea > > Informix: > No idea beyond the claim which started this off. > > What is the latest thinking, both in terms of vendor claims and > practical experience? > > [1] or whatever system call forces write-through caching > -- > Jim Smith > Because of their persistent net abuse, I ignore mail from > these domains (among others) .yahoo.com .hotmail.com .kr .cn .tw > For an explanation see <http://www.jimsmith.demon.co.uk/spam> sending to informix-list