[Bug] IotDB pods crash with OOM because we calculate the memory based on the node not pod resources
Maintainer antworten meist innerhalb von 1 Tag
Dieses Issue hat noch niemand übernommen.
Bewertung
- Schwierigkeit
- 3/5
- Geschätzter Aufwand
- 1-2 Tage
- Anfängerfreundlichkeit
- 68/100
Rechercherichtung
Beginnen Sie mit conf/confignode-env.sh und conf/datanode-env.sh, insbesondere mit der Berechnung von system_memory_in_mb unter Verwendung von free -m. Vergleichen Sie die im Issue beschriebenen Fälle für Speicherlimits unter cgroup v2 und v1 und überprüfen Sie anschließend, dass ein auf 8 GB begrenzter Pod die JVM anhand dieses Limits statt anhand des Speichers des Hosts dimensioniert und OOM-Neustarts vermeidet.
Vom Indexierungsmodell aus dem Issue-Text verfasst.
Beschreibung
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!
- Vorherrschende Sprache
- Java
- Sterne
- 6.4k
- Forks
- 1.2k
- Ø Merge
- 1 T. 17 Std.
- Gemergte PRs (30 T.)
- 152
Entwicklungsumgebung
Erste Schritte
- Lesen Sie das ganze Issue und danach den Beitragsleitfaden des Projekts.
- Schreiben Sie ins Issue, dass Sie es übernehmen — das erspart doppelte Arbeit.
- Forken Sie das Repository und arbeiten Sie in einem Branch.
- Öffnen Sie einen Pull Request, der die Issue-Nummer nennt.
Mehr aus apache/iotdb
-
Schwierigkeit 2/5 1-3 Stunden Anfängerfreundlichkeit 82/100
apache/iotdb#18655 · 1 Reaktion ·
Maintainer antworten meist innerhalb von 1 Tag
-
IoTDB Edge: stop-edge.sh does not stop its own process when IOTDB_HOME is set, and reports successOffen
Schwierigkeit 2/5 1-3 Stunden Anfängerfreundlichkeit 78/100
Maintainer antworten meist innerhalb von 1 Tag
-
Schwierigkeit 2/5 1-3 Stunden Anfängerfreundlichkeit 78/100
Maintainer antworten meist innerhalb von 1 Tag
-
[Bug] findColumn throws NullPointerException instead of SQLException for an unknown column nameOffen
Schwierigkeit 2/5 1-3 Stunden Anfängerfreundlichkeit 78/100
Maintainer antworten meist innerhalb von 1 Tag
-
Schwierigkeit 2/5 1-3 Stunden Anfängerfreundlichkeit 78/100
Maintainer antworten meist innerhalb von 1 Tag
Ähnliche Issues
-
Schwierigkeit 2/5 1-3 Stunden Anfängerfreundlichkeit 78/100
OpenAPITools/openapi-generator#25014 ·
Maintainer antworten meist innerhalb von 1 Tag
-
bug
Schwierigkeit 2/5 1-3 Stunden Anfängerfreundlichkeit 78/100
openhab/openhab-core#5847 ·
Maintainer antworten meist innerhalb von 1 Tag
-
Schwierigkeit 2/5 1-3 Stunden Anfängerfreundlichkeit 75/100
-
bug
Schwierigkeit 2/5 1-3 Stunden Anfängerfreundlichkeit 76/100
-
Schwierigkeit 2/5 1-3 Stunden Anfängerfreundlichkeit 88/100
apache/parquet-java#3820 ·
Maintainer antworten meist innerhalb von 1 Tag