Search code examples
apache-flink

Can I run multiple taskManager in one single pc?


flink version: 1.10
os: centos 7
detail: I've started a standlone flink cluster in my server.Then I can see one taskManager in flink web-ui. taskManager
Question: Is it reasonable to run another taskManger on this server?
Here's my step(For now, flink cluster has been started):
1. Im my server, go to flink's root directory.Then start another taskManger:

cd bin
./taskManager.sh start
  1. For a while, There are two taskManager appear in my flink web-ui.

And if run multiple taskManager in one single server is accetpable. What should I take a notice when I'm doing this.


Solution

  • The existing task manager (TM) has 4 slots and has 4 CPU cores available to it. Whether it's reasonable to run another TM depends on what resources the server has, and how resource intensive your workload is. If your server still has free cores and isn't busy doing other things besides running Flink, then sure, run another TM -- or make this one bigger.

    What matters most is how many total task slots are being provided by the server. As a starting point, you might think in terms of one slot per CPU core. Whether those slots are all in on TM, or each in their own TM, or somewhere in between, is a secondary concern. (See Is one TaskManager with three slots the same as three TaskManagers with one slot in Apache Flink for discussion of that point.)