Skip to content

Commit

Permalink
hack: Try out PGO for kube-apiserver
Browse files Browse the repository at this point in the history
This commit attempts to try out the new profile
guided optimization feature of golang. It includes
a CPU profile of the API Server taken from a scale
run of a 100 node test.

Signed-off-by: Madhav Jivrajani <madhav.jiv@gmail.com>
  • Loading branch information
MadhavJivrajani committed Mar 10, 2023
1 parent 806b215 commit 376b0c1
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions hack/lib/golang.sh
Expand Up @@ -758,6 +758,7 @@ kube::golang::build_binaries_for_platform() {
-asmflags="${goasmflags}"
-ldflags="${goldflags}"
-tags="${gotags:-}"
-pgo=${KUBE_ROOT}/hack/profiles/100-node-cpu-apiserver.pprof
)
CGO_ENABLED=0 kube::golang::build_some_binaries "${statics[@]}"
fi
Expand All @@ -769,6 +770,7 @@ kube::golang::build_binaries_for_platform() {
-asmflags="${goasmflags}"
-ldflags="${goldflags}"
-tags="${gotags:-}"
-pgo=${KUBE_ROOT}/hack/profiles/100-node-cpu-apiserver.pprof
)
kube::golang::build_some_binaries "${nonstatics[@]}"
fi
Expand Down
Binary file added hack/profiles/100-node-cpu-apiserver.pprof
Binary file not shown.

0 comments on commit 376b0c1

Please sign in to comment.