python3学习手册time() for i in range(32): work_func(i) time1 = time.time() - start_time # 开8个 worker,没有参数时默认是 cpu 的核心数 pool = ProcessPool(processes=32) # 在线程中执行 work_func 并返回执行结果 start_time2 time() for i in range(5): work_func(i) time1 = time.time() - start_time # 开5个 worker,没有参数时默认是 cpu 的核心数 pool = ThreadPool(processes=5) # 在线程中执行 work_func 并返回执行结果 start_time2 time() for i in range(5): work_func(i) time1 = time.time() - start_time # 开5个 worker,没有参数时默认是 cpu 的核心数 pool = ThreadPool(processes=5) # 在线程中执行 work_func 并返回执行结果 start_time20 码力 | 213 页 | 3.53 MB | 1 年前3
k8s操作手册 2.3| grep -i Taints #查看master结 点的污点 # kubectl taint nodes --all node-role.kubernetes.io/control-plane- # kubectl taint nodes --all node-role.kubernetes.io/master- 要用到的镜像: quay.io/�gera/operator:v1 keyrm:NoExecute #先打上污点,驱 逐工作负载pod,等待几分钟,确认目标node结点上没有工作pod运行后,再删 除 master结点上# kubectl delete nodes 结点名 #将目标结点从集群里删除 node结点上# kubeadm reset #node结点上重置kubeadm配置, ★给目标node打标签 # kubectl label nodes node名称 标签名=标签值 # kubectl label nodes k8s-node01 cputype=i7-9700k #给指定的node结点打 标签 # kubectl label nodes --all=true cputype=i7-9700k0 码力 | 126 页 | 4.33 MB | 1 年前3
共 2 条
- 1













