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

Add CPU resource request/limit for workshop container #294

Open
billkable opened this issue Feb 2, 2024 · 2 comments
Open

Add CPU resource request/limit for workshop container #294

billkable opened this issue Feb 2, 2024 · 2 comments
Labels
enhancement New feature or request

Comments

@billkable
Copy link
Contributor

Is your feature request related to a problem? Please describe.

Sometimes workshop users are developers who will build and run applications directly in the workshop container, where the workshop container resource configuration may need to be configured to constrain or run the associated applications.

Describe the solution you'd like

Educates currently supports the ability to configure memory request/limit (see last paragraph of Resource budget for namespaces), but ability to configure cpu request/limit is also necessary.

Describe alternatives you've considered

Using docker allows for setting container CPU and/or memory requests/limits, which is useful when running with docker-compose.

But many times developers will want to run directly on their development machine, which in the case of educates, is the workshop container.

Additional information

No response

@billkable billkable added the enhancement New feature or request label Feb 2, 2024
@GrahamDumpleton
Copy link
Contributor

For limit, on memory one can use:

There is no separate setting for request because as a general rule you want memory to be a guaranteed resource to avoid eviction of the pod, so request is set internally to be the same as limit by default.

For memory you can if absolutely necessary use patches to set request and limit separately.

As to CPU there is no explicit setting for a workshop and since it is hard to gauge what it should be is left unbounded for the workshop container itself. IOW, there is no limit or request for CPU and so you shouldn't hit this as a restriction. There is no explicit setting for it because of the uncertainties around how it should be set to avoid running out of CPU on nodes when pods are scheduled.

If you really did want to play with CPU bounds, you can uses patches mechanism to override request and limit for CPU.

If set you would want to ensure that request is set separately to limit and not the same, with request set very low. IOW, don't guarantee CPU as you will quickly run out of available CPU on the nodes given it is a limit resource.

Can you explain more about the specific problem lack of default setting on CPU is causing?

@billkable
Copy link
Contributor Author

Can you explain more about the specific problem lack of default setting on CPU is causing?

More or less minimizing chance of noisy neighbor. Some of workshops run GraalVM native builds, while others might be running ab or load generators (there are some Spring Boot demos doing such things).

limits may be sufficient, not necessarily requests (that can limit scheduling).

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
Development

No branches or pull requests

2 participants