tillrohrmann commented on a change in pull request #10999: [FLINK-15143] Docs for FLIP-49 TM memory model and configuration guide URL: https://github.com/apache/flink/pull/10999#discussion_r376659367
########## File path: docs/ops/memory/mem_tuning.md ########## @@ -0,0 +1,86 @@ +--- +title: "Memory tuning guide" +nav-parent_id: ops_mem +nav-pos: 3 +--- +<!-- +Licensed to the Apache Software Foundation (ASF) under one +or more contributor license agreements. See the NOTICE file +distributed with this work for additional information +regarding copyright ownership. The ASF licenses this file +to you under the Apache License, Version 2.0 (the +"License"); you may not use this file except in compliance +with the License. You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + +Unless required by applicable law or agreed to in writing, +software distributed under the License is distributed on an +"AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY +KIND, either express or implied. See the License for the +specific language governing permissions and limitations +under the License. +--> + +In addition to the [main memory setup guide](mem_setup.html), this section explains how to setup memory of task executors +depending on the use case and which options are important in which case. + +* toc +{:toc} + +## Configure memory for standalone deployment + +It is recommended to configure [total Flink memory](mem_setup.html#configure-total-memory) +([`taskmanager.memory.flink.size`](../config.html#taskmanager-memory-flink-size)) or its [components](mem_setup.html#detailed-memory-model) +for [standalone deployment](../deployment/cluster_setup.html) where you want to declare how much memory is given to Flink itself. +Additionally, you can adjust *JVM metaspace* if it causes [problems](mem_trouble.html#outofmemoryerror-metaspace). + +The *total Process memory* is not relevant because *JVM overhead* is not controlled by Flink or deployment environment, +only physical resources of the executing machine matter in this case. + +## Configure memory for containers + +It is recommended to configure [total process memory](mem_setup.html#configure-total-memory) +([`taskmanager.memory.process.size`](../config.html#taskmanager-memory-process-size)) for the containerized deployments +([Kubernetes](../deployment/kubernetes.html), [Yarn](../deployment/yarn_setup.html) or [Mesos](../deployment/mesos.html)). +It declares how much memory in total should be assigned to the Flink *JVM process* and corresponds to the size of the requested container. + +<span class="label label-info">Note</span> If you configure the *total Flink memory* Flink will implicitly add JVM memory components +to derive the *total process memory* and request a container with the memory of that derived size, Review comment: ```suggestion in order to derive the *total process memory* for the container requests. ``` ---------------------------------------------------------------- This is an automated message from the Apache Git Service. To respond to the message, please log on to GitHub and use the URL above to go to the specific comment. For queries about this service, please contact Infrastructure at: us...@infra.apache.org With regards, Apache Git Services