ZFS and SSD cache size (log (zil) and L2ARC)

Status
Not open for further replies.

jgreco

Resident Grinch
Joined
May 29, 2011
Messages
18,681
My understanding of that (based at least in part on looking at the code) was that it was an optimization primarily for databases where there was no dedicated SLOG device. In such a scenario, a large write being committed to the ZIL area of the pool is more or less similar in terms of performance to a large write just being written to update the data, so in that case it skips the ZIL. But it's kind of a complex optimization, and it looks like it'll still run larger sync writes through the ZIL as long as it is on a SLOG, so it gets hard to wrap your head around all the cases.
 

paleoN

Wizard
Joined
Apr 22, 2012
Messages
1,403
My understanding of that (based at least in part on looking at the code) was that it was an optimization primarily for databases where there was no dedicated SLOG device.
AFAIR, zfs_immediate_write_sz was part of the ZIL code sometime before logbias parts were added.

But it's kind of a complex optimization, and it looks like it'll still run larger sync writes through the ZIL as long as it is on a SLOG, so it gets hard to wrap your head around all the cases.
I didn't realize that, but yes it looks like it will always use the SLOG for any sync writes regardless of size. Which makes sense as the SLOG should write an order of magnitude faster than the main pool ZIL.


This is what I half remembered wrt 1MB.
N. Perrin said:
Which has to do with performance when using multiple striped SLOGs and has nothing to do with zfs_immediate_write_sz or when it actually writes to the main pool.
 

jgreco

Resident Grinch
Joined
May 29, 2011
Messages
18,681
It's always fun to try to understand the point of some of the optimizations that seem to be floating around in ZFS when you're missing the context in which they're meant to be applied... :smile:
 
Status
Not open for further replies.
Top