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

Sane default for memory limit #175

Open
basi01 opened this issue Jul 19, 2023 · 0 comments
Open

Sane default for memory limit #175

basi01 opened this issue Jul 19, 2023 · 0 comments

Comments

@basi01
Copy link

basi01 commented Jul 19, 2023

Currently, the script copies the static file "vcap_application.json" to the container and inside we have "mem": 1024.
Please modify the function create_vcap_application() to load memory information from /sys/fs/cgroup/memory/memory.stat and calculate a sane default for the memory limit. For example: min(hierarchical_memsw_limit, hierarchical_memory_limit*2 ). See https://www.kernel.org/doc/Documentation/cgroup-v1/memory.txt

It will still be possible to override this calculation with the env var MEMORY_LIMIT.

Our case is Kubevela and we control the resources limits with the vela manifest:

      resources: 
        cpu: 4
        memory: 8Gi

We don't want to duplicate this info into the environment variables.

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

1 participant