Skip to content

Commit

Permalink
[FLINK-16406] Increase default value for JVM Metaspace to minimise it…
Browse files Browse the repository at this point in the history
…s OutOfMemoryError

This closes apache#11300.
  • Loading branch information
azagrebin committed Mar 12, 2020
1 parent 663af45 commit bb8e387
Show file tree
Hide file tree
Showing 7 changed files with 7 additions and 7 deletions.
2 changes: 1 addition & 1 deletion docs/_includes/generated/common_memory_section.html
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@
</tr>
<tr>
<td><h5>taskmanager.memory.jvm-metaspace.size</h5></td>
<td style="word-wrap: break-word;">96 mb</td>
<td style="word-wrap: break-word;">256 mb</td>
<td>MemorySize</td>
<td>JVM Metaspace Size for the TaskExecutors.</td>
</tr>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@
</tr>
<tr>
<td><h5>taskmanager.memory.jvm-metaspace.size</h5></td>
<td style="word-wrap: break-word;">96 mb</td>
<td style="word-wrap: break-word;">256 mb</td>
<td>MemorySize</td>
<td>JVM Metaspace Size for the TaskExecutors.</td>
</tr>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -415,7 +415,7 @@ public class TaskManagerOptions {
public static final ConfigOption<MemorySize> JVM_METASPACE =
key("taskmanager.memory.jvm-metaspace.size")
.memoryType()
.defaultValue(MemorySize.parse("96m"))
.defaultValue(MemorySize.parse("256m"))
.withDescription("JVM Metaspace Size for the TaskExecutors.");

/**
Expand Down
2 changes: 1 addition & 1 deletion flink-dist/src/main/resources/flink-conf.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -46,7 +46,7 @@ jobmanager.heap.size: 1024m
#
# Note this accounts for all memory usage within the TaskManager process, including JVM metaspace and other overhead.

taskmanager.memory.process.size: 1568m
taskmanager.memory.process.size: 1728m

# To exclude JVM metaspace and overhead, please, use total Flink memory size instead of 'taskmanager.memory.process.size'.
# It is not recommended to set both 'taskmanager.memory.process.size' and Flink memory.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,7 @@ CHECKPOINT_DIR_URI="file://$CHECKPOINT_DIR"
EXPECTED_MAX_MEMORY_USAGE=200000000

set_config_key "taskmanager.numberOfTaskSlots" "$PARALLELISM"
set_config_key "taskmanager.memory.process.size" "1024m"
set_config_key "taskmanager.memory.process.size" "1184m"
set_config_key "taskmanager.memory.managed.size" "300m"
set_config_key "state.backend.rocksdb.memory.managed" "true"
set_config_key "state.backend.rocksdb.memory.write-buffer-ratio" "0.8"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,7 @@ public class KubernetesTaskManagerTestBase extends KubernetesTestBase {
protected static final String POD_NAME = "taskmanager-pod-1";
private static final String DYNAMIC_PROPERTIES = "";

protected static final int TOTAL_PROCESS_MEMORY = 1024;
protected static final int TOTAL_PROCESS_MEMORY = 1184;
protected static final double TASK_MANAGER_CPU = 2.0;

protected final Map<String, String> customizedEnvs = new HashMap<String, String>() {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -52,7 +52,7 @@ public class JavaCmdTaskManagerDecoratorTest extends KubernetesTaskManagerTestBa
private static final String jvmOpts = "-Djvm";

private static final String tmJvmMem =
"-Xmx251658235 -Xms251658235 -XX:MaxDirectMemorySize=211392922 -XX:MaxMetaspaceSize=100663296";
"-Xmx251658235 -Xms251658235 -XX:MaxDirectMemorySize=211392922 -XX:MaxMetaspaceSize=268435456";

private static final String mainClass = KubernetesTaskExecutorRunner.class.getCanonicalName();
private String mainClassArgs;
Expand Down

0 comments on commit bb8e387

Please sign in to comment.