Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[FLINK-16746] Deprecate legacy heap memory option for JM and expose the new ones in docs #11787

Closed
wants to merge 14 commits into from
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
14 commits
Select commit Hold shift + click to select a range
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 0 additions & 6 deletions docs/_includes/generated/all_jobmanager_section.html
Original file line number Diff line number Diff line change
Expand Up @@ -26,12 +26,6 @@
<td>String</td>
<td>This option specifies how the job computation recovers from task failures. Accepted values are:<ul><li>'full': Restarts all tasks to recover the job.</li><li>'region': Restarts all tasks that could be affected by the task failure. More details can be found <a href="../dev/task_failure_recovery.html#restart-pipelined-region-failover-strategy">here</a>.</li></ul></td>
</tr>
<tr>
<td><h5>jobmanager.heap.size</h5></td>
<td style="word-wrap: break-word;">1 gb</td>
<td>MemorySize</td>
<td>JVM heap size for the JobManager.</td>
</tr>
<tr>
<td><h5>jobmanager.rpc.address</h5></td>
<td style="word-wrap: break-word;">(none)</td>
Expand Down
48 changes: 48 additions & 0 deletions docs/_includes/generated/common_memory_section.html
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,54 @@
</tr>
</thead>
<tbody>
<tr>
<td><h5>jobmanager.memory.flink.size</h5></td>
<td style="word-wrap: break-word;">(none)</td>
<td>MemorySize</td>
<td>Total Flink Memory size for the JobManager. This includes all the memory that a JobManager consumes, except for JVM Metaspace and JVM Overhead. It consists of JVM Heap Memory and Off-heap Memory. See also 'jobmanager.memory.process.size' for total process memory size configuration.</td>
</tr>
<tr>
<td><h5>jobmanager.memory.heap.size</h5></td>
<td style="word-wrap: break-word;">(none)</td>
<td>MemorySize</td>
<td>JVM Heap Memory size for JobManager. The minimum recommended JVM Heap size is 128.000mb (134217728 bytes).</td>
</tr>
<tr>
<td><h5>jobmanager.memory.jvm-metaspace.size</h5></td>
<td style="word-wrap: break-word;">256 mb</td>
<td>MemorySize</td>
<td>JVM Metaspace Size for the JobManager.</td>
</tr>
<tr>
<td><h5>jobmanager.memory.jvm-overhead.fraction</h5></td>
<td style="word-wrap: break-word;">0.1</td>
<td>Float</td>
<td>Fraction of Total Process Memory to be reserved for JVM Overhead. This is off-heap memory reserved for JVM overhead, such as thread stack space, compile cache, etc. This includes native memory but not direct memory, and will not be counted when Flink calculates JVM max direct memory size parameter. The size of JVM Overhead is derived to make up the configured fraction of the Total Process Memory. If the derived size is less or greater than the configured min or max size, the min or max size will be used. The exact size of JVM Overhead can be explicitly specified by setting the min and max size to the same value.</td>
</tr>
<tr>
<td><h5>jobmanager.memory.jvm-overhead.max</h5></td>
<td style="word-wrap: break-word;">1 gb</td>
<td>MemorySize</td>
<td>Max JVM Overhead size for the JobManager. This is off-heap memory reserved for JVM overhead, such as thread stack space, compile cache, etc. This includes native memory but not direct memory, and will not be counted when Flink calculates JVM max direct memory size parameter. The size of JVM Overhead is derived to make up the configured fraction of the Total Process Memory. If the derived size is less or greater than the configured min or max size, the min or max size will be used. The exact size of JVM Overhead can be explicitly specified by setting the min and max size to the same value.</td>
</tr>
<tr>
<td><h5>jobmanager.memory.jvm-overhead.min</h5></td>
<td style="word-wrap: break-word;">192 mb</td>
<td>MemorySize</td>
<td>Min JVM Overhead size for the JobManager. This is off-heap memory reserved for JVM overhead, such as thread stack space, compile cache, etc. This includes native memory but not direct memory, and will not be counted when Flink calculates JVM max direct memory size parameter. The size of JVM Overhead is derived to make up the configured fraction of the Total Process Memory. If the derived size is less or greater than the configured min or max size, the min or max size will be used. The exact size of JVM Overhead can be explicitly specified by setting the min and max size to the same value.</td>
</tr>
<tr>
<td><h5>jobmanager.memory.off-heap.size</h5></td>
<td style="word-wrap: break-word;">128 mb</td>
<td>MemorySize</td>
<td>Off-heap Memory size for JobManager. The JVM direct memory limit of the Job Manager process (-XX:MaxDirectMemorySize) will be set to this value. This option covers all off-heap memory usage including direct and native memory allocation.</td>
</tr>
<tr>
<td><h5>jobmanager.memory.process.size</h5></td>
<td style="word-wrap: break-word;">(none)</td>
<td>MemorySize</td>
<td>Total Process Memory size for the JobManager. This includes all the memory that a JobManager JVM process consumes, consisting of Total Flink Memory, JVM Metaspace, and JVM Overhead. In containerized setups, this should be set to the container memory. See also 'jobmanager.memory.flink.size' for Total Flink Memory size configuration.</td>
</tr>
<tr>
<td><h5>taskmanager.memory.flink.size</h5></td>
<td style="word-wrap: break-word;">(none)</td>
Expand Down
46 changes: 44 additions & 2 deletions docs/_includes/generated/job_manager_configuration.html
Original file line number Diff line number Diff line change
Expand Up @@ -33,10 +33,52 @@
<td>This option specifies how the job computation recovers from task failures. Accepted values are:<ul><li>'full': Restarts all tasks to recover the job.</li><li>'region': Restarts all tasks that could be affected by the task failure. More details can be found <a href="../dev/task_failure_recovery.html#restart-pipelined-region-failover-strategy">here</a>.</li></ul></td>
</tr>
<tr>
<td><h5>jobmanager.heap.size</h5></td>
<td><h5>jobmanager.memory.flink.size</h5></td>
<td style="word-wrap: break-word;">(none)</td>
<td>MemorySize</td>
<td>Total Flink Memory size for the JobManager. This includes all the memory that a JobManager consumes, except for JVM Metaspace and JVM Overhead. It consists of JVM Heap Memory and Off-heap Memory. See also 'jobmanager.memory.process.size' for total process memory size configuration.</td>
</tr>
<tr>
<td><h5>jobmanager.memory.heap.size</h5></td>
<td style="word-wrap: break-word;">(none)</td>
<td>MemorySize</td>
<td>JVM Heap Memory size for JobManager. The minimum recommended JVM Heap size is 128.000mb (134217728 bytes).</td>
</tr>
<tr>
<td><h5>jobmanager.memory.jvm-metaspace.size</h5></td>
<td style="word-wrap: break-word;">256 mb</td>
<td>MemorySize</td>
<td>JVM Metaspace Size for the JobManager.</td>
</tr>
<tr>
<td><h5>jobmanager.memory.jvm-overhead.fraction</h5></td>
<td style="word-wrap: break-word;">0.1</td>
<td>Float</td>
<td>Fraction of Total Process Memory to be reserved for JVM Overhead. This is off-heap memory reserved for JVM overhead, such as thread stack space, compile cache, etc. This includes native memory but not direct memory, and will not be counted when Flink calculates JVM max direct memory size parameter. The size of JVM Overhead is derived to make up the configured fraction of the Total Process Memory. If the derived size is less or greater than the configured min or max size, the min or max size will be used. The exact size of JVM Overhead can be explicitly specified by setting the min and max size to the same value.</td>
</tr>
<tr>
<td><h5>jobmanager.memory.jvm-overhead.max</h5></td>
<td style="word-wrap: break-word;">1 gb</td>
<td>MemorySize</td>
<td>JVM heap size for the JobManager.</td>
<td>Max JVM Overhead size for the JobManager. This is off-heap memory reserved for JVM overhead, such as thread stack space, compile cache, etc. This includes native memory but not direct memory, and will not be counted when Flink calculates JVM max direct memory size parameter. The size of JVM Overhead is derived to make up the configured fraction of the Total Process Memory. If the derived size is less or greater than the configured min or max size, the min or max size will be used. The exact size of JVM Overhead can be explicitly specified by setting the min and max size to the same value.</td>
</tr>
<tr>
<td><h5>jobmanager.memory.jvm-overhead.min</h5></td>
<td style="word-wrap: break-word;">192 mb</td>
<td>MemorySize</td>
<td>Min JVM Overhead size for the JobManager. This is off-heap memory reserved for JVM overhead, such as thread stack space, compile cache, etc. This includes native memory but not direct memory, and will not be counted when Flink calculates JVM max direct memory size parameter. The size of JVM Overhead is derived to make up the configured fraction of the Total Process Memory. If the derived size is less or greater than the configured min or max size, the min or max size will be used. The exact size of JVM Overhead can be explicitly specified by setting the min and max size to the same value.</td>
</tr>
<tr>
<td><h5>jobmanager.memory.off-heap.size</h5></td>
<td style="word-wrap: break-word;">128 mb</td>
<td>MemorySize</td>
<td>Off-heap Memory size for JobManager. The JVM direct memory limit of the Job Manager process (-XX:MaxDirectMemorySize) will be set to this value. This option covers all off-heap memory usage including direct and native memory allocation.</td>
</tr>
<tr>
<td><h5>jobmanager.memory.process.size</h5></td>
<td style="word-wrap: break-word;">(none)</td>
<td>MemorySize</td>
<td>Total Process Memory size for the JobManager. This includes all the memory that a JobManager JVM process consumes, consisting of Total Flink Memory, JVM Metaspace, and JVM Overhead. In containerized setups, this should be set to the container memory. See also 'jobmanager.memory.flink.size' for Total Flink Memory size configuration.</td>
</tr>
<tr>
<td><h5>jobmanager.rpc.address</h5></td>
Expand Down
12 changes: 0 additions & 12 deletions docs/_includes/generated/resource_manager_configuration.html
Original file line number Diff line number Diff line change
Expand Up @@ -8,18 +8,6 @@
</tr>
</thead>
<tbody>
<tr>
<td><h5>containerized.heap-cutoff-min</h5></td>
<td style="word-wrap: break-word;">600</td>
<td>Integer</td>
<td>Minimum amount of heap memory to remove in Job Master containers, as a safety margin.</td>
</tr>
<tr>
<td><h5>containerized.heap-cutoff-ratio</h5></td>
<td style="word-wrap: break-word;">0.25</td>
<td>Float</td>
<td>Percentage of heap space to remove from Job Master containers (YARN / Mesos / Kubernetes), to compensate for other JVM memory usage.</td>
</tr>
<tr>
<td><h5>resourcemanager.job.timeout</h5></td>
<td style="word-wrap: break-word;">"5 minutes"</td>
Expand Down
6 changes: 4 additions & 2 deletions docs/ops/config.md
Original file line number Diff line number Diff line change
Expand Up @@ -51,8 +51,10 @@ If you use Flink with [Yarn]({{site.baseurl}}/ops/deployment/yarn_setup.html), [

The default memory sizes support simple streaming/batch applications, but are too low to yield good performance for more complex applications.

- `jobmanager.heap.size`: Sets the size of the *Flink Master* (JobManager / ResourceManager / Dispatcher) JVM heap.
- `taskmanager.memory.process.size`: Total size of the TaskManager process, including everything. Flink will subtract some memory for the JVM's own memory requirements (metaspace and others), and divide and configure the rest automatically between its components (network, managed memory, JVM Heap, etc.).
- `jobmanager.memory.process.size`: Total size of the *Flink Master* (JobManager / ResourceManager / Dispatcher) process.
- `taskmanager.memory.process.size`: Total size of the TaskManager process.

The total sizes include everything. Flink will subtract some memory for the JVM's own memory requirements (metaspace and others), and divide and configure the rest automatically between its components (JVM Heap, Off-Heap, for Task Managers also network, managed memory etc.).

These value are configured as memory sizes, for example *1536m* or *2g*.

Expand Down
6 changes: 4 additions & 2 deletions docs/ops/config.zh.md
Original file line number Diff line number Diff line change
Expand Up @@ -51,8 +51,10 @@ If you use Flink with [Yarn]({{site.baseurl}}/ops/deployment/yarn_setup.html), [

The default memory sizes support simple streaming/batch applications, but are too low to yield good performance for more complex applications.

- `jobmanager.heap.size`: Sets the size of the *Flink Master* (JobManager / ResourceManager / Dispatcher) JVM heap.
- `taskmanager.memory.process.size`: Total size of the TaskManager process, including everything. Flink will subtract some memory for the JVM's own memory requirements (metaspace and others), and divide and configure the rest automatically between its components (network, managed memory, JVM Heap, etc.).
- `jobmanager.memory.process.size`: Total size of the *Flink Master* (JobManager / ResourceManager / Dispatcher) process.
- `taskmanager.memory.process.size`: Total size of the TaskManager process.

The total sizes include everything. Flink will subtract some memory for the JVM's own memory requirements (metaspace and others), and divide and configure the rest automatically between its components (JVM Heap, Off-Heap, for Task Managers also network, managed memory etc.).

These value are configured as memory sizes, for example *1536m* or *2g*.

Expand Down
4 changes: 2 additions & 2 deletions docs/ops/deployment/cluster_setup.md
Original file line number Diff line number Diff line change
Expand Up @@ -68,7 +68,7 @@ cd flink-*

After having extracted the system files, you need to configure Flink for the cluster by editing *conf/flink-conf.yaml*.

Set the `jobmanager.rpc.address` key to point to your master node. You should also define the maximum amount of main memory Flink is allowed to allocate on each node by setting the `jobmanager.heap.size` and `taskmanager.memory.process.size` keys.
Set the `jobmanager.rpc.address` key to point to your master node. You should also define the maximum amount of main memory Flink is allowed to allocate on each node by setting the `jobmanager.memory.process.size` and `taskmanager.memory.process.size` keys.

These values are given in MB. If some worker nodes have more main memory which you want to allocate to the Flink system you can overwrite the default value by setting `taskmanager.memory.process.size` or `taskmanager.memory.flink.size` in *conf/flink-conf.yaml* on those specific nodes.

Expand Down Expand Up @@ -106,7 +106,7 @@ Please see the [configuration page](../config.html) for details and additional c

In particular,

* the amount of available memory per JobManager (`jobmanager.heap.size`),
* the amount of available memory per JobManager (`jobmanager.memory.process.size`),
* the amount of available memory per TaskManager (`taskmanager.memory.process.size` and check [memory setup guide](../memory/mem_tuning.html#configure-memory-for-standalone-deployment)),
* the number of available CPUs per machine (`taskmanager.numberOfTaskSlots`),
* the total number of CPUs in the cluster (`parallelism.default`) and
Expand Down
4 changes: 2 additions & 2 deletions docs/ops/deployment/cluster_setup.zh.md
Original file line number Diff line number Diff line change
Expand Up @@ -68,7 +68,7 @@ cd flink-*

After having extracted the system files, you need to configure Flink for the cluster by editing *conf/flink-conf.yaml*.

Set the `jobmanager.rpc.address` key to point to your master node. You should also define the maximum amount of main memory Flink is allowed to allocate on each node by setting the `jobmanager.heap.size` and `taskmanager.memory.process.size` keys.
Set the `jobmanager.rpc.address` key to point to your master node. You should also define the maximum amount of main memory Flink is allowed to allocate on each node by setting the `jobmanager.memory.process.size` and `taskmanager.memory.process.size` keys.

These values are given in MB. If some worker nodes have more main memory which you want to allocate to the Flink system you can overwrite the default value by setting setting `taskmanager.memory.process.size` or `taskmanager.memory.flink.size` in *conf/flink-conf.yaml* on those specific nodes.

Expand Down Expand Up @@ -106,7 +106,7 @@ Please see the [configuration page](../config.html) for details and additional c

In particular,

* the amount of available memory per JobManager (`jobmanager.heap.size`),
* the amount of available memory per JobManager (`jobmanager.memory.process.size`),
* the amount of available memory per TaskManager (`taskmanager.memory.process.size` and check [memory setup guide](../memory/mem_tuning.html#configure-memory-for-standalone-deployment)),
* the number of available CPUs per machine (`taskmanager.numberOfTaskSlots`),
* the total number of CPUs in the cluster (`parallelism.default`) and
Expand Down
2 changes: 1 addition & 1 deletion docs/ops/deployment/kubernetes.md
Original file line number Diff line number Diff line change
Expand Up @@ -143,7 +143,7 @@ data:
blob.server.port: 6124
jobmanager.rpc.port: 6123
taskmanager.rpc.port: 6122
jobmanager.heap.size: 1024m
jobmanager.memory.process.size: 1472m
taskmanager.memory.process.size: 1024m
log4j.properties: |+
rootLogger.level = INFO
Expand Down
2 changes: 1 addition & 1 deletion docs/ops/deployment/kubernetes.zh.md
Original file line number Diff line number Diff line change
Expand Up @@ -143,7 +143,7 @@ data:
blob.server.port: 6124
jobmanager.rpc.port: 6123
taskmanager.rpc.port: 6122
jobmanager.heap.size: 1024m
jobmanager.memory.process.size: 1472m
taskmanager.memory.process.size: 1024m
log4j.properties: |+
rootLogger.level = INFO
Expand Down
4 changes: 2 additions & 2 deletions docs/ops/deployment/mesos.md
Original file line number Diff line number Diff line change
Expand Up @@ -215,7 +215,7 @@ For example:

bin/mesos-appmaster.sh \
-Dmesos.master=master.foobar.org:5050 \
-Djobmanager.heap.size=1024m \
-Djobmanager.memory.process.size=1472m \
-Djobmanager.rpc.port=6123 \
-Drest.port=8081 \
-Dtaskmanager.memory.process.size=3500m \
Expand All @@ -236,7 +236,7 @@ Here is an example configuration for Marathon:

{
"id": "flink",
"cmd": "$FLINK_HOME/bin/mesos-appmaster.sh -Djobmanager.heap.size=1024m -Djobmanager.rpc.port=6123 -Drest.port=8081 -Dtaskmanager.memory.process.size=1024m -Dtaskmanager.numberOfTaskSlots=2 -Dparallelism.default=2 -Dmesos.resourcemanager.tasks.cpus=1",
"cmd": "$FLINK_HOME/bin/mesos-appmaster.sh -Djobmanager.memory.process.size=1472m -Djobmanager.rpc.port=6123 -Drest.port=8081 -Dtaskmanager.memory.process.size=1024m -Dtaskmanager.numberOfTaskSlots=2 -Dparallelism.default=2 -Dmesos.resourcemanager.tasks.cpus=1",
"cpus": 1.0,
"mem": 1024
}
Expand Down
4 changes: 2 additions & 2 deletions docs/ops/deployment/mesos.zh.md
Original file line number Diff line number Diff line change
Expand Up @@ -215,7 +215,7 @@ For example:

bin/mesos-appmaster.sh \
-Dmesos.master=master.foobar.org:5050 \
-Djobmanager.heap.size=1024m \
-Djobmanager.memory.process.size=1472m \
-Djobmanager.rpc.port=6123 \
-Drest.port=8081 \
-Dtaskmanager.memory.process.size=3500m \
Expand All @@ -236,7 +236,7 @@ Here is an example configuration for Marathon:

{
"id": "flink",
"cmd": "$FLINK_HOME/bin/mesos-appmaster.sh -Djobmanager.heap.size=1024m -Djobmanager.rpc.port=6123 -Drest.port=8081 -Dtaskmanager.memory.process.size=1024m -Dtaskmanager.numberOfTaskSlots=2 -Dparallelism.default=2 -Dmesos.resourcemanager.tasks.cpus=1",
"cmd": "$FLINK_HOME/bin/mesos-appmaster.sh -Djobmanager.memory.process.size=1472m -Djobmanager.rpc.port=6123 -Drest.port=8081 -Dtaskmanager.memory.process.size=1024m -Dtaskmanager.numberOfTaskSlots=2 -Dparallelism.default=2 -Dmesos.resourcemanager.tasks.cpus=1",
"cpus": 1.0,
"mem": 1024
}
Expand Down
Loading