Apache Flink:每台机器的 TaskManager 数量

问题描述:

每台机器的 CPU 内核数为 4.flink Standalone模式下,如何设置每台机器上TaskManager的数量?

The number of CPU cores per machine is four. In flink standalone mode, how should I set the number of TaskManagers on each machine?

  1. 1 个 TaskManager,每个 TaskManager 有 4 个插槽.
  2. 2 个 TaskManager,每个 TaskManager 有 2 个槽.
  3. 4 个 TaskManager,每个 TaskManager 有 1 个 slot.这个设置就像 apache-storm.

通常每个服务器有一个 TaskManager,并且(根据 bupt_ljy 引用的文档)每个物理 CPU 内核有一个插槽.所以我会选择你的选项 #1.

Normally you'd have one TaskManager per server, and (as per the doc that bupt_ljy referenced) one slot per physical CPU core. So I'd go with your option #1.