Search Options

Results per page
Sort
Preferred Languages
Advance

Results 1 - 10 of 19 for numCPU (0.12 sec)

  1. src/runtime/debug.go

    	newprocs = int32(n)
    
    	startTheWorldGC(stw)
    	return ret
    }
    
    // NumCPU returns the number of logical CPUs usable by the current process.
    //
    // The set of available CPUs is checked by querying the operating system
    // at process startup. Changes to operating system CPU allocation after
    // process startup are not reflected.
    func NumCPU() int {
    	return int(ncpu)
    }
    
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Sat May 11 20:38:24 UTC 2024
    - 4.2K bytes
    - Viewed (0)
  2. cmd/admin-server-info.go

    			TotalAlloc: memstats.TotalAlloc,
    			Mallocs:    memstats.Mallocs,
    			Frees:      memstats.Frees,
    			HeapAlloc:  memstats.HeapAlloc,
    		},
    		GoMaxProcs:     runtime.GOMAXPROCS(0),
    		NumCPU:         runtime.NumCPU(),
    		RuntimeVersion: runtime.Version(),
    		GCStats: &madmin.GCStats{
    			LastGC:     gcStats.LastGC,
    			NumGC:      gcStats.NumGC,
    			PauseTotal: gcStats.PauseTotal,
    			Pause:      gcStats.Pause,
    Registered: Sun Jun 16 00:44:34 UTC 2024
    - Last Modified: Fri May 24 23:05:23 UTC 2024
    - 4.9K bytes
    - Viewed (0)
  3. cmd/kube-proxy/app/server_linux.go

    	return nil, fmt.Errorf("event object not of type node")
    }
    
    func detectNumCPU() int {
    	// try get numCPU from /sys firstly due to a known issue (https://github.com/kubernetes/kubernetes/issues/99225)
    	_, numCPU, err := machine.GetTopology(sysfs.NewRealSysFs())
    	if err != nil || numCPU < 1 {
    		return goruntime.NumCPU()
    	}
    	return numCPU
    }
    
    Registered: Sat Jun 15 01:39:40 UTC 2024
    - Last Modified: Sat Jun 08 13:48:54 UTC 2024
    - 18.1K bytes
    - Viewed (0)
  4. cmd/kubeadm/app/preflight/checks.go

    type NumCPUCheck struct {
    	NumCPU int
    }
    
    // Name returns the label for NumCPUCheck
    func (NumCPUCheck) Name() string {
    	return "NumCPU"
    }
    
    // Check number of CPUs required by kubeadm
    func (ncc NumCPUCheck) Check() (warnings, errorList []error) {
    	numCPU := runtime.NumCPU()
    	if numCPU < ncc.NumCPU {
    Registered: Sat Jun 15 01:39:40 UTC 2024
    - Last Modified: Mon Jun 03 11:20:55 UTC 2024
    - 39.5K bytes
    - Viewed (0)
  5. pilot/cmd/pilot-agent/config/config.go

    	}
    
    	if proxyConfig.Concurrency.GetValue() == 0 {
    		if CPULimit < runtime.NumCPU() {
    			log.Warnf("concurrency is set to 0, which will use a thread per CPU on the host. However, CPU limit is set lower. "+
    				"This is not recommended and may lead to performance issues. "+
    				"CPU count: %d, CPU Limit: %d.", runtime.NumCPU(), CPULimit)
    		}
    	}
    
    Registered: Fri Jun 14 15:00:06 UTC 2024
    - Last Modified: Wed Apr 17 20:06:41 UTC 2024
    - 6.4K bytes
    - Viewed (0)
  6. pkg/kubelet/winstats/perfcounter_nodestats.go

    		NumCores:       ProcessorCount(),
    		MemoryCapacity: p.nodeInfo.memoryPhysicalCapacityBytes,
    		MachineID:      hostname,
    		SystemUUID:     systemUUID,
    		BootID:         bootId,
    	}, nil
    }
    
    // runtime.NumCPU() will only return the information for a single Processor Group.
    // Since a single group can only hold 64 logical processors, this
    // means when there are more they will be divided into multiple groups.
    Registered: Sat Jun 15 01:39:40 UTC 2024
    - Last Modified: Fri Jan 26 18:37:21 UTC 2024
    - 9.2K bytes
    - Viewed (0)
  7. cmd/kubeadm/app/preflight/checks_test.go

    	}
    }
    
    func TestNumCPUCheck(t *testing.T) {
    	var tests = []struct {
    		numCPU      int
    		numErrors   int
    		numWarnings int
    	}{
    		{0, 0, 0},
    		{999999999, 1, 0},
    	}
    
    	for _, rt := range tests {
    		t.Run(fmt.Sprintf("number of CPUs: %d", rt.numCPU), func(t *testing.T) {
    			warnings, errors := NumCPUCheck{NumCPU: rt.numCPU}.Check()
    			if len(warnings) != rt.numWarnings {
    Registered: Sat Jun 15 01:39:40 UTC 2024
    - Last Modified: Wed May 29 06:58:01 UTC 2024
    - 33.5K bytes
    - Viewed (0)
  8. src/time/sleep_test.go

    // https://golang.org/issue/38860
    func BenchmarkParallelTimerLatency(b *testing.B) {
    	gmp := runtime.GOMAXPROCS(0)
    	if gmp < 2 || runtime.NumCPU() < gmp {
    		b.Skip("skipping with GOMAXPROCS < 2 or NumCPU < GOMAXPROCS")
    	}
    
    	// allocate memory now to avoid GC interference later.
    	timerCount := gmp - 1
    	stats := make([]struct {
    		sum   float64
    		max   Duration
    		count int64
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Fri Mar 22 16:33:57 UTC 2024
    - 22.5K bytes
    - Viewed (0)
  9. src/runtime/gc_test.go

    		<-teardown
    		return
    	}
    	*n--
    	countpwg(n, ready, teardown)
    }
    
    func TestMemoryLimit(t *testing.T) {
    	if testing.Short() {
    		t.Skip("stress test that takes time to run")
    	}
    	if runtime.NumCPU() < 4 {
    		t.Skip("want at least 4 CPUs for this test")
    	}
    	got := runTestProg(t, "testprog", "GCMemoryLimit")
    	want := "OK\n"
    	if got != want {
    		t.Fatalf("expected %q, but got %q", want, got)
    	}
    }
    
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Wed Jun 05 22:33:52 UTC 2024
    - 17.6K bytes
    - Viewed (0)
  10. src/sync/atomic/atomic_test.go

    				}
    				c <- 1
    			}()
    		}
    		for p := 0; p < procs; p++ {
    			<-c
    		}
    	}
    }
    
    func TestStoreLoadSeqCst32(t *testing.T) {
    	if runtime.NumCPU() == 1 {
    		t.Skipf("Skipping test on %v processor machine", runtime.NumCPU())
    	}
    	defer runtime.GOMAXPROCS(runtime.GOMAXPROCS(4))
    	N := int32(1e3)
    	if testing.Short() {
    		N = int32(1e2)
    	}
    	c := make(chan bool, 2)
    	X := [2]int32{}
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Fri May 17 18:37:29 UTC 2024
    - 71.4K bytes
    - Viewed (0)
Back to top