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
|
||||
}
|
||||
|
||||
# Return approximate physical memory in gigabytes.
|
||||
# Return approximate physical memory available in gigabytes.
|
||||
kube::golang::get_physmem() {
|
||||
local mem
|
||||
|
||||
# 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 ))
|
||||
return
|
||||
fi
|
||||
|
Loading…
Reference in New Issue
Block a user