RE: striped LV and expected performance

"Henry, Andrew" <[email protected]> Fri, 18 Jul 2025 14:46:11 +0000
Newsgroups gmane.linux.lvm.general
Message-ID <FR6P281MB367296DD8DAECAB5633C9BDDEB50A@FR6P281MB3672.DEUP281.PROD.OUTLOOK.COM>
Dne 18. 07. 25 v 14:24 Henry, Andrew napsal(a):
>> Maybe you virtual system does have it self 'a single write pipe' - so an=
y parallelization is stopped right there - so maybe you should start first =
with bare metal....
>
> This is what I suspect is happening, as the back-end storage is very fast=
.  I'm going to test on a physical server instead.
>
> /AH

It's crucially important to be sure - you have independent drives & control=
ler paths to them.

It's really pointless trying to setup a 'stripe' on top of 3 drives that ar=
e at the end served by a singly physical storage behind the scene - this li=
kely can explain rather horrible numbers you get when you are trying to use=
 stripe
-  in such case simply join devices 1-by-1....

Zdenek

I re-tested this on a consumer PC.

SATA6 controller, 2 * 1TB Seagate 4ke drives with product spec of ~210MB/s =
read speed and ~160MB/s write speed.

Created the lv as follows:

Pvcreate --dataalignmentoffset 7 /dev/sda /dev/sdb
Vgcreate vg00 /dev/sda /dev/sdb
lvcreate -n swap -l +100%FREE vg00  # for linear lvm
lvcreate -n swap -i 2 -I 4k --type=3Dstriped -l +100%FREE vg00  # for strip=
ed lvm
mkfs -t xfs -b size=3D4K -d su=3D4k,sw=3D2 -f /dev/vg00/swap
mount /dev/vg00/swap /mnt

Tried with 4k,64k and 1MB block sizes
time dd if=3D/dev/zero of=3D/mnt/testfile bs=3D1M count=3D10240 oflag=3Ddir=
ect

This gives me exactly results I expect:

Using linear LVM, it's writing to one physical device at 187MB/s
Using striped LVM with 4K blocks, it's writing to the striped LVM at 306MB/=
s, which is not quite double single drive speed but near enough for me to u=
nderstand that "it's working".
Using striped LVM with 64K blocks, it's writing to the striped LVM at 311MB=
/s
Using striped LVM with 1M blocks, it's writing to the striped LVM at 312MB/=
s

Plus all these results are sort of inline with the physical characteristics=
 of the drives max R/W speeds.

When I perform same procedure on a VM using the paravirtualised driver for =
the 3 controllers, I'm not getting speeds in-line with what I expect from s=
olid state storage.  Obviously, striped LVM in a VM with storage pool conne=
cted to the VM host just does not work the way it would with separate physi=
cal devices.

/AH