Is Logical Volume a raw device on HPUX?
Posted in 2003
Topics: Storage & Space Management, Platform-Specific Issues, Versions, Editions & End-of-Life
Hi All, We have Informix IDS 9.4 running on HP-UX11i with 4 disk each with 36GB Disk Space mirrored in RAID 0+1 configuration. We would like to partition the disk into various Logical Volumes to create chunks. a. From Informix point of view, will the Logical Volumes be still called 'Raw Device' or 'Cooked Data Files'? b. Is there any advantage in using Logical Volumes as opposed to cooked files on HP-UX? Regards, Rohit
At 07:19 26/08/2003 -0400, KERHALKAR,R.... wrote: >Hi All, >We have Informix IDS 9.4 running on HP-UX11i with 4 disk each with 36GB Disk >Space mirrored in RAID 0+1 configuration. We would like to partition the >disk into various Logical Volumes to create chunks. > >a. From Informix point of view, will the Logical Volumes be still called >'Raw Device' or 'Cooked Data Files'? >b. Is there any advantage in using Logical Volumes as opposed to cooked >files on HP-UX? > >Regards, >Rohit > > Yes, Logical Volum can be "Raw Device" . You have to prepare Logical Volum for use with IDS: 1. Use the character device. For example: rlvol1 2. chmod 660 /dev/vgXX/rlvol1 3. chown informix:informix /dev/vgXX/rlvol1 4. ln /dev/vgXX/rlvol1 /dbspace/chunk1 It is recommended that you use RAW device on UNIX to achieve better perfomance. Good luck! Alexandra Leschinski (sasha@nite.org.il) National Institute for Testing & Evaluation P.O.B. 26015 Jerusalem 91260 Tel: 02-6759525 Fax: 02-6759538
----- Original Message ----- From: R.... Kerhalkar <rohit.kerhalkar@hp.com> At: 8/26 8:23 > Hi All, > We have Informix IDS 9.4 running on HP-UX11i with 4 disk each with 36GB Disk > Space mirrored in RAID 0+1 configuration. We would like to partition the > disk into various Logical Volumes to create chunks. Constructed from a stripe of 4 mirrored pairs I hope and not from mirroring two 4 drive stripe sets. > a. From Informix point of view, will the Logical Volumes be still called > 'Raw Device' or 'Cooked Data Files'? Each logical volume will have a 'Cooked' block device and a corresponding 'Raw' character device file. You want to use the RAW character device for your chunks. Remember to use symbolic links to the device files as the actual chunk paths and not the device paths themselves. > b. Is there any advantage in using Logical Volumes as opposed to cooked > files on HP-UX? Yes. There are three general classes of chunks - RAW devices, COOKED devices, and filesystem files. Due to the overhead of copying the IDS buffers to/from the COOKED device driver's cache before transferring between the device and IDS RAW devices are 15-25% faster than COOKED devices. Using a filesystem file adds the additional overheads of FS maintenance and the very real possibility that the chunk's sectors are not physically contiguous on disk making filesystem chunks an additional 5-15% slower than COOKED devices or overall 20-40% slower than RAW devices. This is what my testing has always shown. The so called 'fast' filesystems just move their performance to the lower range of the difference. So the short answer is 'Yes' RAW partitions are better than COOKED paritions or filesystem files on any platform. Art S. Kagel > Regards, > Rohit > > >
----- Original Message ----- From: Thompson Richard His-Herts At: 8/26 9:41 > > FYI > > A cooked file is not the block special file that you assume but a straight > unix file rather than a lv or raw disk, it is cooked per se 'cos INFORMIX > assumes that it has direct access to all files (special or otherwise). The > delays you experience using the block special file are to do with the > syncing of the block/buffer to disk by the OS rather than letting INFORMIX > have direct access to the raw disk. No! I specifically make distinction between COOKED filesystem files and COOKED (ie block) devices. BOTH are COOKED in the sense that you specify. First BOTH are opened by IDS in O_SYNC mode so that writes are synced immediately to disk, however, as I stated, unlike RAW or character devices BOTH types of COOKED chunks must transfer the data to OS buffers which are then synced to disk before the write() system call returns. You are correct that the additional delay or slowness of COOKED devices (as well as most of the delay using COOKED files) is caused by this extra buffer-to-buffer data transfer and the additional overhead the OS incurs managing that buffer cache. However, your distinction between between UNIX files and lv and your equation of lv to RAW device is inaccurate. Logical volume managers create BOTH a RAW and a COOKED (block) device for the lv's (logical volumes) they manage. Filesystems are built on top of a block special file representing one of these lv's. The character device is a true RAW device and writes to that device are transferred directly from the IDS buffers to the disk controller. Writes to the block or COOKED device are made through the OS buffer cache and writes to any UNIX files created on filesystems which have been built over these lv's COOKED device files are made through the UNIX filesystem driver which ultimately hands the data to the COOKED device driver adding another layer of overhead. I dunno, maybe we're saying the same things and missing each other in the dark here? Informix does NOT assume that it has direct access to the disk when it writes to ordinary files or to COOKED devices, it checks the file type before opening the chunk path. If it determines that the chunk is NOT a character special device then it opens the chunk in O_SYNC mode for data security. IDS does not need to do that for RAW devices. Art S. Kagel > Richard Thompson > Data Manager > > Hertfordshire Health Informatics Service (HHIS) > Charter House > Parkway > Welwyn Garden City > Herts > AL8 6JL > 01707 390855 x2505 > > -----Original Message----- > From: ART KAGEL, .... [mailto:KAGEL@bloomberg.net] > Sent: 26 August 2003 13:45 > To: ids@iiug.org > Subject: Re: Is Logical Volume a raw device on HPUX? [1754] > > ----- Original Message ----- > From: R.... Kerhalkar <rohit.kerhalkar@hp.com> > At: 8/26 8:23 > > > Hi All, > > We have Informix IDS 9.4 running on HP-UX11i with 4 disk each with 36GB > Disk > > Space mirrored in RAID 0+1 configuration. We would like to partition the > > disk into various Logical Volumes to create chunks. > Constructed from a stripe of 4 mirrored pairs I hope and not from mirroring > two > 4 drive stripe sets. > > > a. From Informix point of view, will the Logical Volumes be still called > > 'Raw Device' or 'Cooked Data Files'? > Each logical volume will have a 'Cooked' block device and a corresponding > 'Raw' > character device file. You want to use the RAW character device for your > chunks. Remember to use symbolic links to the device files as the actual > chunk > paths and not the device paths themselves. > > > b. Is there any advantage in using Logical Volumes as opposed to cooked > > files on HP-UX? > Yes. There are three general classes of chunks - RAW devices, COOKED > devices, > and filesystem files. Due to the overhead of copying the IDS buffers > to/from > the COOKED device driver's cache before transferring between the device and > IDS > RAW devices are 15-25% faster than COOKED devices. Using a filesystem file > adds > the additional overheads of FS maintenance and the very real possibility > that > the chunk's sectors are not physically contiguous on disk making filesystem > chunks an additional 5-15% slower than COOKED devices or overall 20-40% > slower > than RAW devices. This is what my testing has always shown. The so called > 'fast' filesystems just move their performance to the lower range of the > difference. > > So the short answer is 'Yes' RAW partitions are better than COOKED paritions > or > filesystem files on any platform. > > Art S. Kagel > > > Regards, > > Rohit > > > > > >
By no means use cooked files on a production system. Use raw devices. Chucho! KERHALKAR,R.... wrote: > Hi All, > We have Informix IDS 9.4 running on HP-UX11i with 4 disk each with 36GB Disk > Space mirrored in RAID 0+1 configuration. We would like to partition the > disk into various Logical Volumes to create chunks. > > a. From Informix point of view, will the Logical Volumes be still called > 'Raw Device' or 'Cooked Data Files'? > b. Is there any advantage in using Logical Volumes as opposed to cooked > files on HP-UX? > > Regards, > Rohit > > > > > > -- Atte, Jesús Antonio Santos Giraldo jeansagi@myrealbox.com jeansagi@netscape.net