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

--experimental-memory-mlock support #12750

Merged
merged 1 commit into from
Mar 9, 2021
Merged

Conversation

ptabor
Copy link
Contributor

@ptabor ptabor commented Mar 5, 2021

The flag protects etcd memory from being swapped out to disk.
This can happen in memory constrained systems where mmaped bbolt
area is natural candidate for swapping out.

This flag should provide better tail latency on the cost of higher RSS
ram usage. If the experiment is successful, the logic should get moved
into bbolt layer, where we can protect specific bbolt instances
(e.g. avoid protecting both during defragmentation).

@ptabor ptabor force-pushed the 20210306-mlock branch 3 times, most recently from 8bf7385 to 3d476df Compare March 7, 2021 00:36
The flag protects etcd memory from being swapped out to disk.
This can happen in memory constrained systems where mmaped bbolt
area is natural condidate for swapping out.

This flag should provide better tail latency on the cost of higher RSS
ram usage. If the experiment is successful, the logic should get moved
into bbolt layer, where we can protect specific bbolt instances
(e.g. avoid protecting both during defragmentation).
Copy link
Contributor

@gyuho gyuho left a comment

Choose a reason for hiding this comment

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

lgtm thanks!

@gyuho gyuho merged commit 94a371a into etcd-io:master Mar 9, 2021
wpedrak added a commit to wpedrak/bbolt that referenced this pull request Apr 22, 2021
`Mlock` flag will cause mlock on db file which will prevent memory swapping of it. Motivation of this commit (etcd): etcd-io/etcd#12750
@vivekpatani
Copy link
Contributor

vivekpatani commented Aug 4, 2022

Hi @ptabor @serathius either I don't have complete context or the flag is missing from help.go. Any reasons why that has been not added? Thanks.

passiondev2024 added a commit to passiondev2024/bbolt that referenced this pull request Mar 20, 2024
`Mlock` flag will cause mlock on db file which will prevent memory swapping of it. Motivation of this commit (etcd): etcd-io/etcd#12750
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Development

Successfully merging this pull request may close these issues.

3 participants