mirror of
https://github.com/k3s-io/kubernetes.git
synced 2025-08-06 18:54:06 +00:00
Parallel build logic should work against available memory, not total memory
This commit is contained in:
parent
47de06b1e2
commit
a043f3c86e
@ -415,12 +415,12 @@ kube::golang::build_binaries_for_platform() {
|
|||||||
done
|
done
|
||||||
}
|
}
|
||||||
|
|
||||||
# Return approximate physical memory in gigabytes.
|
# Return approximate physical memory available in gigabytes.
|
||||||
kube::golang::get_physmem() {
|
kube::golang::get_physmem() {
|
||||||
local mem
|
local mem
|
||||||
|
|
||||||
# Linux, in kb
|
# Linux, in kb
|
||||||
if mem=$(grep MemTotal /proc/meminfo | awk '{ print $2 }'); then
|
if mem=$(grep MemAvailable /proc/meminfo | awk '{ print $2 }'); then
|
||||||
echo $(( ${mem} / 1048576 ))
|
echo $(( ${mem} / 1048576 ))
|
||||||
return
|
return
|
||||||
fi
|
fi
|
||||||
|
Loading…
Reference in New Issue
Block a user