[linux-lvm] LE to PE mapping

Allen, Jack Jack.Allen at mckesson.com
Fri Sep 12 22:02:03 UTC 2014


Hello:
        I need to find a command on RHEL 5.8 that will show each LE to PE mapping for a LV. All the command I have looked at so far (lvs, pvs, lvdisplay and pvdisplay) using various option only show the start PE and how many.

        I am dealing with an SAN read performance problem and some think it is the way the LE are mapped to the PE that is causing more I/O to take place on specific disk. The database application does reads and writes directly to the LV, there is no file system with files. The database block size is 8k and for the most part is very random across many LVs.

        The configuration is a lot bigger than I am going to provide information here to make it a little simpler as to what I am trying to find out.

Let's assume 4 LUNs (PV) at 10G each.
The PVs are put in vg01 and 4 LVs are created using the following commands:

lvcreate -L2g -i4 -n lv00 vg01
lvcreate -L2g -i4 -n lv01 vg01
lvcreate -L2g -i4 -n lv02 vg01
lvcreate -L2g -i4 -n lv03 vg01

        The strip size defaulted to 16K per the lvdisplay command. When doing the commands to list the LE and PE information it will show that lv00 starts at PE 0 on each PV and then what ever number of PEs it takes to make 2g across the PVs. Let's say 4 to make it simple, so that would be 16 in all. Now were the PE allocated like:

LE0     ->      PV0 PE0
LE1     ->      PV1 PE0
LE2     ->      PV2 PE0
LE3     ->      PV3 PE0
LE4     ->      PV0 PE1
LE5     ->      PV1 PE1
~~~     ~~      ~~~ ~~~
LE15    ->      PV3 PE3

Or were they allocated like:

LE0     ->      PV0 PE0
LE1     ->      PV0 PE1
LE2     ->      PV0 PE2
LE3     ->      PV0 PE3
LE4     ->      PV1 PE0
LE5     ->      PV1 PE1
~~~     ~~      ~~~ ~~~
LE15    ->      PV3 PE3

        In this simple example it does not make a lot of difference, but say there were 512 PEs then it does as far as to which PV reads are done from with random reads. This is a database application with many users access different parts of the data is what makes it random and there could be many doing reads at the same time. During backups the blocks (PE) will be read sequential and if the allocation is done the second way then many reads will be done on the first PV and none on the other than the then second PV and non on the others and so on.

        Something else I need some clarification on is the PE size of 4MB and the strip size of 16K. Are the PEs not allocated as shown above in either example?

        Are the PE allocated in 4MB chunks?

        Then what does the 16K do?


-------------------------
Jackson C. Allen
McKesson Provider Technologies
5995 Windward Parkway
Alpharetta, GA 30005
(404) 338-2023
Jack.Allen at McKesson.com<mailto:Jack.Allen at McKesson.com>
Confidentiality Notice: This e-mail message, including any attachments, is for the sole use of the intended recipient(s) and may contain confidential and privileged information.  Any unauthorized review, use, disclosure or distribution is prohibited.  If you are not the intended recipient, please contact the sender by reply e-mail and destroy all copies of the original message.




-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://listman.redhat.com/archives/linux-lvm/attachments/20140912/7f6193ed/attachment.htm>


More information about the linux-lvm mailing list