• k8s-merge-robot's avatar
    Merge pull request #29094 from luxas/gomaxproc · 44665313
    k8s-merge-robot authored
    Automatic merge from submit-queue
    
    Remove GOMAXPROCS() calls because they are unnecessary
    
    
    Now we're setting GOMAXPROCS when every binary starts up, but we don't have to do that anymore, since we've upgraded to Go 1.6
    
    Documentation for it:
    
    > func GOMAXPROCS(n int) int
    
    > GOMAXPROCS sets the maximum number of CPUs that can be executing simultaneously and returns the previous setting. If n < 1, it does not change the current setting. The number of logical CPUs on the local machine can be queried with NumCPU. This call will go away when the scheduler improves. 
    
    A simple program to prove it's unnecessary:
    
    ```go
    package main
    import (
        "fmt"
        "runtime"
    )
    func main(){
        numCPUBefore := runtime.GOMAXPROCS(runtime.NumCPU())
        numCPUAfter := runtime.GOMAXPROCS(runtime.NumCPU())
        fmt.Println(numCPUBefore, numCPUAfter)
    }
    ```
    
    Output with Go 1.4.2: `1 4`
    Output with Go 1.6.2: `4 4`
    
    So I think we should remove calls to GOMAXPROCS now, and it should be pretty straightforward
    
    @thockin @wojtek-t @gmarek @lavalamp @vishh 
    44665313
Name
Last commit
Last update
..
k8sm-controller-manager Loading commit data...
k8sm-executor Loading commit data...
k8sm-scheduler Loading commit data...
km Loading commit data...