2021年9月7日

centos6 yum 源失效 404,终于解决了

摘要: YumRepo Error: All mirror URLs are not using ftp, http[s] or file.Eg. Invalid release/repo/arch combination/removing mirrorlist with no valid mirrors: 阅读全文

posted @ 2021-09-07 22:26 ExplorerMan 阅读(393) 评论(0) 推荐(0) 编辑

GOMAXPROCS你设置对了吗?

摘要: 1. 前言 有圈子的朋友介绍 uber-go/automaxprocs, 我才发现之前在docker中, Golang程序设置的GOMAXPROCS不正确,有必要在重新回顾一下了。 2. Go 调度器: M, P 和 G 我们知道在Go scheduler中,G代表goroutine, P代表Log 阅读全文

posted @ 2021-09-07 21:15 ExplorerMan 阅读(2055) 评论(0) 推荐(0) 编辑

容器资源可见性问题与 GOMAXPROCS 配置

摘要: Go 程序启动时候会根据 CPU 数量设置 GOMAXPROCS,比如下面的程序中在 8 核处理下输出为 8。 package main import ( "runtime" ) func main() { println(runtime.NumCPU()) } 当我们使用 Docker 的时候也是 阅读全文

posted @ 2021-09-07 21:14 ExplorerMan 阅读(654) 评论(0) 推荐(0) 编辑

导航