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!

ZIL and L2ARC on the installation SSD?

Forum rules
Set-Up GuideFAQsForum Rules
Post Reply
User avatar
Viper780
Starter
Starter
Posts: 42
Joined: 23 Jun 2012 14:54
Location: Vienna / Austria / Europe
Contact:
Status: Offline

ZIL and L2ARC on the installation SSD?

Post by Viper780 »

Hi there

I've an homebuilt NAS for about 2 years here (Intel Xeon E3-1225 v3 4x 3.20GHz, Samsung SSD 840 Evo 250GB, 16GB ECC RAM and 5x4TB WD Red) run with FreeNAS 9.2.2 alpha for over an year now. Was never quiet happy with it and now got back to NAS4Free (used the oled FreeNAS 0.7.2 on my upgraded Intel SS4200 for many years).

I've installed the NAS4Free-x64-LiveUSB-10.2.0.2 Image on the SDD (with swap) and just imported my ZFS Pool (about 10TB of Data, mostly pictures, mp3/flac and movies)

Now I want to use ZIL and L2ARC. Both should be on the same SSD. But i only have one partiton left:

Code: Select all

******* Working on device /dev/ada0 *******
parameters extracted from in-core disklabel are:
cylinders=484521 heads=16 sectors/track=63 (1008 blks/cyl)

Figures below won't work with BIOS for partitions not in cyl 1
parameters to be used for BIOS calculations are:
cylinders=484521 heads=16 sectors/track=63 (1008 blks/cyl)

Media sector size is 512
Warning: BIOS sector numbering starts with sector 1
Information from DOS bootblock is:
The data for partition 1 is:
sysid 165 (0xa5),(FreeBSD/NetBSD/386BSD)
    start 63, size 16402302 (8008 Meg), flag 80 (active)
	beg: cyl 0/ head 1/ sector 1;
	end: cyl 1020/ head 254/ sector 63
The data for partition 2 is:
sysid 165 (0xa5),(FreeBSD/NetBSD/386BSD)
    start 16402365, size 40981815 (20010 Meg), flag 0
	beg: cyl 1021/ head 0/ sector 1;
	end: cyl 499/ head 254/ sector 63
The data for partition 3 is:
sysid 165 (0xa5),(FreeBSD/NetBSD/386BSD)
    start 57384180, size 431007885 (210453 Meg), flag 0
	beg: cyl 500/ head 0/ sector 1;
	end: cyl 704/ head 254/ sector 63
The data for partition 4 is:
<UNUSED>
my plan is to shrink the swap partition (number 2) to 10GB and the data partion (numerber 3) to 80GB (used for Jails, Addons, Extensions,..)
Than I've about 10GB for ZIL and 100GB for L2ARC left

But how to do that? I only can add full devices and even with partitions there are only 4 possible primary partitions (because of the MBR)

Can anyonehelp me here?

User avatar
JoseMR
Hardware & Software Guru
Hardware & Software Guru
Posts: 1058
Joined: 16 Apr 2014 04:15
Location: PR
Contact:
Status: Offline

Re: ZIL and L2ARC on the installation SSD?

Post by JoseMR »

Hi I'm no expert on ZIL nor L2ARC, but I think you will have nearly zero benefit in a home environment with ZIL unless you have lots of loads of asynchronous writes i.e Databases IIRC, but on the contrary, nice read improvements with L2ARC if the server will be accessed by multiple clients.

This and This could help you understand how ZIL and L2ARC works, and if you need them.
System: FreeBSD 12 RootOnZFS Mirror, MB: Supermicro X8SI6-F, Xeon X3450, 16GB DDR3 ECC RDIMMs.
XigmaNAS RootOnZFS
Addons at GitHub
BastilleBSD
Boot Environments Intro
Resources Home Page

User avatar
daoyama
Developer
Developer
Posts: 394
Joined: 25 Aug 2012 09:28
Location: Japan
Status: Offline

Re: ZIL and L2ARC on the installation SSD?

Post by daoyama »

Viper780 wrote: my plan is to shrink the swap partition (number 2) to 10GB and the data partion (numerber 3) to 80GB (used for Jails, Addons, Extensions,..)
Than I've about 10GB for ZIL and 100GB for L2ARC left

But how to do that? I only can add full devices and even with partitions there are only 4 possible primary partitions (because of the MBR)
Easy way is install to GPT partition (install menu #2).
Then, delete last partition (data area), add new partitions.

Here is example (ZFS poolname is tank, install to ada0):

# gpart delete -i4 ada0
# gpart add -s 80g -t freebsd-ufs ada0
# gpart add -s 16g -t freebsd-zfs ada0
# gpart add -s 100g -t freebsd-zfs ada0


Format data area:
# newfs -U /dev/ada0p4
Add the partitions to ZFS pool:
# zpool add tank log ada0p5 cache ada0p6

Finally, synchronize the pool from GUI:
Disks|ZFS|Configuration|Synchronize

The layout is like this:

Code: Select all

 nas4free: ~# zpool status
  pool: tank
 state: ONLINE
  scan: none requested
config:

        NAME        STATE     READ WRITE CKSUM
        tank        ONLINE       0     0     0
          mirror-0  ONLINE       0     0     0
            ada1p1  ONLINE       0     0     0
            ada2p1  ONLINE       0     0     0
        logs
          ada0p5    ONLINE       0     0     0
        cache
          ada0p6    ONLINE       0     0     0

errors: No known data errors
Note:
You can remove the ZIL/L2ARC device anytime:
# zpool remove tank ada0p5
# zpool remove tank ada0p6
NAS4Free 10.2.0.2.2115 (x64-embedded), 10.2.0.2.2258 (arm), 10.2.0.2.2258(dom0)
GIGABYTE 5YASV-RH, Celeron E3400 (Dual 2.6GHz), ECC 8GB, Intel ET/CT/82566DM (on-board), ZFS mirror (2TBx2)
ASRock E350M1/USB3, 16GB, Realtek 8111E (on-board), ZFS mirror (2TBx2)
MSI MS-9666, Core i7-860(Quad 2.8GHz/HT), 32GB, Mellanox ConnectX-2 EN/Intel 82578DM (on-board), ZFS mirror (3TBx2+L2ARC/ZIL:SSD128GB)
Develop/test environment:
VirtualBox 512MB VM, ESXi 512MB-8GB VM, Raspberry Pi, Pi2, ODROID-C1

User avatar
Parkcomm
Advanced User
Advanced User
Posts: 384
Joined: 21 Sep 2012 12:58
Location: Australia
Status: Offline

Re: ZIL and L2ARC on the installation SSD?

Post by Parkcomm »

Viper 780 - a couple of things to be aware of.

ZIL
  • you will only need a very small partition for zil (I have 15G configured and have never seen it surpass 1G.
  • I think a bigger ZIL helps because it of the number of writes could ware out a small ZIL quickly
  • You will only see performance improve for NFS synchronous write - I get about 20-30% kick in write speeds. SMB, AFP and Asynch NFS will see no improvement
  • ZIL requires a super capacitor OR a UPS - the Samsung does not have a super capacitor
  • ZILs probably should be redundant
L2ARC
  • The metadata to manage the L2ARC takes up RAM. Its a tossup whether you will get an overall performance improvement from the L2ARC itself or see no improvement or see a degradation from the smaller ARC (smaller RAM => Smaller ARC). Common wisdom is don't bother with L2ARC if you have less than 32G RAM. Some people create a smaller L2ARC to preserve RAM
Combing ZIL/L2ARC
  • You may find the effect using the ARC and ZIL on the same device becomes a bottle neck. In this case you might see improved IOPS but lower throughput
Combining ZIL/L2ARC/SWAP
  • Never tried this, it just sounds like a bad idea - all of these could be in demand at the same time, and that probably would not be when things are going smoothly (on the other hand if you manage memory closely you might never go to swap)
What I am saying is that overall, do not be surprised if you don't get the performance improvement you are hoping for. And I'd probably turn on each capability one by one, test it and burn it in for a little while.

However - try it out for sure, you'll only find out for your usage and data by testing against the same. Also don't get hung up on running benchmarks, they don't necessarily test the number that is important to you.
NAS4Free Embedded 10.2.0.2 - Prester (revision 2003), HP N40L Microserver (AMD Turion) with modified BIOS, ZFS Mirror 4 x WD Red + L2ARC 128M Apple SSD, 10G ECC Ram, Intel 1G CT NIC + inbuilt broadcom

User avatar
Viper780
Starter
Starter
Posts: 42
Joined: 23 Jun 2012 14:54
Location: Vienna / Austria / Europe
Contact:
Status: Offline

Re: ZIL and L2ARC on the installation SSD?

Post by Viper780 »

Many thanks for all of your input (specially daoyama with the easy Step-by-step guide).

I didn't get the chance to try it yet. Benchmarks aren't my concern and also it isn't about the speed more to get to know what I'm doing and testing for a bigger storage rig for my company.

User avatar
Parkcomm
Advanced User
Advanced User
Posts: 384
Joined: 21 Sep 2012 12:58
Location: Australia
Status: Offline

Re: ZIL and L2ARC on the installation SSD?

Post by Parkcomm »

Great - have fun. If its a test environment, try every single thing i warned you about and see what happens! I'd be interested to know what you find.

(and I wouldn't worry about redundant zil in a test environment)
NAS4Free Embedded 10.2.0.2 - Prester (revision 2003), HP N40L Microserver (AMD Turion) with modified BIOS, ZFS Mirror 4 x WD Red + L2ARC 128M Apple SSD, 10G ECC Ram, Intel 1G CT NIC + inbuilt broadcom

User avatar
Viper780
Starter
Starter
Posts: 42
Joined: 23 Jun 2012 14:54
Location: Vienna / Austria / Europe
Contact:
Status: Offline

Re: ZIL and L2ARC on the installation SSD?

Post by Viper780 »

Test environment isn't the right term, it is my home NAS. But the most stuff on it I can get it again or I've there an backup anyway.

User avatar
Parkcomm
Advanced User
Advanced User
Posts: 384
Joined: 21 Sep 2012 12:58
Location: Australia
Status: Offline

Re: ZIL and L2ARC on the installation SSD?

Post by Parkcomm »

Same as me then - I treat mine like a test environment from time to time, but I'd stick with the incremental approach.
NAS4Free Embedded 10.2.0.2 - Prester (revision 2003), HP N40L Microserver (AMD Turion) with modified BIOS, ZFS Mirror 4 x WD Red + L2ARC 128M Apple SSD, 10G ECC Ram, Intel 1G CT NIC + inbuilt broadcom

Post Reply

Return to “ZFS (only!)”