File tree Expand file tree Collapse file tree 1 file changed +6
-0
lines changed Expand file tree Collapse file tree 1 file changed +6
-0
lines changed Original file line number Diff line number Diff line change @@ -23,6 +23,7 @@ import (
2323 "net"
2424 "net/http"
2525 "os"
26+ "runtime"
2627 "strings"
2728
2829 "sigs.k8s.io/blob-csi-driver/pkg/blob"
@@ -45,10 +46,12 @@ var (
4546 allowEmptyCloudConfig = flag .Bool ("allow-empty-cloud-config" , true , "allow running driver without cloud config" )
4647 kubeAPIQPS = flag .Float64 ("kube-api-qps" , 25.0 , "QPS to use while communicating with the kubernetes apiserver." )
4748 kubeAPIBurst = flag .Int ("kube-api-burst" , 50 , "Burst to use while communicating with the kubernetes apiserver." )
49+ goMaxProcs = flag .Int ("max-procs" , 2 , "maximum number of CPUs that can be executing simultaneously in golang runtime" )
4850)
4951
5052func init () {
5153 klog .InitFlags (nil )
54+ _ = flag .Set ("logtostderr" , "true" )
5255 driverOptions .AddFlags ()
5356}
5457
@@ -69,6 +72,9 @@ func main() {
6972}
7073
7174func handle () {
75+ runtime .GOMAXPROCS (* goMaxProcs )
76+ klog .Infof ("Sys info: NumCPU: %v MAXPROC: %v" , runtime .NumCPU (), runtime .GOMAXPROCS (0 ))
77+
7278 userAgent := blob .GetUserAgent (driverOptions .DriverName , * customUserAgent , * userAgentSuffix )
7379 klog .V (2 ).Infof ("driver userAgent: %s" , userAgent )
7480
You can’t perform that action at this time.
0 commit comments