You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Currently script start.sh contains following code to automatically set memory limits:
if [ "$MEM_LIMIT_MB" = "" ]; then
DOCKER_LIM_FILE="/sys/fs/cgroup/memory/memory.limit_in_bytes"
if [ -e "${DOCKER_LIM_FILE}" ]; then
MEM_LIMIT_MB=$(($(cat ${DOCKER_LIM_FILE})/1024/1024))
echo "Using process mem limit of ${MEM_LIMIT_MB}MiB from ${DOCKER_LIM_FILE}"
else
MEM_LIMIT_MB="1536"
echo "No process mem limit provided or found, defaulting to ${MEM_LIMIT_MB}MiB"
fi
fi
But it doesn't work in my case in kubernetes, printing following message:
No process mem limit provided or found, defaulting to 1536MiB
MEM_LIMIT_MB=1536
Using default heap size of MIN(41% of MEM_LIMIT_MB, 640MiB) = 629MiB
HEAP_SIZE_MB=629
But there is a limit on this container (set by default by modelmesh controller) equal to 448Mi. This leads to OOMKilled because Java heap tries to grow to 629MiB which is greater than actual limit. I checked and actual limit is present at this path:
This is due to cgroup v2 that stores limits differently (at different path). Is it possible to change start.sh script so it works with both cgroup versions?
The text was updated successfully, but these errors were encountered:
Currently script
start.sh
contains following code to automatically set memory limits:But it doesn't work in my case in kubernetes, printing following message:
But there is a limit on this container (set by default by modelmesh controller) equal to 448Mi. This leads to OOMKilled because Java heap tries to grow to 629MiB which is greater than actual limit. I checked and actual limit is present at this path:
This is due to cgroup v2 that stores limits differently (at different path). Is it possible to change
start.sh
script so it works with both cgroup versions?The text was updated successfully, but these errors were encountered: