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

Document Kubernetes limits and requests for Garnet #1022

Open
mloskot opened this issue Feb 14, 2025 · 2 comments
Open

Document Kubernetes limits and requests for Garnet #1022

mloskot opened this issue Feb 14, 2025 · 2 comments

Comments

@mloskot
Copy link
Contributor

mloskot commented Feb 14, 2025

Feature request type

enhancement

Is your feature request related to a problem? Please describe

The official Helm chart includes an example of the resources limits/requests:

# -- Resources
resources: {}
# limits:
# cpu: 200m
# memory: 64Mi
# requests:
# cpu: 10m
# memory: 16Mi

but, there is no explanation of those are defaults or recommended values or just 'syntactical' placeholders.

Describe the solution you'd like

At least a suggestion of minimum and recommended limits/requests should be documented to give users an idea, bearings.

Ideally, if Garnet's chart could specify the resources requirements with pre-defined presets like this chart does it for Redis providing
none, nano, micro, small, ... presets:
https://github.com/bitnami/charts/blob/a401c96b685d790344f960eab46e5aba87308f63/bitnami/common/templates/_resources.tpl#L15-L44

Describe alternatives you've considered

Trial and error using the limits from the comment above:

Image

Additional context

@badrishc
Copy link
Collaborator

badrishc commented Feb 26, 2025

I am not sure how we can choose the best presets up front as this is highly workload dependent. You have to decide how to partition your total available memory across: (1) main store index; (2) main store log; (3) object store index; (4) object store log; (5) object store heap size; (6) AOF size in memory. These decisions are based on various workload-level attributes such as number of keys indexed, whether the workload is mostly strings or objects, whether AOF is enabled, etc.

I suppose we could make some rough assumptions and allocate accordingly. We don't really work with Helm charts actively, but if anyone in the community wants to take a stab at this, feel free to contribute.

@mloskot
Copy link
Contributor Author

mloskot commented Feb 26, 2025

@badrishc Thank you for your response.
It is clear to me that an administrator is supposed to tune Garnet parameters. What I suggest is to provide some required or reasonable defaults. Perhaps Garnet could apply rationale similar to this bitnami/charts#23410

While it is true that this is a task of the operator to adapt the resources to their use case, we do not explicitly mention in our documentation that a deployment without resources is not recommended for production.
(...) a set of presets (nano, micro, small...), which will be configured in our charts by default to the smallest size that works in our testing.

The defaults could help Garnet users like myself, when I initially tried simplest storage-less test deployment of Garnet using resources based on Redis nano preset:

Image

eventually realising it needs at least equivalent of small.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants