Applies to: V2.1.x,V2.2.x,V3.0.x,V3.1.x,V3.2.x,V3.3.x,V4.0.x,V4.1.x,V4.2.x
Applicable versions
All OBLOADER versions.
Problem description
-
OBLOADER reports a Java out-of-memory error:
Java heap space. -
Import speed gradually decreases while OBLOADER runs.
Cause
The default OBLOADER JVM memory is 4G. OBLOADER computes concurrency from the system CPU count, defaulting to twice that count. For example, 32 CPUs result in concurrency of 64. For large imports, 4G of JVM memory may be insufficient for this concurrency, leading to frequent full GC, deteriorating performance, or termination due to JVM memory exhaustion.
Diagnosis
Check GC as follows.
-
Run
jpsto list Java processes for the current user.jps -
Run
jstatto inspect GC statistics for the Java process.jstat -gc pid interval countReal-time metrics are shown below.

Focus on FGC and FGCT:
- FGC: Total full GC count
- FGCT: Total full GC time
Solution
Increase JVM memory and limit worker concurrency.
-
Increase JVM memory: in
bin/obloader, change-Xmsand-Xmx.vim bin/obloader JAVA_OPTS="$JAVA_OPTS -server -Xms32G -Xmx32G -XX:MetaspaceSize=512M -XX:MaxMetaspaceSize=512M -Xss352K" -
Reduce concurrency by adding
--thread xxto the OBLOADER command../obloader -h 10.x.x.x -P 2883 -u test -p ****** --sys-password ****** -c cluster_a -t mysql -D USERA --sql --all -f /output --thread 8