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

Actively flush dirty pages when under memory pressure to avoid wrong OOM killer from cgroupv1 #4781

Open
wants to merge 1 commit into
base: main
Choose a base branch
from

Conversation

polyrabbit
Copy link
Contributor

Purpose:

  1. Ensure staged/cached files is persisted in disk, close doesnot guarantee this - see https://linux.die.net/man/2/close
  2. Avoid massive dirty pages in memory, which may cause OOM - see kubelet counts active page cache against memory.available (maybe it shouldn't?) kubernetes/kubernetes#43916
    img_v3_02a9_f5296c41-d455-4796-8a79-7f8191b350ag

@davies
Copy link
Contributor

davies commented Apr 26, 2024

This will slow down writeback especially with HDD or virtual disk.

@polyrabbit
Copy link
Contributor Author

Right, this will hurt HDD performance a lot. How about using an environment variable as a switch? for some cases, user can trade off performance for stability/reliability.

…OOM killer from cgroupv1

Signed-off-by: Changxin Miao <[email protected]>
@polyrabbit polyrabbit changed the title Fsync after every write to avoid massive dirty pages in memory, which may cause OOM Actively flush dirty pages when under memory pressure to avoid wrong OOM killer from cgroupv1 May 17, 2024
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

Successfully merging this pull request may close these issues.

None yet

2 participants