ZFS

TurnToJPG -->


Purpose

ZFS On proxmox, performance issue.

Steps

1. megaclisas-status

The proxmox is in offline environment, so need to get the megaclisas-status packages installed ready.

# sudo docker run -it debian:9.4 /bin/bash
root@f427df462cbd:/# cat /etc/debian_version 
9.4
root@f427df462cbd:/# apt-get install -y vim
root@f427df462cbd:/# vim apt.conf.d/docker-clean 
Comment all
root@f427df462cbd:/# apt-get install -y wget gnupg2
# wget -O - https://hwraid.le-vert.net/debian/hwraid.le-vert.net.gpg.key | apt-key add -
# cat /etc/apt/sources.list
deb http://deb.debian.org/debian stretch main
deb http://security.debian.org/debian-security stretch/updates main
deb http://deb.debian.org/debian stretch-updates main
deb http://hwraid.le-vert.net/debian stretch main
# apt-get update -y
# apt-get install megaclisas-status
# cd /var/cache/
# find . | grep deb$ | xargs -I % cp % /root/deb/

Transfer the debs into the promox machine, install it via:

# cd /root/deb/
# dpkg -i daemon_0.6.4-1+b2_amd64.deb megacli*
root@ks:~/deb# megaclisas-status 
-- Controller information --
-- ID | H/W Model | RAM    | Temp | BBU    | Firmware     
c0    | SAS3108 | 1024MB | 64C  | Absent | FW: 24.7.0-0057 

-- Array information --
-- ID | Type   |    Size |  Strpsz |   Flags | DskCache |   Status |  OS Path | CacheCade |InProgress   
c0u0  | RAID-1 |    558G |  256 KB |   RA,WT |  Default |  Optimal | /dev/sda | None      |None         
c0u1  | RAID-5 |   7271G |  256 KB | ADRA,WT |  Default |  Optimal | /dev/sdb | None      |None         
c0u2  | RAID-5 |   7271G |  256 KB | ADRA,WT |  Default |  Optimal | /dev/sdc | None      |None         
c0u3  | RAID-5 |   7271G |  256 KB | ADRA,WT |  Default |  Optimal | /dev/sdd | None      |None         
c0u4  | RAID-5 |   7271G |  256 KB | ADRA,WT |  Default |  Optimal | /dev/sde | None      |No

Change the properties:

root@ks:~/deb# megacli -LDGetProp -Cache -LALL -a0
                                     
Adapter 0-VD 0(target id: 0): Cache Policy:WriteThrough, ReadAhead, Direct, No Write Cache if bad BBU
Adapter 0-VD 1(target id: 1): Cache Policy:WriteThrough, ReadAdaptive, Direct, No Write Cache if bad BBU
Adapter 0-VD 2(target id: 2): Cache Policy:WriteThrough, ReadAdaptive, Direct, No Write Cache if bad BBU
Adapter 0-VD 3(target id: 3): Cache Policy:WriteThrough, ReadAdaptive, Direct, No Write Cache if bad BBU
Adapter 0-VD 4(target id: 4): Cache Policy:WriteThrough, ReadAdaptive, Direct, No Write Cache if bad BBU

Exit Code: 0x00
root@ks:~/deb# megacli -LDSetProp NORA -LALL -a0
                                     
Set Read Policy to NoReadAhead on Adapter 0, VD 0 (target id: 0) success
Set Read Policy to NoReadAhead on Adapter 0, VD 1 (target id: 1) success
Set Read Policy to NoReadAhead on Adapter 0, VD 2 (target id: 2) success
Set Read Policy to NoReadAhead on Adapter 0, VD 3 (target id: 3) success
Set Read Policy to NoReadAhead on Adapter 0, VD 4 (target id: 4) success

Exit Code: 0x00
root@ks:~/deb# megacli -LDGetProp -Cache -LALL -a0
                                     
Adapter 0-VD 0(target id: 0): Cache Policy:WriteThrough, ReadAheadNone, Direct, No Write Cache if bad BBU
Adapter 0-VD 1(target id: 1): Cache Policy:WriteThrough, ReadAheadNone, Direct, No Write Cache if bad BBU
Adapter 0-VD 2(target id: 2): Cache Policy:WriteThrough, ReadAheadNone, Direct, No Write Cache if bad BBU
Adapter 0-VD 3(target id: 3): Cache Policy:WriteThrough, ReadAheadNone, Direct, No Write Cache if bad BBU
Adapter 0-VD 4(target id: 4): Cache Policy:WriteThrough, ReadAheadNone, Direct, No Write Cache if bad BBU

Exit Code: 0x00

Hope this will greately improve performance.

Notice(For disk cache):

Optional toppings for most LD configurations:
WT :      WriteThrough   safer.  Only returns once data is written to disk.
WB:       WriteBack       faster.  Returns as soon as data is is written to cache
NORA :  No Read Ahead   vs
RA:        ReadAhead   vs
ADRA :   Adaptive ReadAhead where if the previous two requests were sequential, it pre-loads the next in sequence.
Cached:  Cache reads.
Direct:    Only the previous read is cached.
-strpszM      : Stripe size      so -strpsz64 means 64kb stripe size.
Hsp[E0:S0] : Choose this drive to be a hot-spare