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

change oom score adj for nydus daemon #404

Closed

Conversation

sctb512
Copy link
Member

@sctb512 sctb512 commented Mar 9, 2023

Nydus-snapshotter does not have a maximum memory limit by default. This can result in host invalidity. We can fix this problem by adding MemoryMax to nydus-snapshotter.service. We can set OOMScoreAdjust=-1000 to prevent killing nydus-snapshotter on OOM.

@sctb512 sctb512 force-pushed the change-oom-score-adj-for-daemon branch 2 times, most recently from 96e7950 to 10ac95a Compare March 9, 2023 09:02
Signed-off-by: Bin Tang <tangbin.bin@bytedance.com>
Nydus-snapshotter does not have a maximum memory limit by default.
This can result in host invalidity. We can fix this problem by
adding MemoryMax to nydus-snapshotter.service. We can set
OOMScoreAdjust=-1000 to prevent killing nydus-snapshotter on OOM.

Signed-off-by: Bin Tang <tangbin.bin@bytedance.com>
Signed-off-by: Bin Tang <tangbin.bin@bytedance.com>
@sctb512 sctb512 force-pushed the change-oom-score-adj-for-daemon branch from 10ac95a to bfb8ccb Compare March 9, 2023 09:04
@@ -40,6 +41,10 @@ func (m *Manager) StartDaemon(d *daemon.Daemon) error {
defer d.Unlock()

d.States.ProcessID = cmd.Process.Pid
err = oom.ChangeDaemonOOMScoreAdj(d.States.ProcessID, -999)
Copy link
Member

Choose a reason for hiding this comment

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

Is it possible to make it work as a Daemon method?

@sctb512
Copy link
Member Author

sctb512 commented Mar 16, 2023

Another solution is #415

@sctb512 sctb512 closed this Jun 6, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants