[zfs-discuss] SLOG, RAM and zfs_dirty_data_max

BeetRoot ServAdm beetrootservadm at gmail.com
Thu Apr 19 05:05:33 EDT 2018

Thank you very much for the clear explanation. I think it should be
somewhere in the documentation.

And just two small relevant questions: Is there a way to tell how much data
is now in the (dirty) buffer? Is this number the same with column 'dirty'
at atop's MEM stats?

thanks again!

2018-04-17 15:29 GMT+03:00 Edward Ned Harvey (zfsonlinux) <
zfsonlinux at nedharvey.com>:

> > From: zfs-discuss <zfs-discuss-bounces at list.zfsonlinux.org> On Behalf Of
> > BeetRoot ServAdm via zfs-discuss
> >
> > As I have read, zfs_dirty_data_max is a buffer located in RAM to quickly
> > accomodate writes before they are flushed to disk. How is this working in
> > case there is also an SLOG? The buffer is no longer in RAM but only in
> the
> > SLOG? Or is the data first hitting RAM, then SLOG, and then disk? I
> couln't
> > find this answer to this in documentation.
> Don't think too hard about it.
> When an application writes, it can write sync mode or async mode. If it
> writes async mode, the write goes into write buffer, which gets flushed
> every 5 seconds or when zfs_dirty_data_max bytes are in the buffer. If it
> writes in sync mode, ZFS first writes it to nonvolatile storage (slog
> device if available) and then handles it just like a regular async write.
> By doing this, you get write aggregation. Lots of small writes accumulate
> in the buffer and then all get flushed to disk in a single larger
> transaction.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://list.zfsonlinux.org/pipermail/zfs-discuss/attachments/20180419/40db9a45/attachment.html>

More information about the zfs-discuss mailing list