Page 1 of 1

ZIL and L2ARC on the installation SSD?

Posted: 11 Oct 2015 21:25
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?

Re: ZIL and L2ARC on the installation SSD?

Posted: 12 Oct 2015 00:58
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.

Re: ZIL and L2ARC on the installation SSD?

Posted: 12 Oct 2015 02:01
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

Re: ZIL and L2ARC on the installation SSD?

Posted: 12 Oct 2015 08:04
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.

Re: ZIL and L2ARC on the installation SSD?

Posted: 15 Oct 2015 23:39
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.

Re: ZIL and L2ARC on the installation SSD?

Posted: 16 Oct 2015 05:15
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)

Re: ZIL and L2ARC on the installation SSD?

Posted: 18 Oct 2015 13:44
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.

Re: ZIL and L2ARC on the installation SSD?

Posted: 18 Oct 2015 23:32
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.