Hi. I have a request for `flink-kubernetes-operato...
# random
c
Hi. I have a request for
flink-kubernetes-operator
and am not sure where I shall put this request. The request is that
flink-kubernetes-operator
can support to set cpu limit and cpu request of job manager separately. In our Flink app, the cpu usage is pretty low at most of the time. However, when creating checkpoints & savepoints, the flink job manager gets cpu throttled due to heavy loading. If the
flink-kubernetes-operator
can allow us to set cpu limit and request separately, it will be beneficial for saving costs without performance degradation. Any comment is appreciated!
k
I guess, under pod template you can define resource limits and request
y
For native K8s integration(default mode in Flink K8s Operator), you could simply use
kubernetes.jobmanager.cpu.limit-factor
to control the resource limit. The resources limit cpu will be set to
cpu * limit-factor
.
πŸ‘ 2
c
Thank you all for the comments. For simplicity, I set the cpu limit via
kubernetes.jobmanager.cpu.limit-factor
suggested by Yang and it does work. Many thanks!
s
Seems
kubernetes.jobmanager.cpu.limit-factor
was added in flink >= 1.15.X. I am using 1.13.6 currently and tried following options. But din work.
Copy code
taskManager:
    resource:
      memory: "2000m"
      cpu: "1"
    podTemplate:
      apiVersion: v1
      kind: Pod
      metadata:
        name: task-manager-pod-template
      spec:
        containers:
        - name: flink-main-container
          resources:
            requests:
              memory: "2000m"
              cpu: "1"
            limits:
              memory: "3000m"
              cpu: "2"
Section resource overrides the resources section inside containers section. Tried removing resources all together and that was setting CPU requests and limits equal to number of task slots . Its completely ignoring the resources section inside containers section
Copy code
taskManager:
    podTemplate:
      apiVersion: v1
      kind: Pod
      metadata:
        name: task-manager-pod-template
      spec:
        containers:
        - name: flink-main-container
          resources:
            requests:
              memory: "2000m"
              cpu: "1"
            limits:
              memory: "3000m"
              cpu: "2"
Any options in flink 1.13.6 or does flink-kuberentes-operator provide any such options