[systemd-devel] Why systemd-nspawn is slower than docker, podman and qemu?! how to Improve nspawn performance?

Reindl Harald h.reindl at thelounge.net
Mon Jan 25 13:38:14 UTC 2021


there is a difference between theoretical academic benchmarks and real 
world load - if your workload isn't affected it's pointless

Am 25.01.21 um 14:00 schrieb Badr Elmers:
> 
>       Tomasz Torcz
> 
> In fact I m just comparing containers, I have no need yet for context 
> switch, but I hope to understand why nspawn is slower and if there is 
> something I can do to improve it, for example disabling spectre/meltdown 
> mitigations improved nspawn a lot, so I was wondering if there is 
> something else I can do to make nspawn as quick as podman/docker/qemu.
> 
> 
>       Mantas Mikulėnas
> 
> I tested with  Export SYSTEMD_SECCOMP=0
> no improvement, I still get the same result
> thank you,
> badr
> 
> On Mon, Jan 25, 2021 at 1:40 PM Badr Elmers <badrelmers at gmail.com 
> <mailto:badrelmers at gmail.com>> wrote:
> 
>     I tested with Export SYSTEMD_SECCOMP=0
>     no improvement, I still get the same result
>     thank you,
>     badr
> 
>     On Mon, Jan 25, 2021 at 1:14 PM Mantas Mikulėnas <grawity at gmail.com
>     <mailto:grawity at gmail.com>> wrote:
> 
>         On Mon, Jan 25, 2021, 12:56 Badr Elmers <badrelmers at gmail.com
>         <mailto:badrelmers at gmail.com>> wrote:
> 
>             Hi,
>             Why |nspawn| is slow compared to |docker||podman| and even
>             |qemu|?!
>             CPU tasks take twice of the time it takes in docker, podman
>             or qemu
> 
>             here I filled a request to improve nspawn performance which
>             contain the steps and the full test result:
>             https://github.com/systemd/systemd/issues/18370
>             <https://github.com/systemd/systemd/issues/18370>
> 
>             Do you know why systemd-nspawn is slower? how can I improve it?
> 
>             thank you
> 
> 
> 
>         Have you tried completely *disabling* the syscall filtering and
>         all other seccomp-based features? Export SYSTEMD_SECCOMP=0
>         before running nspawn and check if it makes any difference...



More information about the systemd-devel mailing list