diff --git a/cmd/minikube/cmd/start.go b/cmd/minikube/cmd/start.go index cef933ef4b..24cda29dfe 100644 --- a/cmd/minikube/cmd/start.go +++ b/cmd/minikube/cmd/start.go @@ -979,8 +979,8 @@ func validateCPUCount(drvName string) { var cpuCount int if driver.BareMetal(drvName) { - // Uses the gopsutil cpu package to count the number of physical cpu cores - ci, err := cpu.Counts(false) + // Uses the gopsutil cpu package to count the number of logical cpu cores + ci, err := cpu.Counts(true) if err != nil { klog.Warningf("Unable to get CPU info: %v", err) } else { diff --git a/pkg/minikube/machine/info.go b/pkg/minikube/machine/info.go index 05361182a8..10b8035d50 100644 --- a/pkg/minikube/machine/info.go +++ b/pkg/minikube/machine/info.go @@ -181,6 +181,7 @@ var ( // cachedCPUInfo will return a cached cpu info func cachedCPUInfo() ([]cpu.InfoStat, error) { if cachedCPU == nil { + // one InfoStat per thread i, err := cpu.Info() cachedCPU = &i cachedCPUErr = &err