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

Runtime: improve resource limiting API #48

Open
2 tasks
camerondurham opened this issue Mar 6, 2022 · 0 comments
Open
2 tasks

Runtime: improve resource limiting API #48

camerondurham opened this issue Mar 6, 2022 · 0 comments
Labels
nice to have Not a priority runtime Engine runtime handles safely executing user submitted code

Comments

@camerondurham
Copy link
Owner

camerondurham commented Mar 6, 2022

This issue is to improve the resource limiting API by removing the process helper CLI or using another library to limit host resources.

An "external" process may not be needed and hopefully can find a way around this.

Tasks:

  • test if limiting behavior can be accomplished in same process
  • create new issue to try limiting using cgroups instead of rlimits (see containerd/cgroups)

Related Background

The prlimit/setrlimit mechanism being used will apply limits on the process if the user is not root and these limits will be for that user. Will need to manually test this implementation, this is possibly sufficient for now but using separate non-root users for each process is needed next.

prlimit --nproc a.k.a. RLIMIT_NPROC a.k.a. ulimit -u is the maximum number of processes¹ for the user as a whole. If you already have 20 processes running, and you set the limit to 20, you can't create any new process. What matters is how many processes are running as your user, it doesn't matter who their parent is or what their limit setting is.
[source]

See notes in this issue for more details: #42 (comment)

Originally posted by @camerondurham in #38 (comment)

@camerondurham camerondurham added the runtime Engine runtime handles safely executing user submitted code label Mar 6, 2022
@camerondurham camerondurham added the nice to have Not a priority label Mar 7, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
nice to have Not a priority runtime Engine runtime handles safely executing user submitted code
Projects
Development

No branches or pull requests

1 participant