rootless-containers / slirp4netns

User-mode networking for unprivileged network namespaces
GNU General Public License v2.0
746 stars 83 forks source link

Big performance drop with new v1.1.12 version #274

Open dg424 opened 3 years ago

dg424 commented 3 years ago

Performance has dropped by almost half with this version. Was there any perf tests done/is there a standard set of perf tests to verify that new versions are at least as good as previous one ?

AkihiroSuda commented 3 years ago

Needs more info.

make benchmark MTU=65520 on CI doesn’t seem so slow

dg424 commented 3 years ago

Running this as part of a Docker rootless container with Rootlesskit using this as the storage driver. Docker pulls on 1.1.11 are twice as fast as those on 1.1.12. Maybe there is something added here affecting docker ?

AkihiroSuda commented 3 years ago

Please provide

AkihiroSuda commented 3 years ago

as the storage driver

Do you mean network driver? port driver? Could you also provide the command line flags of the rootlesskit process? (ps auxw | grep rootlesskit)

dg424 commented 3 years ago

/ # docker version Client: Version: 20.10.7 API version: 1.41 Go version: go1.13.15 Git commit: f0df350 Built: Wed Jun 2 11:51:04 2021 OS/Arch: linux/amd64 Context: default Experimental: true

/ # slirp4netns -v slirp4netns version 1.1.12 commit: 7a104a101aa3278a2152351a082a6df71f57c9a3 libslirp: 4.6.1 SLIRP_CONFIG_VERSION_MAX: 3 libseccomp: 2.3.3

/ # rootlesskit -v rootlesskit version 0.14.2

/ # fuse-overlayfs -V fuse-overlayfs: version 1.7 FUSE library version 3.4.1 using FUSE kernel interface version 7.27 Rootlesskit setup:

rootlesskit \ --net="${DOCKERD_ROOTLESS_ROOTLESSKIT_NET:-slirp4netns}" \ --mtu="${DOCKERD_ROOTLESS_ROOTLESSKIT_MTU:-1500}" \ --disable-host-loopback \ --port-driver=slirp4netns \

Dockerd:

set -- dockerd \ --host="$dockerSocket" \ --host=tcp://0.0.0.0:2375 \ --storage-driver="fuse-overlayfs" \

I just ran a test locally on my pc and perf seems to be the same. One thing I forgot to mention is that the actual test is being run on k8s node doing a simple docker pull and v1.1.12 takes twice as long. Note that I'm also using fuse-overlayfs sitting on top a k8s ephemeral dir. But setting aside all the k8s stuff, if I switch back to v1.1.11, my pull times are cut in half.

AkihiroSuda commented 3 years ago

@giuseppe @Luap99 do you see performance drop for Podman?

Luap99 commented 3 years ago

I have not noticed any difference.