Runners come without swap by default, when a job runs out of memory one or more process get terminated by the out-of-memory killer.
Adding a swap file lets the kernel page cold memory out to disk, which can carry a job past short memory spikes without moving to a larger shape.See the Runner Controls overview for how to pass these settings via a profile or labels.
With runner profiles
With runner labels
You can configure swap directly in the profile editor under Advanced Settings.
For label-based runners, automatic swap configuration is not yet supported. Swap can still be enabled manually using container.privileged and container.mount-scratch. The scratch mount is required because Linux does not support activating a swap file on the runner’s default overlay-backed filesystem./namespace/scratch provides an ephemeral filesystem that can be used for swap.When using runner labels, request the features with namespace-features and create the swap file in /namespace/scratch.