mirror of
https://github.com/k3s-io/kubernetes.git
synced 2025-07-23 11:50:44 +00:00
Merge pull request #9477 from rassie/patch-1
Actually ignore hyperthreading
This commit is contained in:
commit
b03532eb39
2
Vagrantfile
vendored
2
Vagrantfile
vendored
@ -89,7 +89,7 @@ elsif host =~ /linux/
|
||||
#This should work on most processors, however it will fail on ones without the core id field.
|
||||
#So far i have only seen this on a raspberry pi. which you probably don't want to run vagrant on anyhow...
|
||||
#But just in case we'll default to the result of nproc if we get 0 just to be safe.
|
||||
$vm_cpus = `cat /proc/cpuinfo | grep 'core id' | uniq | wc -l`.to_i
|
||||
$vm_cpus = `cat /proc/cpuinfo | grep 'core id' | sort -u | wc -l`.to_i
|
||||
if $vm_cpus < 1
|
||||
$vm_cpus = `nproc`.to_i
|
||||
end
|
||||
|
Loading…
Reference in New Issue
Block a user