This is an automated email from the ASF dual-hosted git repository.
zuston pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/incubator-uniffle.git
The following commit(s) were added to refs/heads/master by this push:
new 386f795f1 [#460] improvement: Exit on OutOfMemoryError (#1390)
386f795f1 is described below
commit 386f795f110dba7ae2588e27a01988fbd66f226b
Author: Qing <[email protected]>
AuthorDate: Thu Dec 21 15:05:19 2023 +0800
[#460] improvement: Exit on OutOfMemoryError (#1390)
### What changes were proposed in this pull request?
Exit on OutOfMemoryError to specify JVM options
### Why are the changes needed?
Fix: https://github.com/apache/incubator-uniffle/issues/460
### Does this PR introduce _any_ user-facing change?
No.
### How was this patch tested?
Tested on production env
---
bin/start-coordinator.sh | 5 +++++
bin/start-dashboard.sh | 5 +++++
bin/start-shuffle-server.sh | 14 ++++++++++++++
3 files changed, 24 insertions(+)
diff --git a/bin/start-coordinator.sh b/bin/start-coordinator.sh
index 3e320134a..0ed2d60b9 100755
--- a/bin/start-coordinator.sh
+++ b/bin/start-coordinator.sh
@@ -73,6 +73,11 @@ JVM_ARGS=" -server \
-XX:+PrintAdaptiveSizePolicy \
-XX:+PrintGCDateStamps \
-XX:+PrintGCTimeStamps \
+ -XX:+PrintTenuringDistribution \
+ -XX:+PrintPromotionFailure \
+ -XX:+PrintGCApplicationStoppedTime \
+ -XX:+PrintCommandLineFlags \
+ -XX:+PrintGCCause \
-XX:+PrintGCDetails \
-Xloggc:${RSS_LOG_DIR}/gc-%t.log"
diff --git a/bin/start-dashboard.sh b/bin/start-dashboard.sh
index 97db3324a..b54fa0cf2 100644
--- a/bin/start-dashboard.sh
+++ b/bin/start-dashboard.sh
@@ -60,6 +60,11 @@ JVM_ARGS=" -server \
-XX:+PrintAdaptiveSizePolicy \
-XX:+PrintGCDateStamps \
-XX:+PrintGCTimeStamps \
+ -XX:+PrintTenuringDistribution \
+ -XX:+PrintPromotionFailure \
+ -XX:+PrintGCApplicationStoppedTime \
+ -XX:+PrintCommandLineFlags \
+ -XX:+PrintGCCause \
-XX:+PrintGCDetails \
-Xloggc:${RSS_LOG_DIR}/gc-%t.log"
diff --git a/bin/start-shuffle-server.sh b/bin/start-shuffle-server.sh
index 5fb85a885..d289a59ae 100755
--- a/bin/start-shuffle-server.sh
+++ b/bin/start-shuffle-server.sh
@@ -85,10 +85,17 @@ if [ -n "${MAX_DIRECT_MEMORY_SIZE:-}" ]; then
MAX_DIRECT_MEMORY_OPTS="-XX:MaxDirectMemorySize=$MAX_DIRECT_MEMORY_SIZE"
fi
+# Attention, the OOM dump file may be very big !
+JAVA_OPTS=""
+if [ -n "${OOM_DUMP_PATH:-}" ]; then
+ JAVA_OPTS="-XX:+HeapDumpOnOutOfMemoryError -XX:HeapDumpPath=$OOM_DUMP_PATH"
+fi
+
JVM_ARGS=" -server \
-Xmx${XMX_SIZE} \
-Xms${XMX_SIZE} \
${MAX_DIRECT_MEMORY_OPTS} \
+ ${JAVA_OPTS} \
-XX:+UseG1GC \
-XX:MaxGCPauseMillis=200 \
-XX:ParallelGCThreads=20 \
@@ -101,6 +108,13 @@ JVM_ARGS=" -server \
-XX:+PrintAdaptiveSizePolicy \
-XX:+PrintGCDateStamps \
-XX:+PrintGCTimeStamps \
+ -XX:+CrashOnOutOfMemoryError \
+ -XX:+ExitOnOutOfMemoryError \
+ -XX:+PrintTenuringDistribution \
+ -XX:+PrintPromotionFailure \
+ -XX:+PrintGCApplicationStoppedTime \
+ -XX:+PrintCommandLineFlags \
+ -XX:+PrintGCCause \
-XX:+PrintGCDetails \
-Xloggc:${RSS_LOG_DIR}/gc-%t.log"