Runtime will (soon) set GOMAXPROCS automatically (Go 1.25)
As per title, it looks like runtime will soon be cgroup CPU limit aware - thus making this repository redundant.
Is there any plan to make sure automaxprocs doesn't break if the runtime implementation changes?
Should we somehow coordinate with the Go team a way to check whether the new behavior was set?
See also https://github.com/golang/go/issues/73193
I commented on golang/go#73193 about feature detection, but one more comment about breakage.
Is there any plan to make sure automaxprocs doesn't break if the runtime implementation changes?
What do you mean by breakage? If nothing changes in this module, then it will continue to set GOMAXPROCS even after the runtime gains support. That shouldn't break anything. This module setting GOMAXPROCS will simply disable the runtime's automatic setting in favor of automaxprocs's.
I suspect the module will stay as is, at least for the foreseeable future, to preserve the rounding down behavior.
On Mon, May 12, 2025, 18:45 Michael Pratt @.***> wrote:
prattmic left a comment (uber-go/automaxprocs#96) https://github.com/uber-go/automaxprocs/issues/96#issuecomment-2873271454
I commented on golang/go#73193 https://github.com/golang/go/issues/73193 about feature detection, but one more comment about breakage.
Is there any plan to make sure automaxprocs doesn't break if the runtime implementation changes?
What do you mean by breakage? If nothing changes in this module, then it will continue to set GOMAXPROCS even after the runtime gains support. That shouldn't break anything. This module setting GOMAXPROCS will simply disable the runtime's automatic setting in favor of automaxprocs's.
— Reply to this email directly, view it on GitHub https://github.com/uber-go/automaxprocs/issues/96#issuecomment-2873271454, or unsubscribe https://github.com/notifications/unsubscribe-auth/AACG3UTDO5MO7H3JVFEUPVL26DF3VAVCNFSM6AAAAAB46HAT46VHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMZDQNZTGI3TCNBVGQ . You are receiving this because you are subscribed to this thread.Message ID: @.***>
how will it handle CPU fractions? We (unfortunately) cap some of our golang apps to 0.5 CPU.
how will it handle CPU fractions? We (unfortunately) cap some of our golang apps to 0.5 CPU.
We are not planning on changing any of the existing behavior.