Solved ZFS with SSD L2ARC

Hello,

I am building a PC currently. I want to use 1 HDD and 1 SSD as ZFS file-system. The problem is I don't know how to do it manually.

I want to use SSD as cache to HDD. From what I've read I understand that I should use L2ARC partition on SSD. Is that correct?

And where can I find how to install FreeBSD manually with this configuration?

Thank you for your help.
 
Just install FreeBSD as normal on the HDD. You can add L2ARC afterwards once the system is up and running. Note however that adding L2ARC isn't a guaranteed speed improvement. It entirely depends on the load whether or not adding L2ARC will improve performance.

Alternatively you may want to install FreeBSD on the SSD and use the HDD for things like home directories.
 
Just install FreeBSD as normal on the HDD. You can add L2ARC afterwards once the system is up and running. Note however that adding L2ARC isn't a guaranteed speed improvement. It entirely depends on the load whether or not adding L2ARC will improve performance.

Alternatively you may want to install FreeBSD on the SSD and use the HDD for things like home directories.

The SSD is a small one. This is the only use that I can find. I wonder if I install FreeBSD on HDD and add L2ARC after, can i configure swap on SSD. Or is it make any difference for swap to be on SSD or HDD?

I tried this: https://wiki.freebsd.org/RootOnZFS/GPTZFSBoot
But I got an error when i create directories. It's creating the directory but not mounting it. I kind of find a solution to that but after that installing FreeBSD is another problem. When I try to cd /dist/11.0-* it finds nothing.
 
The SSD is a small one. This is the only use that I can find. I wonder if I install FreeBSD on HDD and add L2ARC after, can i configure swap on SSD.

The amount of space required to even make an L2ARC worthwhile is much greater than the amount of space needed to install the operating system. And unlike an L2ARC cache and swap space, installing the OS on an SSD is guaranteed not to be a complete waste. Both swap space and an SSD cache device are really only useful if the system is constantly under heavy load. They're both fallback mechanisms, after all, not used under normal circumstances.
 
I think that for a PC, using an SSD for the OS will boost the proformance a lot. I recently replaced my HDD with an SSD and I was shocked with the difference.
 
The amount of space required to even make an L2ARC worthwhile is much greater than the amount of space needed to install the operating system. And unlike an L2ARC cache and swap space, installing the OS on an SSD is guaranteed not to be a complete waste. Both swap space and an SSD cache device are really only useful if the system is constantly under heavy load. They're both fallback mechanisms, after all, not used under normal circumstances.

Thanks for the response. It is a 30G SSD. Then it is better to use SSD for system. And for things that require big space I will use HDD.

But I wonder should I use UFS or ZFS?
 
If this system is so short on RAM that it actually needs/uses SWAP you will more likely degrade performance even more when adding L2ARC, as it also needs RAM for its tables worsening the problem of RAM shortage....
As persistent L2ARC is about to come (IIRC it already landed in illumos), actually it makes more sense to use the slower disks for the pool (and OS installation). All parts of the OS that are used a lot will reside in L2ARC. Stuff that is only used once on boot isn't worth cluttering the scarce faster storage (except if you reboot your system the whole day), so if I had to chose, I'd always use the fastest storage provider for L2ARC (and/or maybe SLOG).

Please note that you won't get any of the redundancy and self-healing capabilities of ZFS with your planned setup. Add a second HDD and setup a mirrored VDEV.
 
Remember that L2ARC is on-disk cache that has to get its traffic trough the I/O subsystem that is often shared by other devices and if there's even a slight amount of I/O contention between the L2ARC device and the main storage devices it's completely useless as a cache. The best way to have an efficient L2ARC device is a dedicated controller for just the L2ARC device(s) and nothing else on that controller.
 
I think this is/was mostly true for (very) old and/or really cheap controllers. Any halfway modern SATA-Controller connected via PCIe 3.0 can handle the loads imposed by normal desktop workloads.

On servers of course the load should be as evenly distributed as possible over SAS/SATA Channels, HBAs, PCIe-Lanes and CPU sockets (or better yet leaving out HBAs and SAS/SATA and using PCIe-SSDs). I'm using one HBA per CPU-Socket with one SSD for L2ARC/SLOG per channel on my storage systems.

If yor board only provides a really cheap/crappy Controller (winbond or SiL come to mind...) I'd recommend a used HBA like the very popular IBM M1015 (PCIe 2.0) or M1215 (PCIe 3.0). They are based on LSI 2008/3008 controllers, which are fast, reliable, well supported and available for <100$.
 
Well the OP said he is building a PC and not a server so I assumed that we are talking about consumer level hardware and on that L2ARC just doesn't make sense unless it's put on a separate good quality controller and even then it might not make much a difference in raw performance.
 
Back
Top