This is the old XigmaNAS forum in read only mode,
it will taken offline by the end of march 2021!



I like to aks Users and Admins to rewrite/take over important post from here into the new fresh main forum!
Its not possible for us to export from here and import it to the main forum!

Howto for adding a ZIL and L2ARC on one SSD using the shell

Post/Debate your Suggestions & Requests of XigmaNAS here. This ONLY pertains to XigmaNAS.
Forum rules
Set-Up GuideFAQsForum Rules
Post Reply
User avatar
crowi
Forum Moderator
Forum Moderator
Posts: 1176
Joined: 21 Feb 2013 16:18
Location: Munich, Germany
Status: Offline

Howto for adding a ZIL and L2ARC on one SSD using the shell

Post by crowi »

Dear Moderators and Admins,

I am still pretty new to N4F and ZFS but I am learning.

I would like to contribute a little Howto, see subject, because from the beginning I liked the idea to optimize my system and tinker around , that's what I was missing on my previous commercial NAS. ;)

Here's my howto for adding a log/ZIL and a cache / L2ARC to the ZFS Pool, using one SSD for both purposes.
I am indeed aware that it is possibly better to use a mirrored device, at least for ZIL, but this is just one more adjustment if anyone needs to use it.
I am not sure if I made everything correctly, so no warranty from my side, but it worked...


1) Add the SSD to your system (in my case ada6) using the webGUI
2) open a shell
3) partition the drive, first clean the drive

Code: Select all

 gpart destroy -F ada6 
add GPT partition

Code: Select all

gpart create -s GPT ada6
add the ZIL partition in my case 10 GB (from iostat testing, ZIL does not need to be much bigger)

Code: Select all

gpart add -s 10G -t freebsd-zfs ada6 
add the remaing space for the L2ARC partition (in mycase 45G)

Code: Select all

gpart add -s 45G -t freebsd-zfs ada6
check the partitions

Code: Select all

gpart show ada6 
4) now it's time to add the devices to the pool:
add the ZIL (log)

Code: Select all

zpool add Poolname log ada6p1
add the L2ARC (cache)

Code: Select all

zpool add Poolname cache ada6p2
5) done...
6) check the pool, in my case it loks like this now from the webGUI

pool: Pool5x3TB
state: ONLINE
scan: none requested
config:

NAME STATE READ WRITE CKSUM
Pool ONLINE 0 0 0
raidz1-0 ONLINE 0 0 0
ada0 ONLINE 0 0 0
ada1 ONLINE 0 0 0
ada2 ONLINE 0 0 0
ada3 ONLINE 0 0 0
ada4 ONLINE 0 0 0
logs
ada6p1 ONLINE 0 0 0
cache
ada6p2 ONLINE 0 0 0

Code: Select all

zpool list -v
7)lean back and watch iostat juggling with the files, log and cache :-D enjoy !!!
eg:

Code: Select all

zpool iostat -v 2 300
FINAL remarks: do not expect a mindblowing boost of performance, my system works smooth and I feel a slight improvement, as well as iostat shows heavy use of the SSD as well.
Use a fast SSD!
Everything can be removed again without damage, just feel free to try it.



Cheeers,
Crowi
Last edited by crowi on 09 Jul 2014 15:27, edited 1 time in total.
NAS 1: Milchkuh: Asrock C2550D4I, Intel Avoton C2550 Quad-Core, 16GB DDR3 ECC, 5x3TB WD Red RaidZ1 +60 GB SSD for ZIL/L2ARC, APC-Back UPS 350 CS, NAS4Free 11.0.0.4.3460 embedded
NAS 2: Backup: HP N54L, 8 GB ECC RAM, 4x4 TB WD Red, RaidZ1, NAS4Free 11.0.0.4.3460 embedded
NAS 3: Office: HP N54L, 8 GB ECC RAM, 2x3 TB WD Red, ZFS Mirror, APC-Back UPS 350 CS NAS4Free 11.0.0.4.3460 embedded

ku-gew
Advanced User
Advanced User
Posts: 172
Joined: 29 Nov 2012 09:02
Location: Den Haag, The Netherlands
Status: Offline

Re: Howto for adding a ZIL and L2ARC on one SSD using the sh

Post by ku-gew »

Keep in mind that ZFS uses the L2ARC mostly for static files with a random access pattern. If the file is read in a streaming fashion (or a lot of it is read), L2ARC is not used.
In other words, L2ARC it's not a good use of money for home NASes, it makes sense only if you have a SSD lying around or if you have databases and such in a pro environment.
At home, just save the SATA port for a redundancy disk and the money for RAM.
HP Microserver N40L, 8 GB ECC, 2x 3TB WD Red, 2x 4TB WD Red
XigmaNAS stable branch, always latest version
SMB, rsync

User avatar
crowi
Forum Moderator
Forum Moderator
Posts: 1176
Joined: 21 Feb 2013 16:18
Location: Munich, Germany
Status: Offline

Re: Howto for adding a ZIL and L2ARC on one SSD using the sh

Post by crowi »

I agree, but this Howto is anyway intended for people who want to try out the different options,
as I was missing this one piece I just wanted to contribute...

Cheers,
Crowi
NAS 1: Milchkuh: Asrock C2550D4I, Intel Avoton C2550 Quad-Core, 16GB DDR3 ECC, 5x3TB WD Red RaidZ1 +60 GB SSD for ZIL/L2ARC, APC-Back UPS 350 CS, NAS4Free 11.0.0.4.3460 embedded
NAS 2: Backup: HP N54L, 8 GB ECC RAM, 4x4 TB WD Red, RaidZ1, NAS4Free 11.0.0.4.3460 embedded
NAS 3: Office: HP N54L, 8 GB ECC RAM, 2x3 TB WD Red, ZFS Mirror, APC-Back UPS 350 CS NAS4Free 11.0.0.4.3460 embedded

RedneckBob
NewUser
NewUser
Posts: 8
Joined: 05 Aug 2013 18:28
Status: Offline

Re: Howto for adding a ZIL and L2ARC on one SSD using the sh

Post by RedneckBob »

crowi wrote:I agree, but this Howto is anyway intended for people who want to try out the different options,
as I was missing this one piece I just wanted to contribute...

Cheers,
Crowi
Great post, thanks. I just happen to have a 32G SSD drive laying around and while my current box is plenty fast for my needs, I'm going to add the SSD drive just for kicks.
Gigabyte GA-C847N-D 1.1Ghz / 16G RAM / Supermicro SATA-MV2 - 8-Port PCI-X / 32G SSD / 6 - 3T SATA-III / LIAN PC-Q25B - RAIDZ2

User avatar
Lee Sharp
Advanced User
Advanced User
Posts: 251
Joined: 13 May 2013 21:12
Contact:
Status: Offline

Re: Howto for adding a ZIL and L2ARC on one SSD using the sh

Post by Lee Sharp »

Actually, I can see this being quite useful. Most very fast SSDs are significantly larger than actually needed for a ZIL device. Making half of them a l2arc will not impact ZIL performance at all other than the I/O contention, which may not even come up that much.

Kudos crowi!

User avatar
siftu
Moderator
Moderator
Posts: 71
Joined: 17 Oct 2012 06:36
Status: Offline

Re: Howto for adding a ZIL and L2ARC on one SSD using the sh

Post by siftu »

It would be interesting to see your before and after performance figures. We have had users do this only to suffer far worse performance than just raw disk.
System specs: NAS4Free amd64-embedded on ASUSTeK. M5A78L-M LX PLUS - AMD Phenom(tm) II X3 720 Processor - 8GB ECC Ram, Storage: 2x ZFS mirrors with 4x Western Digital Green (WDC WD10EADS)
My NAS4Free related blog - http://n4f.siftusystems.com/

byroncollege
NewUser
NewUser
Posts: 1
Joined: 24 Oct 2013 07:35
Status: Offline

Re: Howto for adding a ZIL and L2ARC on one SSD using the sh

Post by byroncollege »

What about aligning the ZIL for 4k drives/zfs pools?

Post Reply

Return to “Suggestions & Requests”