kubernetes/hack/lib
Sascha Grunert abf85d70c2
Change KUBE_PARALLEL_BUILD_MEMORY to 20 GiB
A benchmark with go1.16 on amd64 resulted in an overall maximum memory
usage of 15GiB. This means we now lower the `KUBE_PARALLEL_BUILD_MEMORY`
to `20` to still have some room left.

The benchmark has been done with the following `Dockerfile`:

```dockerfile
FROM k8s.gcr.io/build-image/kube-cross:v1.16.0-1
RUN apt-get update && apt-get install -y time

WORKDIR /go/src/k8s.io/kubernetes
RUN git clone https://github.com/kubernetes/kubernetes
ENV KUBE_PARALLEL_BUILD_MEMORY=0
RUN /usr/bin/time -v make -C kubernetes cross-in-a-container
```

The value of interest from the output:

```
Maximum resident set size (kbytes): 1847108
```

The RSS is not the only value we have to consider. During the runtime I
measured the usage of the cached memory, which gets peaks up to 15GiB.

Test machine specs:
- CPU: 2 x Intel Scalable Gold 5120 28-Core Processor @ 2.2GHz
- RAM: 384GB
- Disk: 1 x 3.8TB NVME
- OS: Debian 10 (buster)

Signed-off-by: Sascha Grunert <sgrunert@redhat.com>
2021-03-04 12:11:20 +01:00
..
.gitattributes Capture git export-subst strings in version.sh for 'git archive' use. 2017-11-09 16:36:27 -08:00
etcd.sh Update default etcd server to 3.4.13 2020-08-28 21:19:24 +08:00
golang.sh Change KUBE_PARALLEL_BUILD_MEMORY to 20 GiB 2021-03-04 12:11:20 +01:00
init.sh Drop batch/v2alpha1 API 2021-02-12 17:51:12 +01:00
logging.sh Lower default log verbosity 2020-08-02 01:22:59 -04:00
protoc.sh Build code-generator tools directly 2020-08-02 10:56:46 -04:00
swagger.sh Speed up update-swagger-docs 2020-08-02 10:56:46 -04:00
test.sh Fix run_kubectl_sort_by_tests 2019-11-07 02:26:45 -05:00
util.sh suggest homebrew when bash is too old on macOS 2021-02-09 22:40:01 -08:00
version.sh hack/lib/version.sh: fix error log to stderr 2021-01-31 00:40:53 +08:00