Skip to content

ZIL: Improve write log size accounting #17373

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 1 commit into from
May 24, 2025
Merged

ZIL: Improve write log size accounting #17373

merged 1 commit into from
May 24, 2025

Conversation

amotin
Copy link
Member

@amotin amotin commented May 23, 2025

Before this change write log size TXG throttling mechanism was accounting only user payload bytes. But the actual ZIL both on disk and especially in memory include headers of hundred(s) of bytes. Not accouting those may allow applications like bonnie++, in their wisdom writing one byte at a time, to consume excessive amount of memory and ZIL/SLOG in one TXG.

Types of changes

  • Bug fix (non-breaking change which fixes an issue)
  • New feature (non-breaking change which adds functionality)
  • Performance enhancement (non-breaking change which improves efficiency)
  • Code cleanup (non-breaking change which makes code smaller or more readable)
  • Quality assurance (non-breaking change which makes the code more robust against bugs)
  • Breaking change (fix or feature that would cause existing functionality to change)
  • Library ABI change (libzfs, libzfs_core, libnvpair, libuutil and libzfsbootenv)
  • Documentation (a change to man pages or other documentation)

Checklist:

Before this change write log size TXG throttling mechanism was
accounting only user payload bytes.  But the actual ZIL both on
disk and especially in memory include headers of hundred(s) of
bytes.  Not accouting those may allow applications like
bonnie++, in their wisdom writing one byte at a time, to consume
excessive amount of memory and ZIL/SLOG in one TXG.

Signed-off-by:	Alexander Motin <[email protected]>
Sponsored by:	iXsystems, Inc.
Copy link
Member

@robn robn left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Very good.

@amotin amotin added the Status: Accepted Ready to integrate (reviewed, tested) label May 24, 2025
@amotin amotin merged commit 9d76950 into openzfs:master May 24, 2025
23 of 24 checks passed
@amotin amotin deleted the wrlog branch May 24, 2025 01:48
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Status: Accepted Ready to integrate (reviewed, tested)
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants