Cloudshell2 and LVM2: a performance test

Moderators: odroid, mdrjr

Cloudshell2 and LVM2: a performance test

Unread postby crazyquark » Sun Jul 16, 2017 4:58 pm

I wanted to use JBOD SPAN on Cloudshell2 for performance but I was put off by the fact that whenever I will upgrade the setup I would need to have backup of the data, reformat the old array array as independent disks, copy data, create new array, copy data from old disks... you see where this is going.
Software RAID is also a pain, though to be fair I did not investigate mdadm; supposedly there is a way to grow a RAID0 mdadm using a new disk but it looks complicated and error prone: https://serverfault.com/questions/611270/mdadm-remove-disk-from-raid0

LVM2 seemed like the perfect fit for my needs: performance was important but I didn't want a blazing fast setup(I don't have the disks for it anyway) and I wanted to be able to easily upgrade my disks in the future as HDD prices drop.
So this is what I did:
2x2TB each with one disk sized partition on them, added to LVM as physical volumes.
Create a linear volume of 20GB for general purpose stuff and 3.62TB volume, striped, for my NAS storage needs. Said volume would be shared via samba and NFS.

My disks are kinda lame: a 2TB WD Green and a 2TB Seagate (old Barracuda I think?). It's what I had around the house :).

Ran the HeliosLAN test in Windows over Samba for the striped volume and here are the results:
LAN-Test.PNG
LAN-Test.PNG (62.68 KiB) Viewed 716 times


It's not Earth shattering but I think it will do for my needs.
crazyquark
 
Posts: 245
Joined: Thu Jan 15, 2015 4:22 pm
languages_spoken: english, french, romanian
ODROIDs: C1,C1+,C2,XU4

Re: Cloudshell2 and LVM2: a performance test

Unread postby odroid » Mon Jul 17, 2017 11:08 am

Thank you for sharing the test result of the LVM2.

Can I add your test result in our WiKi page?
http://odroid.com/dokuwiki/doku.php?id= ... erformance
User avatar
odroid
Site Admin
 
Posts: 27327
Joined: Fri Feb 22, 2013 11:14 pm
languages_spoken: English
ODROIDs: ODROID

Re: Cloudshell2 and LVM2: a performance test

Unread postby crazyquark » Mon Jul 17, 2017 8:52 pm

odroid wrote:Thank you for sharing the test result of the LVM2.

Can I add your test result in our WiKi page?
http://odroid.com/dokuwiki/doku.php?id= ... erformance


Yes, of course! :)
crazyquark
 
Posts: 245
Joined: Thu Jan 15, 2015 4:22 pm
languages_spoken: english, french, romanian
ODROIDs: C1,C1+,C2,XU4

Re: Cloudshell2 and LVM2: a performance test

Unread postby odroid » Tue Jul 18, 2017 11:02 am

Thank you for the permission.
We've updated. :D
User avatar
odroid
Site Admin
 
Posts: 27327
Joined: Fri Feb 22, 2013 11:14 pm
languages_spoken: English
ODROIDs: ODROID

Re: Cloudshell2 and LVM2: a performance test

Unread postby crazyquark » Wed Mar 14, 2018 3:41 pm

Small update.
I filled up the disks so I made my first migration.
I pvmove'd the 2TB WD Greed disk to a 4TB WD Red.

For my own peace of mind I used pvmove --atomic -A y so that if it did fail I would not be left with a split volume.
(in fact it failed twice because of a hw issue - I was using a bad USB 3.0 angled adapter that disconnected my disk randomly but I was able to restore my disks each time with pvmove --abort or vgcfgrestore)

Migration took a few hours(left it overnight). In theory I could have done it online but I preferred to unmount the filesystems.

And it was a success. I now however have my LVs spread around the disks(there is one 2TB linear segment where there were only stripes before).
I expect a performance loss but I have not yet tested.
crazyquark
 
Posts: 245
Joined: Thu Jan 15, 2015 4:22 pm
languages_spoken: english, french, romanian
ODROIDs: C1,C1+,C2,XU4

Re: Cloudshell2 and LVM2: a performance test

Unread postby crazyquark » Wed Mar 14, 2018 4:39 pm

OK, performance holds even though the data is less striped now. Although, If I think about it, it has not yet reached the point where it needs to write data to the new, unstriped volume.
The distribution is as follows:
Code: Select all
root@odroid-nas:/storage/_completed# lvdisplay -m
  --- Logical volume ---
  LV Path                /dev/cloudshell/myhome
  LV Name                myhome
  VG Name                cloudshell
  LV UUID                oRwNAN-6AHt-2dlH-DPq3-oq4z-2HXu-0S708k
  LV Write Access        read/write
  LV Creation host, time odroid-nas, 2017-07-15 14:58:11 +0300
  LV Status              available
  # open                 1
  LV Size                20.00 GiB
  Current LE             5120
  Segments               2
  Allocation             inherit
  Read ahead sectors     auto
  - currently set to     256
  Block device           254:0

  --- Segments ---
  Logical extents 0 to 2559:
    Type                linear
    Physical volume     /dev/sda1
    Physical extents    0 to 2559

  Logical extents 2560 to 5119:
    Type                linear
    Physical volume     /dev/sdb1
    Physical extents    150000 to 152559


  --- Logical volume ---
  LV Path                /dev/cloudshell/storage
  LV Name                storage
  VG Name                cloudshell
  LV UUID                CBTp0D-Dawi-Qetg-232R-qYzq-rDed-86eQWb
  LV Write Access        read/write
  LV Creation host, time odroid-nas, 2017-07-15 15:03:17 +0300
  LV Status              available
  # open                 1
  LV Size                5.44 TiB
  Current LE             1425641
  Segments               3
  Allocation             inherit
  Read ahead sectors     auto
  - currently set to     512
  Block device           254:1

  --- Segments ---
  Logical extents 0 to 299999:
    Type                striped
    Stripes             2
    Stripe size         64.00 KiB
    Stripe 0:
      Physical volume   /dev/sda1
      Physical extents  2560 to 152559
    Stripe 1:
      Physical volume   /dev/sdb1
      Physical extents  0 to 149999

  Logical extents 300000 to 948711:
    Type                striped
    Stripes             2
    Stripe size         64.00 KiB
    Stripe 0:
      Physical volume   /dev/sda1
      Physical extents  152560 to 476915
    Stripe 1:
      Physical volume   /dev/sdb1
      Physical extents  152560 to 476915

  Logical extents 948712 to 1425640:
    Type                linear
    Physical volume     /dev/sdb1
    Physical extents    476916 to 953844


Anyway, here it is:
LanTest-3.14.2018.PNG
LanTest-3.14.2018.PNG (60.35 KiB) Viewed 285 times
crazyquark
 
Posts: 245
Joined: Thu Jan 15, 2015 4:22 pm
languages_spoken: english, french, romanian
ODROIDs: C1,C1+,C2,XU4

Re: Cloudshell2 and LVM2: a performance test

Unread postby odroid » Wed Mar 14, 2018 4:57 pm

Thank for sharing the test result again.
Good to know how the LVM2 is very useful for storage migration in the real world. :)
I've updated the wiki page too.
https://wiki.odroid.com/accessory/add-o ... 2_and_lvm2
User avatar
odroid
Site Admin
 
Posts: 27327
Joined: Fri Feb 22, 2013 11:14 pm
languages_spoken: English
ODROIDs: ODROID

Re: Cloudshell2 and LVM2: a performance test

Unread postby crazyquark » Thu Mar 15, 2018 4:30 am

It is I think but if you went for a stripe then you would ideally need 2 disks of the same size for a proper upgrade.
There are more combinations possible than in RAID. It's more flexible and if you are careful the migrations are atomic, no risk of data loss. You can just move stuff around, split it, merge it back etc.
And when you are done with a disk just remove it because LVM has its own UUID labeling system for locating volumes.
That being said, I have no experience with software RAID, the same could maybe be achieved with a software RAID0.

Ah, also, you can test out your scenarios with loopback devices before implementing them(I assume the same can be done with mdadm).
I have a writeup of my scenario here: https://www.cristiansandu.ro/2018/03/06/lvm-fun-swap-out-disk-in-lvm2-stripe/
crazyquark
 
Posts: 245
Joined: Thu Jan 15, 2015 4:22 pm
languages_spoken: english, french, romanian
ODROIDs: C1,C1+,C2,XU4

Re: Cloudshell2 and LVM2: a performance test

Unread postby odroid » Thu Mar 15, 2018 9:23 am

Thank you for the blog link. It is a very comprehensive guide to test and understand the migration scenarios.

Can you please write an article for our Magazine?
Our Chief editor will contact you soon.
User avatar
odroid
Site Admin
 
Posts: 27327
Joined: Fri Feb 22, 2013 11:14 pm
languages_spoken: English
ODROIDs: ODROID

Re: Cloudshell2 and LVM2: a performance test

Unread postby crazyquark » Tue Mar 20, 2018 10:08 pm

Hey, yes, I will do my best :)
crazyquark
 
Posts: 245
Joined: Thu Jan 15, 2015 4:22 pm
languages_spoken: english, french, romanian
ODROIDs: C1,C1+,C2,XU4


Return to CloudShell

Who is online

Users browsing this forum: No registered users and 1 guest