docker-mendix-buildpack
docker-mendix-buildpack copied to clipboard
Sane default for memory limit
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.