In addition to Weibo, there is also WeChat
Please pay attention
WeChat public account
Shulou
2025-03-26 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Servers >
Share
Shulou(Shulou.com)06/03 Report--
Note: K8S version 1.10
During the use of K8S, it is found that the java program starts very slowly, which is mainly due to the low CPU utilization caused by the frequent switching of K8S CPU context. This problem can be solved through the cpu-manager-policy of K8S, configured as follows.
Add the following parameters to the startup parameters of kubelet:
-feature-gates=CPUManager=true-cpu-manager-policy=static-kube-reserved=cpu=1,memory=0
Restart kubelet
Systemctl restart kubelet
Find an error report
Jan 23 10:49:30 sh-saas-k8s1-node-dev-02 systemd: Starting Kubernetes systemd probe.
Jan 23 10:49:30 sh-saas-k8s1-node-dev-02 kubelet: panic: [cpumanager] state file: unable to restore state from disk (policy configured "static"! = policy from state file "none")
Jan 23 10:49:30 sh-saas-k8s1-node-dev-02 kubelet: Panicking because we cannot guarantee sane CPU affinity for existing containers.
Jan 23 10:49:30 sh-saas-k8s1-node-dev-02 kubelet: Please drain this node and delete the CPU manager state file "/ data/kubernetes/kubelet/cpu_manager_state" before restarting Kubelet.
Jan 23 10:49:30 sh-saas-k8s1-node-dev-02 kubelet: goroutine 1 [running]:
This is because kubelet has a state file, follow the above to find that file, and manually change the status to static.
Restart kubelet to set the limit and request for high-performance applications to the same, and the number of cpu must be an integer, so that K8S will automatically bind the application to cpu, resulting in a great improvement in performance.
Welcome to subscribe "Shulou Technology Information " to get latest news, interesting things and hot topics in the IT industry, and controls the hottest and latest Internet news, technology news and IT industry trends.
Views: 0
*The comments in the above article only represent the author's personal views and do not represent the views and positions of this website. If you have more insights, please feel free to contribute and share.
Continue with the installation of the previous hadoop.First, install zookooper1. Decompress zookoope
"Every 5-10 years, there's a rare product, a really special, very unusual product that's the most un
© 2024 shulou.com SLNews company. All rights reserved.