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

Make get-rss less expensive #191

Open
grembo opened this issue Dec 30, 2021 · 0 comments
Open

Make get-rss less expensive #191

grembo opened this issue Dec 30, 2021 · 0 comments
Labels

Comments

@grembo
Copy link
Collaborator

grembo commented Dec 30, 2021

Is your feature request related to a problem? Please describe.
nomad-pot-driver calls "pot get-rss" once per second per container. When running many containers, this causes a lot of forking.

Example on a host running 6 containers:

# while sleep 1; do ps -ax | grep -i "ps -ax"; done
73060  0  R+       0:00.00 ps -ax
73061  0  S+       0:00.00 grep -i ps -ax
73303  0  R+       0:00.00 ps -ax
73304  0  S+       0:00.00 grep -i ps -ax
73546  0  R+       0:00.00 ps -ax
73547  0  S+       0:00.00 grep -i ps -ax
73789  0  R+       0:00.00 ps -ax
73790  0  S+       0:00.00 grep -i ps -ax
74032  0  R+       0:00.00 ps -ax
74033  0  S+       0:00.00 grep -i ps -ax

Describe the feature you'd like to have
Not entirely sure how to approach this best - doing some actual profiling with very cheap containers would be a first step.

One idea would be some sort of daemon that writes rss information of all processes controlled by a pot instance to a file that can be used as a source to make "pot get-rss" cheaper? In general this feels like it should be solved by reducing the amount of script work involved (maybe potnet could be extended to include more tools that optimize certain things and/or make them more secure, or improve inside of nomad-pot-driver). Keeping as much as possible in shell is a good thing though in terms of iterating over the code and being able to fix things in production easily.

Describe potential alternatives or workaround you've considered (if any)
As a first step, reduce the amount of forking required when calling "pot get-rss".

@grembo grembo added the feature label Dec 30, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

1 participant