Skip to content
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

Limit file growth rate #56

Open
antiguru opened this issue Feb 17, 2025 · 0 comments
Open

Limit file growth rate #56

antiguru opened this issue Feb 17, 2025 · 0 comments

Comments

@antiguru
Copy link
Owner

At the moment, lgalloc allocates files per size class with doubling capacity. This minimizes the number of files, but can cause contention on the kernel data structures: each file is mapped in its entirety. Linux manages the mapping as a single virtual mapping (VMA), and some operations require locks, which can serialize access to the mappings.

This shows as the background worker fencing out other threads during maintenance, which is undesirable as it causes latency spikes and dropped throughput for other threads.

Instead, lgalloc could do two things:

  • Grow files with a smaller exponent instead of doubling, for example 1.3, and make it configurable.
  • Grow files in doubling capacity, but map multiple times in non-overlapping chunks.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant