From c4b56a4b846c5c85177ae6fb46df67969cb7849a Mon Sep 17 00:00:00 2001 From: Jan Gutter Date: Mon, 23 Oct 2023 20:29:06 +0100 Subject: CI: speed up podman on el9 Before this commit the following warning message appeared in the podman log: Not using native diff for overlay, this may cause degraded performance for building images: kernel has CONFIG_OVERLAY_FS_REDIRECT_DIR enabled It appears that the default mount options for the overlay graph driver is badly optimised for Kolla builds on el9: * Enable native overlay diff https://mikeshade.com/posts/docker-native-overlay-diff/ https://github.com/containers/storage/commit/09480532cf49617d7c745fe1ee92487c60c49e1d https://github.com/containers/podman/blob/main/docs/tutorials/performance.md Things that did not appear to make a difference: * volume mounting /var/lib/container https://github.com/containers/buildah/issues/3666#issuecomment-1351992335 * enable transientStore https://www.redhat.com/sysadmin/speed-containers-podman-raspberry-pi note: currently incompatible with debian Change-Id: I002e88b4b6162f6732e622fd97639d543c66784c --- tests/playbooks/pre.yml | 17 +++++++++++++++++ 1 file changed, 17 insertions(+) (limited to 'tests') diff --git a/tests/playbooks/pre.yml b/tests/playbooks/pre.yml index c8b2b0a58..7fbe412e3 100644 --- a/tests/playbooks/pre.yml +++ b/tests/playbooks/pre.yml @@ -227,6 +227,23 @@ name: podman become: true + # NOTE(jangutter): It appears that the default mount option + # in the shipped `/etc/containers/storage.conf` for EL9 based distros + # (Rocky, CentOS Stream, ...) has severe performance implications for + # Kolla builds. This is because enabling `metacopy=on` disables `Native + # Overlay Diff` This can be removed if the config is dropped from those + # distros, or the underlying incompatibility can somehow be addressed. + # Debian based distros do not ship `storage.conf` and seem + # to be unaffected. + - name: Remove metacopy, enable native overlay diff + ini_file: + path: /etc/containers/storage.conf + section: storage.options.overlay + option: mountopt + value: '"nodev"' + become: true + when: ansible_os_family == "RedHat" + - name: Ensure Podman service is started service: name: podman -- cgit v1.2.3