V2EX = way to explore
V2EX 是一个关于分享和探索的地方
Sign Up Now
For Existing Member  Sign In
lairdnote
V2EX  ›  问与答

golang 微服务 在微服务中还有必要用 runtime.GOMAXPROC 这个吗?

  •  
  •   lairdnote · Jan 7, 2020 · 2627 views
    This topic created in 2302 days ago, the information mentioned may be changed or developed.
    因为都是 docker 在跑了。。这个值的意义大不?
    7 replies    2020-01-07 15:03:39 +08:00
    timonwong
        1
    timonwong  
       Jan 7, 2020   ❤️ 1
    意义大,因为需要适配 cpu quota, 特别在 k8s 中
    https://github.com/uber-go/automaxprocs
    waising
        2
    waising  
       Jan 7, 2020 via iPhone
    新版本不是默认全开启吗?
    zunceng
        3
    zunceng  
       Jan 7, 2020
    @waising 我记得如果不设的话 在编译的那台机器有几核 runtime.GOMAXPROC 就是多少

    automaxprocs 大法好
    lairdnote
        4
    lairdnote  
    OP
       Jan 7, 2020
    感谢
    Hyponet
        5
    Hyponet  
       Jan 7, 2020
    分享之前看到的一篇文章: http://www.dockone.io/article/9387
    lairdnote
        6
    lairdnote  
    OP
       Jan 7, 2020 via iPhone
    @HypoChen 谢谢
    lairdnote
        7
    lairdnote  
    OP
       Jan 7, 2020 via iPhone
    @timonwong 谢谢
    About   ·   Help   ·   Advertise   ·   Blog   ·   API   ·   FAQ   ·   Solana   ·   1137 Online   Highest 6679   ·     Select Language
    创意工作者们的社区
    World is powered by solitude
    VERSION: 3.9.8.5 · 42ms · UTC 23:07 · PVG 07:07 · LAX 16:07 · JFK 19:07
    ♥ Do have faith in what you're doing.