I have an AWS VM running a Docker executor Gitlab runner. The VM’s OS is Amazon Linux 2023. I am having issues with some of my Gitlab jobs running out of memory and want to configure memory swapping to mitigate this. I have memory swappiness setup in my config.toml file, but I when I run a docker inspect
command on the job container, I see the memory swappiness is set to null. Why are my job containers not using memory swappiness?
config.toml:
[[runners]]
name = "aws-runner-1"
url = "https://gitlab.com/"
id = <id>
token = "<runner-token>"
token_obtained_at = 2024-09-12T13:24:37Z
token_expires_at = 0001-01-01T00:00:00Z
executor = "docker"
[runners.custom_build_dir]
[runners.cache]
MaxUploadedArchiveSize = 0
[runners.cache.s3]
[runners.cache.gcs]
[runners.cache.azure]
[runners.docker]
tls_verify = false
image = "alpine:3.20"
privileged = false
disable_entrypoint_overwrite = false
oom_kill_disable = false
disable_cache = false
volumes = ["/cache"]
memory = "1792m"
memory_swap = "4096m"
memory_swappiness = 60
memory_reservation = "256m"
cpus = "0.9"
cpuset_cpus = "1"
shm_size = 0
network_mtu = 0