Dear Flink Community,

I am currently running Apache Flink Stateful Functions (version 3.2.0) on a Kubernetes cluster. I’ve configured the statefun-master and statefun-worker deployments with the following resource limits:

resources:

requests:

memory: "2Gi"

cpu: "1"

limits:

memory: "2Gi"

cpu: "1"

 

However, when I check the Flink UI (see screenshot in attachment), I see that the statefun-worker TaskManager is using 8 CPU cores, despite the fact that I’ve set the CPU requests and limits to 1 core in the Kubernetes deployment. Below are the relevant settings in the flink-conf.yaml file:

    taskmanager.numberOfTaskSlots: 2
    classloader.parent-first-patterns.additional: org.apache.flink.statefun;org.apache.kafka;com.google.protobuf
    state.backend: rocksdb
    state.backend.rocksdb.timer-service.factory: ROCKSDB
    state.backend.incremental: true
    parallelism.default: 1
  
    jobmanager.memory.process.size: 2g
    taskmanager.memory.process.size: 2g

    kubernetes.taskmanager.cpu: 1
    kubernetes.jobmanager.cpu: 1
    taskmanager.cpu.cores: 1

 

I would appreciate any guidance on why Flink might be utilizing more CPU cores than specified and how I can ensure that the TaskManager adheres to the configured resource limits.

Any insights or suggestions would be greatly appreciated.

Best regards,
Oliver

Reply via email to