[linux-lvm] Wierd lvm2 performance problems
Sven Eschenberg
sven at whgl.uni-frankfurt.de
Sun Apr 19 15:16:21 UTC 2009
Hi Milan,
Milan Broz schrieb:
> Sven Eschenberg wrote:
>> I tried to create a PE+VG+LV ontop of a mdraid. For no obvious reason
>> the lvm volume show extremely poor performance - The transferrates are
>> as little as 30% of the rates on the md device itself.
>> In contrast creating a partition table ontop of the array gives nearly
>> no performance impact.
>>
>> Does anybody have the slightest idea, wht might be going wrong here?
>
>> P.S.: I tried aligning the first PE in the VG with the mdraid chunk
>> size, no difference whatsoever.
>
> How did you check that it is properly aligned?
> The problem is mostly that data area start is misaligned with underlying
> MD chunk size
Unfortunately I don't have the box at hand for 2 days, but I asked md to
use a chunksize of 2048K and the /proc/mdstat reported 2048K, last time
I checked.
The LVM hat a phy-extsize of 2M and with the --dataalignment option set
to 2M, pvs reported a pe_start value of 2M aswell.
>
> Please can you paste output of
> pvs -o +pe_start --unit b
> and
> cat /sys/block/<your_md_dev>/md/chunk_size
>
> Please use at least lvm2 version 2.02.40 (see lvm version) for creating
> VG - this version has automatic alignmnent option if running over MD
> (see md_chunk_alignment in /etc/lvm.conf)
I need to check on lvm versions when I am back at the place it is
located and will check the option then.
>
> Also increasing readahead value can help (but only for simple linear
> read operation). You can increase readahead persistenlty for LV
> using (see man for lvchange -r ).
That I did already somewhen during the night and it improved everything
dramatically. I set the readahead to 32768, the value md had chosen for
the underlying md device.
>
> Milan
> --
> mbroz at redhat.com
>
Regards
-Sven
> _______________________________________________
> linux-lvm mailing list
> linux-lvm at redhat.com
> https://www.redhat.com/mailman/listinfo/linux-lvm
> read the LVM HOW-TO at http://tldp.org/HOWTO/LVM-HOWTO/
More information about the linux-lvm
mailing list