aboutsummaryrefslogtreecommitdiff
path: root/contrib/cirrus
diff options
context:
space:
mode:
authorPaul Holzinger <pholzing@redhat.com>2021-09-02 14:14:59 +0200
committerPaul Holzinger <pholzing@redhat.com>2021-10-12 21:43:11 +0200
commit3ba69dccf78194792a4b0156db8c69417b20a713 (patch)
tree325afc80df95c0b5eb49b74d175cdd0ba1a480ff /contrib/cirrus
parentc90beedbe160eb6e8094b492091231f3c5838006 (diff)
downloadpodman-3ba69dccf78194792a4b0156db8c69417b20a713.tar.gz
podman-3ba69dccf78194792a4b0156db8c69417b20a713.tar.bz2
podman-3ba69dccf78194792a4b0156db8c69417b20a713.zip
rootlessport: reduce memory usage of the process
Don't use reexec for the rootlessport process, instead make it a separate binary to reduce the memory usage. The problem with reexec is that it will import all packages that podman uses and therefore loads a lot of stuff into the heap. The rootlessport process however only needs the rootlesskit library. The memory usage is a concern since the rootlessport process will spawn two process per container which has ports forwarded. The processes stay until the container dies. On my laptop the current reexec version uses 47800 KB RSS. The new separate binary only uses 4540 KB RSS. This is more than a 90% improvement. The Makefile has been updated to compile the new binary and install it to the libexec directory. Fixes #10790 [NO TESTS NEEDED] Signed-off-by: Paul Holzinger <pholzing@redhat.com>
Diffstat (limited to 'contrib/cirrus')
-rwxr-xr-xcontrib/cirrus/setup_environment.sh12
1 files changed, 11 insertions, 1 deletions
diff --git a/contrib/cirrus/setup_environment.sh b/contrib/cirrus/setup_environment.sh
index f2afbfef5..3786054a7 100755
--- a/contrib/cirrus/setup_environment.sh
+++ b/contrib/cirrus/setup_environment.sh
@@ -236,9 +236,19 @@ case "$TEST_FLAVOR" in
# Use existing host bits when testing is to happen inside a container
# since this script will run again in that environment.
# shellcheck disable=SC2154
- if ((CONTAINER==0)) && [[ "$TEST_ENVIRON" == "host" ]]; then
+ if [[ "$TEST_ENVIRON" == "host" ]]; then
+ if ((CONTAINER)); then
+ die "Refusing to config. host-test in container";
+ fi
remove_packaged_podman_files
make install PREFIX=/usr ETCDIR=/etc
+ elif [[ "$TEST_ENVIRON" == "container" ]]; then
+ if ((CONTAINER)); then
+ remove_packaged_podman_files
+ make install PREFIX=/usr ETCDIR=/etc
+ fi
+ else
+ die "Invalid value for $$TEST_ENVIRON=$TEST_ENVIRON"
fi
install_test_configs