raw v/s block I/O anomaly.....strange behaviour
Posted in 1996
Topics: Performance & Tuning
Hi, 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. We found this situation on diff. environments e.g. a. Sol 2.5 on sun sparc1000 (using storage array) b. Sol 2.4 on sun 670MP (using internal disks) c. sunOS 4.1.3 on sun 670MP (using internal disks) d. sol 2.4 on a sun sparc 20 (using internal disks) To compare timings on low level IO, we used dd comand as follows: time dd if=<XX> of=/dev/null bs=2048 count=75000 where XX was replaced with char. and block device path. bs=2048 since informix uses 2k pages for I/O. We used diff. count values and every time I/O using block I/F was faster. (2)Our Informix is using raw device. The path of informix database of B was a link to the raw I/F. I changed the link to point to the char. I/F of the same disk and the dd gave great timings. Although strange, but looked like we found the answer why informix SQL queries were running slower ie. solution was to use block I/F. However, after dd ran faster on block I/F, we expected informix sql queries to run faster too. But that is not happening, in fact they went a little worse. Any clues what is going on in 1 and/or 2 above ?. If possible, pls reply directly. Thanks much. AH