golang:1.25로 다시 빌드했으니 런타임이 CPU limit 2를 인식할 거라고 기대했어요. 그런데 파드에서는 여전히 gomaxprocs=32 numcpu=32가 찍히고, nr_throttled도 실행할 때마다 몇천씩 올라가요. 워커를 16에서 4로 줄였더니 9분에서 7분으로만 줄었어요. 제가 뭘 놓치고 있는 걸까요? 감사합니다.
FROM golang:1.25 AS build
...
RUN CGO_ENABLED=0 go build -o /manifestd .
module github.com/maxlab/manifestd
go 1.23.0
resources:
requests:
cpu: "1"
limits:
cpu: "2"
파드 env에 GOMAXPROCS는 없고, 코드에서 runtime.GOMAXPROCS를 값과 함께 호출하는 곳도 없어요. 같은 바이너리가 제 MacBook에서는 2.5분 정도 걸려요.
영어에서 번역·원문 보기Rebuilt on golang:1.25 expecting the runtime to see the 2 CPU limit. The pod still logs gomaxprocs=32 numcpu=32 and nr_throttled climbs a few thousand per run. Workers 16 to 4 only took 9 min to 7. What am I missing? Thanks.
FROM golang:1.25 AS build
...
RUN CGO_ENABLED=0 go build -o /manifestd .
module github.com/maxlab/manifestd
go 1.23.0
resources:
requests:
cpu: "1"
limits:
cpu: "2"
No GOMAXPROCS in the pod env, and nothing in the code calls runtime.GOMAXPROCS with a value. The same binary takes about 2.5 min on my MacBook.