Skip to content

Commit

Permalink
chore: set GoMaxProcs as 2
Browse files Browse the repository at this point in the history
  • Loading branch information
andyzhangx committed Jan 3, 2025
1 parent a91bcc1 commit 7123c91
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions pkg/blobplugin/main.go
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,7 @@ import (
"net"
"net/http"
"os"
"runtime"
"strings"

"sigs.k8s.io/blob-csi-driver/pkg/blob"
Expand All @@ -45,6 +46,7 @@ var (
allowEmptyCloudConfig = flag.Bool("allow-empty-cloud-config", true, "allow running driver without cloud config")
kubeAPIQPS = flag.Float64("kube-api-qps", 25.0, "QPS to use while communicating with the kubernetes apiserver.")
kubeAPIBurst = flag.Int("kube-api-burst", 50, "Burst to use while communicating with the kubernetes apiserver.")
goMaxProcs = flag.Int("max-procs", 2, "maximum number of CPUs that can be executing simultaneously in golang runtime")
)

func init() {
Expand Down Expand Up @@ -73,6 +75,9 @@ func main() {
}

func handle() {
runtime.GOMAXPROCS(*goMaxProcs)
klog.Infof("Sys info: NumCPU: %v MAXPROC: %v", runtime.NumCPU(), runtime.GOMAXPROCS(0))

userAgent := blob.GetUserAgent(driverOptions.DriverName, *customUserAgent, *userAgentSuffix)
klog.V(2).Infof("driver userAgent: %s", userAgent)

Expand Down

0 comments on commit 7123c91

Please sign in to comment.