Operating System - HP-UX
1837655 Members
2647 Online
110117 Solutions
New Discussion

LVM raw devices vs real raw devices

 
SOLVED
Go to solution
Doug_3
Frequent Advisor

LVM raw devices vs real raw devices

I noted in IBM/Informix release notes that LVM raw devices are significantly slower than REAL raw devices.

Ok, how do I determine which is which? The db was set up before I arrived with 8 raw files/dev. Since then I have created two additinal raw dev. Once using the command line and once using sam.

tia

Doug
3 REPLIES 3
Patrick Wallek
Honored Contributor
Solution

Re: LVM raw devices vs real raw devices

I wouldn't think that there should be much difference between LVM and non-LVM, but that's just me.

Anyway, to answer your question: If the device file you are using looks something like /dev/vg02/rlvol1 or /dev/vg02/lvol1 then you are using LVM devices. If you were going directly to a disk drive the device file would be /dev/dsk/c1t2d0 or /dev/rdsk/c1t2d0.

LVM will give you a lot more flexibility if you have small disks and need a large amount of space for the DB.
A. Clay Stephenson
Acclaimed Contributor

Re: LVM raw devices vs real raw devices

Hi Doug:

The actual overhead in the LVM is quite small. A write to say block 5609 of Character Major device 64 Minor device 0x020001(LVM /dev/vg02/rlvol1) simply does a table lookup to determine that that is really block 346 of Character Major 188 Minor 0x02a000. It is merely one lookup which is many, many times faster than the disk i/o itself. Moreover, because LVM raw i/o allows you to stripe multiblock i/o is typically faster. I'd stick with LVM it is generally faster and much more flexible.

Now having said that, I would also look at two other ways. 1) Try conventional cooked i/o; I've found that especially in 11x the performance is essentially identical to raw and surprisingly sometimes better. 2) Use the OnlineJFS mount options convosync=direct,mincache=direct,nodatainlog,datainlog. The mincache and convosync options bypass the buffer cache and you thus get all the benefits of raw LVM i/o with the convenience of files. It's also very easy to test: simply mount without those =direct options and restart the database.

The main thing I want to convey is to believe nothing and measure for yourself.

Regards, Clay

If it ain't broke, I can fix that.
Patrick Wallek
Honored Contributor

Re: LVM raw devices vs real raw devices

I think the mount options Clay means are: mincache=direct,convosync=direct,nodatainlog,delaylog

Clay had 'nodatainlog,datainlog' which you really don't want to do.