feat: add config option to run redis server inside mem-constrained cgroup#127
Open
dariusgrassi wants to merge 4 commits intoldos-project:mainfrom
Open
feat: add config option to run redis server inside mem-constrained cgroup#127dariusgrassi wants to merge 4 commits intoldos-project:mainfrom
dariusgrassi wants to merge 4 commits intoldos-project:mainfrom
Conversation
tewaro
requested changes
May 4, 2025
Collaborator
tewaro
left a comment
There was a problem hiding this comment.
Make these small changes, let's go from there.
| ${CONTAINER_CPUSET} \ | ||
| --pid=host \ | ||
| --privileged \ | ||
| --cgroupns=host \ |
Contributor
Author
There was a problem hiding this comment.
by default the docker namespace is restricted from managing cgroups internally. this flag grants the container the necessary permissions for host cgroup management.
tewaro
requested changes
May 18, 2025
Comment on lines
+106
to
+107
| with open(f"{cgroup_path}/cgroup.procs", "w") as f: | ||
| f.write(str(os.getpid())) |
Collaborator
There was a problem hiding this comment.
shouldn't you be able to do this with a launching pre_exec function in subprocess?
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Add something similar to
to your config for Redis to constrain the memory available to the Redis server
this PR also allows redis benchmarks to complete with the collector on when memory constrained