Optimizing single HDD with ZFS

Hi there,
i have one 12 TB disk (7200RPM) for file storage. It performs random reads/writes. I know that writes cause read-modify-write overhead.
Will it make sense to use small SSD as L2ARC ( secondarycache)?
Want to avoid performance bottleneck and other problems.

Also would be great to get ZFS pool configuration proposals :smile:

This is not correct. Read-modify-write essentially never happens with ZFS unless you’ve set ashift lower than the actual physical sector boundaries on the underlying media.

I’m not sure how many configurations I can offer for a single-disk pool… but you probably don’t need L2ARC or SLOG for the most part. On the other hand, an L2ARC configured with secondarycache=metadata might be useful, particularly during cold boots before the ARC is hot.

That is interesting opinion. Ive found an example, pretty similar to my case Workload Tuning — OpenZFS documentation
I`m not 100% sure but seems my proposal will do the same as described in doc. Only difference is temp directory. I will use L2ARC as temp cache before writing data on HDD. Will check performance soon :wink:

Under configurations i meant not a single-disk pool variations :smile: But smth like this

zpool create -o ashift=12 -O compression=lz4 -O atime=off -O recordsize=16k ssd-hdd-hybrid

zfs_vdev_async_write_min_active=1024
zfs_vdev_async_write_max_active=2048
zfs_vdev_async_read_min_active=1024
zfs_vdev_async_read_max_active=2048
zfs_vdev_sync_write_min_active=1024
zfs_vdev_sync_write_max_active=2048
zfs_vdev_sync_read_min_active=1024
zfs_vdev_sync_read_max_active=2048
zfs_vdev_queue_depth_pct=100

L2ARC is a read cache, not a write buffer.

You are right. This part in official doc a bit confusing.

The cache device is managed by the L2ARC, which scans entries that are next to be evicted and writes them to the cache device.

I get it incredibly wrong. And another sentence confirm it

ZFS puts both Reads & Writes into the ARC and L2ARC

So, no profit with SSD as L2ARC cache for Write operations. and some warm cache in case of Read.