liuzhuo created FLINK-28124: ------------------------------- Summary: Flink on K8S in hosetNetwork mode, the CPU usage will spike Key: FLINK-28124 URL: https://issues.apache.org/jira/browse/FLINK-28124 Project: Flink Issue Type: Bug Components: Deployment / Kubernetes, Runtime / Metrics Reporter: liuzhuo
When using the flink on k8s, in the configuration 'kubernetes. Hostnetwork. Enabled = true' parameters, If a node is running too many pods , there will be a node CPU surge problem, The metric module collected the indicator information of the network card {code:java} Class :SystemResourcesCounter Line 109 :calculateNetworkUsage(hardwareAbstractionLayer.getNetworkIFs());{code} The problem is with this method {code:java} hardwareAbstractionLayer.getNetworkIFs(){code} this method returns the current all the network card on the machine, each pod will create a virtual network card (ifr_name = "kube - ipvs0"), In hostNetwork mode, the network card is visible to the public, resulting in too much network card information returned by the interface For example, if a node runs 200 pods, then the method calling this interface in each POD will return at least 200 nic information. With the default execution once every 5 seconds, this machine needs to return 200*200=40000 network card information every 5 seconds, this results in a significant CPU consumption -- This message was sent by Atlassian Jira (v8.20.7#820007)