Hey team, We have a Flink application with a Kafka...
# troubleshooting
e
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?
s
Without having more details about “the scale-up attempt failed”, this will depend on the required compute for the taskmanagers at start. A task manager will require compute, for example, for Kafka partition consumers + metric generators + etc. and contend with 1 CPU, which could slow down the startup time (resulting in unrecoverable timeouts) or starve important tasks/threads within the task manager(s) (resulting in unsuccessful startup comms with the job manager) tl;dr task manager had more than it could chew
e
Hey @Shawn Gordon thanks for you reply. This matches my understanding, but what we don't really understand is, that the CPU utlization metric is showing a very low CPU usage on the TM even when it was on 1 CPU..
s
I’d guess that maybe the metrics generator on the TM wasn’t able to report the actual usage...? I’m interested in what TM’s pod/node
top
reported at the time