[zfs-discuss] SLOG, RAM and zfs_dirty_data_max
richard.elling at richardelling.com
Thu Apr 19 15:09:07 EDT 2018
> On Apr 19, 2018, at 2:05 AM, BeetRoot ServAdm via zfs-discuss <zfs-discuss at list.zfsonlinux.org> wrote:
> Thank you very much for the clear explanation. I think it should be somewhere in the documentation.
man zfs-module-paramters, section ZFS TRANSACTION DELAY
> 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?
I can't speak for atop (I've never used it)
You can already get the values that pertain to the ZFS TRANSACTION DELAY (aka write throttle)
as described in zfs-module-parameters. When workloads cause the delay thresholds to be reached,
the counters in /proc/spl/kstat/zfs/dmu_tx are incremented. I've got some preliminary docs on this,
not yet ready for review. Reach out if you're interested.
> thanks again!
> 2018-04-17 15:29 GMT+03:00 Edward Ned Harvey (zfsonlinux) <zfsonlinux at nedharvey.com <mailto:zfsonlinux at nedharvey.com>>:
> > From: zfs-discuss <zfs-discuss-bounces at list.zfsonlinux.org <mailto: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.
> zfs-discuss mailing list
> zfs-discuss at list.zfsonlinux.org
-------------- next part --------------
An HTML attachment was scrubbed...
More information about the zfs-discuss