Re: raw v/s block I/O anomaly.....strange behaviour
Posted in 1996
Topics: Performance & Tuning, Storage & Space Management
Atiqullah Hashmi <hashmi@cnj.digex.net> wrote: >It's a related two-part prob. Pls help on whatever you can. > >(1) We have a strange situation. We are running an informix based >application which runs slow on one system(say 'B'ad) and fast on >another(say 'G'ood). We found that the database on G is on a >block device I/F of the disk(/dev/dsk/...), whereas B is using >char. I/F (/dev/rdsk/....) although you would expect performance >of raw interface to be faster. This isn't really strange at all, it you think about the underlying principles. Don't think of it as "block" and "raw" devices, but rather "buffered" and "raw" devices. With the character device, it is faster if you use the IOCTL call to I/O a full block of bytes at a time. Most software works a character at a time (ignoring disk buffers and such in memory), so accesses to the character device is going to be inefficient. On the other hand, accesses to the buffered device will only cause every-now-and-then accesses to the physical device in big chunks. -- "It was our last, best hope for peace -- it failed. | Scott G. Hall Now it's our last best hope." (Babylon-5 opener) | Lucent Technologies ----------------------------------------------------------| Bell Labs - BCS Scott.Hall@bell-labs.com sgh@cbgbcs.cb.lucent.com | Columbus, OH, USA