Hey team,
We have a Flink application with a Kafka source and Kafka sink. Recently, we attempted to scale up the application by adjusting the parallelism, task manager count, and task slots per task manager. Here are the details:
Before scaling up:
• Parallelism: 4
• Task manager count: 2
• Task slots per task manager: 2
• Each task manager: 1 CPU, 8 GB memory
After scaling up:
• Parallelism: 16
• Task manager count: 4
• Task slots per task manager: 4
• Each task manager: 1 CPU, 8 GB memory
Initially, the scale-up attempt failed. However, we noticed that increasing the CPU allocation per task manager from 1 CPU to 4 CPUs resolved the issue. What’s puzzling is that the CPU utilization metrics consistently showed very low CPU usage, even when the issue occurred.
We’re trying to understand the following:
1. If insufficient CPU was the cause of the problem, why did the metrics indicate low CPU usage?
2. What is the relationship between parallelism and CPU? Are there any guidelines or best practices for managing application scaling in Flink?