Need help for setting up slog and zil

ctf_nc

New Member
Dec 21, 2021
4
0
1
24
Hi everyone! i've been studying the difference for slog and zil. As my understanding, slog is for speeding up writes on drive and zil is for speeding up reads.

I've read the article from servethehome about setting up cache drives
https://www.servethehome.com/what-is-the-zfs-zil-slog-and-what-makes-a-good-one/
it explained that slog would not speed up asynchronous writes.

I have 2 zfs pool:
3x 8TB Hdd in Raidz1 (hosting Nextclod and Matrix Synapse in a CT)
1x 2TB HDD in single (data drives for windows vms)

The cache drive im planning to use:
16GB Intel Optane Memory

My question is: should i add a slog and zil drive to the above zfs pool? would it help to speed up the reads and writes? What is the best configuration for me?

Thanks a lot!
 
it explained that slog would not speed up asynchronous writes.
Yes, it is only for sync write and only those need to be "sped up", because a sync write waits for its ack from the storage layer and if you write it to a storage (e.g. optane) that is really, really fast, you will have more sync writes per second which will speed up your system. The URL you provided explains the ZIL very good. Without a special slog device, the ZIL will be on your disk pool and will cause two write operations to your disks, one to the ZIL and after that to the "real" data. Having an slog will write once to the slog and after that to your disk pool.

You would add an log device to your pool via zpool add <pool> log <logdevice>. Best to use two slog devices for redundancy. You may loose up to 5 seconds of data if something fails.
 
Jup, so check first if your workload makes alot of use of sync writes or it won'T help that much. And I think you are mixing a ZIL with a L2ARC or cache drive. L2ARC/cache is a read cache but a slower one than your ARC RAM. And the bigger your L2ARC SSD is, the bigger your RAM has to be because all L2ARC cache needs to be indexed in RAM. So if you are already low on RAM that you want to buy a L2ARC SSD because your ARC isn't that big, that also can be contra productive, because you will reduce the size of your faster ARC even more. Usually its better to just buy more RAM for a bigger ARC instead of getting a L2ARC.

What you could do to improve read and write speeds (even async writes!) is adding two SSD as "special devices" to your 3x 8TB HDD pool. 2x 100GB should be fine for that. It will speed up the entire pool because now your HDDs will store both data + metadata. After adding a mirror of special device SSDs these SSDs will store all the metadata and the HDDs only need to store the data. That way your HDDs will be hit by way less IO and you get a great performance increase when reading/writing alot a small files (I got nearly 3 times the IOPS performance by adding them). But keep in mind that these "special devices" are no cache. If you loose them, all of your data on the HDDs is lost. So you want atleast the same reliability for the SSDs as your got for the HDDs.
 

About

The Proxmox community has been around for many years and offers help and support for Proxmox VE, Proxmox Backup Server, and Proxmox Mail Gateway.
We think our community is one of the best thanks to people like you!

Get your subscription!

The Proxmox team works very hard to make sure you are running the best software and getting stable updates and security enhancements, as well as quick enterprise support. Tens of thousands of happy customers have a Proxmox subscription. Get yours easily in our online shop.

Buy now!