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

Consider auto-configuring Refinery memory consumption tunables by default #100

Closed
bixu opened this issue Jan 26, 2022 · 3 comments
Closed
Labels
status: help wanted Seeking more eyes and hands. type: enhancement New feature or request

Comments

@bixu
Copy link
Contributor

bixu commented Jan 26, 2022

Is your feature request related to a problem? Please describe.
I've seen the tuning for MaxAlloc and CacheCapacity cause some confusion for operators of Refinery in Kubernetes.

Since sane default configs are documented here, why not leverage Helm to configure these?

Describe the solution you'd like
Since Refinery pods should get Guaranteed QoS in K8s anyway (requests and limits on RAM should be matching values), we could use those RAM allocation values to calculate the default values for both MaxAlloc and CacheCapacity. I think we'd want these to be overridable, however, via something like a custom values.yaml file.

Describe alternatives you've considered
I'm considering opening a PR on this myself, but need to negotiate for the time to do so from $job.

@bixu bixu added the type: enhancement New feature or request label Jan 26, 2022
@seh
Copy link

seh commented Jan 27, 2022

You can push the memory limit value down into the Refinery container via the Kubernetes Downward API.

For now, we generate the Refinery configuration from the same program that generates a kustomize patch to set the memory request and limit, so we perform the recommended 80% calculation when writing the configuration file, but it would be nice to have Refinery derive these values from a memory limit supplied via environment variable.

@MikeGoldsmith MikeGoldsmith added the status: help wanted Seeking more eyes and hands. label Jan 31, 2022
@MikeGoldsmith
Copy link
Contributor

Thanks for the suggestion. We'll add this to our backlog for prioritisation, or if you feel inclined we're always open to PRs.

@TylerHelmuth
Copy link
Contributor

With Refinery 2.0's introduction of AvailableMemory and MaxMemoryPercentage the chart is now setting some memory defaults using the resource limits:

Collection:
    # AvailableMemory is the amount of system memory available to the Refinery process.
    AvailableMemory: '{{ .Values.resources.limits.memory }}'
    MaxMemoryPercentage: 75

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
status: help wanted Seeking more eyes and hands. type: enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

4 participants