automaxprocs icon indicating copy to clipboard operation
automaxprocs copied to clipboard

Runtime will (soon) set GOMAXPROCS automatically (Go 1.25)

Open denysvitali opened this issue 9 months ago • 4 comments

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

denysvitali avatar May 12 '25 15:05 denysvitali

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.

prattmic avatar May 12 '25 16:05 prattmic

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: @.***>

rabbbit avatar May 12 '25 17:05 rabbbit

how will it handle CPU fractions? We (unfortunately) cap some of our golang apps to 0.5 CPU.

jflambert avatar May 30 '25 02:05 jflambert

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.

rabbbit avatar Nov 02 '25 04:11 rabbbit