[Bug] IotDB pods crash with OOM because we calculate the memory based on the node not pod resources
I maintainer di solito rispondono entro 1 giorno
Nessuno ha ancora preso questa issue.
Valutazione
- Difficoltà
- 3/5
- Tempo stimato
- 1-2 giorni
- Idoneità per principianti
- 68/100
Direzione di ricerca
Iniziare con conf/confignode-env.sh e conf/datanode-env.sh, in particolare con il calcolo di system_memory_in_mb usando free -m. Confrontare i casi di limite di memoria cgroup v2 e v1 descritti nell’issue, quindi verificare che un pod limitato a 8 GB dimensioni la JVM in base a tale limite anziché alla memoria dell’host ed eviti i riavvii OOM.
Scritto dal modello di indicizzazione a partire dal testo della issue.
Descrizione
Search before asking
- I searched in the issues and found nothing similar.
Version
latest
Describe the bug and provide the minimal reproduce step
Start IOTDB datanode and confignode pods with memory limits, for example 8 GB, and allocate 8 GB of resources to each pod.
Pods keep crashing with OOM errors because the JVM is trying to allocate 16 GB of memory.
What did you expect to see?
# When running in a container/pod, use cgroup memory limit instead of host memory
if [ -f /sys/fs/cgroup/memory.max ]; then
# cgroup v2
cgroup_mem=`cat /sys/fs/cgroup/memory.max`
if [ "$cgroup_mem" != "max" ]; then
cgroup_mem_in_mb=`expr $cgroup_mem / 1024 / 1024`
if [ "$cgroup_mem_in_mb" -lt "$system_memory_in_mb" ]; then
system_memory_in_mb=$cgroup_mem_in_mb
fi
fi
elif [ -f /sys/fs/cgroup/memory/memory.limit_in_bytes ]; then
# cgroup v1
cgroup_mem=`cat /sys/fs/cgroup/memory/memory.limit_in_bytes`
cgroup_mem_in_mb=`expr $cgroup_mem / 1024 / 1024`
if [ "$cgroup_mem_in_mb" -lt "$system_memory_in_mb" ]; then
system_memory_in_mb=$cgroup_mem_in_mb
fi
fi
8GB
I would expect the memory to be auto-calculated based on the pod resources (8 GB), not the node resources (32 GB).
# scripts\conf\datanode-env.sh
system_memory_in_mb=`free -m | sed -n '2p' | awk '{print \$2}'` returns 32 GB.
What did you see instead?
32 GB and a lot of pod restarts
Anything else?
# iotdb\WORKING_CONFIGS.md
## 2) JVM Memory (Linux)
Edit these files:
- conf/confignode-env.sh
- conf/datanode-env.sh
Set MEMORY_SIZE explicitly to avoid auto-sizing surprises.
### ConfigNode memory
```bash
# conf/confignode-env.sh
MEMORY_SIZE=2G
DataNode memory
# conf/datanode-env.sh
MEMORY_SIZE=8G
Why are there no env varibales for this setting?
Do you expect the clouad env to manualy go and change this limit?
This is a hack, and we should not have to do this in a pod
- IOTDB_JMX_OPTS=-Xmx4G
Are you willing to submit a PR?
- I'm willing to submit a PR!
- Lingua principale
- Java
- Stelle
- 6.4k
- Fork
- 1.2k
- Merge medio
- 1g 17h
- PR unite (30g)
- 152
Preparare l'ambiente
Come iniziare
- Leggi tutta la issue e poi la guida ai contributi del progetto.
- Commenta sulla issue per dire che te ne occupi tu — evita che due persone facciano lo stesso lavoro.
- Fai un fork del repository e lavora su un branch.
- Apri una pull request che faccia riferimento al numero della issue.
Altre issue di apache/iotdb
-
Difficoltà 2/5 1-3 ore Idoneità per principianti 82/100
apache/iotdb#18655 · 1 reazione ·
I maintainer di solito rispondono entro 1 giorno
-
IoTDB Edge: stop-edge.sh does not stop its own process when IOTDB_HOME is set, and reports successAperta
Difficoltà 2/5 1-3 ore Idoneità per principianti 78/100
I maintainer di solito rispondono entro 1 giorno
-
Difficoltà 2/5 1-3 ore Idoneità per principianti 78/100
I maintainer di solito rispondono entro 1 giorno
-
[Bug] findColumn throws NullPointerException instead of SQLException for an unknown column nameAperta
Difficoltà 2/5 1-3 ore Idoneità per principianti 78/100
I maintainer di solito rispondono entro 1 giorno
-
Difficoltà 2/5 1-3 ore Idoneità per principianti 78/100
I maintainer di solito rispondono entro 1 giorno
Tutte le issue di apache/iotdb
Issue simili
-
and-bugs and-ui gpx-track
Difficoltà 2/5 1-3 ore Idoneità per principianti 86/100
I maintainer di solito rispondono entro 2 giorni
-
TerminalRow.mSpaceUsed (short) overflows on terminals wider than 1023 columns, crashing setCharAperta
Difficoltà 2/5 1-3 ore Idoneità per principianti 88/100
termux/termux-app#5340 ·
I maintainer di solito rispondono entro 1 giorno
-
OpenAICompatibleToolDescriptorSchemaGenerator drops requiredProperties of nested object parametersAperta
Difficoltà 2/5 1-3 ore Idoneità per principianti 78/100
I maintainer di solito rispondono entro 7 giorni
-
Difficoltà 2/5 1-3 ore Idoneità per principianti 86/100
apache/rocketmq-dashboard#5110 ·
I maintainer di solito rispondono entro 1 giorno
-
frontend
Difficoltà 2/5 1-3 ore Idoneità per principianti 88/100
No-Country-simulation/S08-26-equipo04#210 ·
I maintainer di solito rispondono entro 1 giorno