KarmaGYZ commented on a change in pull request #11401: [FLINK-15991][doc][zh] 
Translate memory configuration docs into Chinese.
URL: https://github.com/apache/flink/pull/11401#discussion_r392801162
 
 

 ##########
 File path: docs/ops/memory/mem_tuning.zh.md
 ##########
 @@ -22,66 +22,55 @@ 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.
+本文在的基本的[配置指南](mem_setup.html)的基础上,介绍如何根据具体的使用场景调整 TaskExecutor 
的内存配置,以及在不同使用场景下分别需要重点关注哪些配置参数。
 
 * toc
 {:toc}
 
-## Configure memory for standalone deployment
+## 独立部署模式(Standalone Deployment)下的内存配置
 
-It is recommended to configure [total Flink memory](mem_setup.html#配置总内存)
-([`taskmanager.memory.flink.size`](../config.html#taskmanager-memory-flink-size))
 or its [components](mem_detail.html)
-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).
+[独立部署模式](../deployment/cluster_setup.html),我们通常更关注 Flink 应用本身使用的内存大小。
+建议配置 [Flink 
总内存](mem_setup.html#配置总内存)([`taskmanager.memory.flink.size`](../config.html#taskmanager-memory-flink-size))或者它的[组成部分](mem_detail.html)。
+此外,如果出现 [Metaspace 不足的问题](mem_trouble.html#outofmemoryerror-metaspace),可以调整 
*JVM 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.
+这种情况下通常无需配置*进程总内存*,因为不管是 Flink 还是部署环境都不会对 *JVM 开销* 进行限制,它只与机器的物理资源相关。
 
-## Configure memory for containers
+## 容器(Container)的内存配置
 
-It is recommended to configure [total process memory](mem_setup.html#配置总内存)
-([`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.
+在容器化部署模式(Containerized 
Deployment)下([Kubernetes](../deployment/kubernetes.html)、[Yarn](../deployment/yarn_setup.html)
 或 
[Mesos](../deployment/mesos.html)),建议配置[进程总内存](mem_setup.html#配置总内存)([`taskmanager.memory.process.size`](../config.html#taskmanager-memory-process-size))。
+该配置参数用于指定分配给 Flink *JVM 进程*的总内存,也就是需要申请的容器大小。
 
-<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,
-see also [detailed Memory Model](mem_detail.html).
+<span class="label label-info">提示</span> 如果配置了 *Flink 总内存*,Flink 会自动加上 JVM 
相关的内存部分,根据推算出的*进程总内存*大小申请容器。
+请参考[内存模型详解](mem_detail.html)。
 
 <div class="alert alert-warning">
-  <strong>Warning:</strong> If Flink or user code allocates unmanaged off-heap 
(native) memory beyond the container size
-  the job can fail because the deployment environment can kill the offending 
containers.
+  <strong>注意:</strong> 如果 Flink 
或者用户代码分配超过容器大小的非托管的堆外(本地)内存,部署环境可能会杀掉超用内存的容器,造成作业执行失败。
 </div>
-See also description of [container memory 
exceeded](mem_trouble.html#container-memory-exceeded) failure.
+请参考[容器内存超用](mem_trouble.html#container-memory-exceeded)中的相关描述。
 
-## Configure memory for state backends
+## State Backend 的内存配置
 
-When deploying a Flink streaming application, the type of [state 
backend](../state/state_backends.html) used
-will dictate the optimal memory configurations of your cluster.
+在部署 Flink 流处理应用时,可以根据 [State Backend](../state/state_backends.html) 
的类型对集群的配置进行优化。
 
-### Heap state backend
+### Heap State Backend
 
-When running a stateless job or using a heap state backend 
([MemoryStateBackend](../state/state_backends.html#the-memorystatebackend)
-or [FsStateBackend](../state/state_backends.html#the-fsstatebackend)), set 
[managed memory](mem_setup.html#托管内存) to zero.
-This will ensure that the maximum amount of memory is allocated for user code 
on the JVM.
+执行无状态作业或者使用 Heap State 
Backend([MemoryStateBackend](../state/state_backends.html#the-memorystatebackend)
+或 
[FsStateBackend](../state/state_backends.html#the-fsstatebackend))时,建议将[托管内存](mem_setup.html#托管内存)设置为
 0。
+这样能够最大化分配给 JVM 上用户代码的内存。
 
-### RocksDB state backend
+### RocksDB State Backend
 
-The 
[RocksDBStateBackend](../state/state_backends.html#the-rocksdbstatebackend) 
uses native memory. By default,
-RocksDB is setup to limit native memory allocation to the size of the [managed 
memory](mem_setup.html#托管内存).
-Therefore, it is important to reserve enough *managed memory* for your state 
use case. If you disable the default RocksDB memory control,
-task executors can be killed in containerized deployments if RocksDB allocates 
memory above the limit of the requested container size
-(the [total process memory](mem_setup.html#配置总内存)).
-See also [how to tune RocksDB 
memory](../state/large_state_tuning.html#tuning-rocksdb-memory)
-and 
[state.backend.rocksdb.memory.managed](../config.html#state-backend-rocksdb-memory-managed).
+[RocksDBStateBackend](../state/state_backends.html#the-rocksdbstatebackend) 
使用本地内存。
 
 Review comment:
   Broken link. Should be #rocksdbstatebackend

----------------------------------------------------------------
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

Reply via email to