rootless-containers / bypass4netns

[Experimental] Accelerates slirp4netns using SECCOMP_IOCTL_NOTIF_ADDFD. As fast as `--net=host`.
https://medium.com/nttlabs/accelerating-rootless-container-network-29d0e908dda4
Apache License 2.0
131 stars 6 forks source link

`apt-get` hangs with bypass4netns #35

Closed AkihiroSuda closed 10 months ago

AkihiroSuda commented 2 years ago
$ nerdctl run -it --rm --label nerdctl/bypass4netns=1 debian:11
root@1fac92b42639:/# apt-get update
Get:1 http://deb.debian.org/debian bullseye InRelease [116 kB]
0% [1 InRelease 64.9 kB/116 kB 56%]

dnf also seems very slow

bypass4netns v0.3.0, nerdctl v0.23.0 (Lima v0.12.0)

naoki9911 commented 1 year ago

applying fcntl options fixes this problem. This patch is just a PoC. I'm working on re-work of bypass4netns and I will send PR when the work is finished.

https://github.com/naoki9911/bypass4netns/commit/4071b387f014cb0a07390b17024f0fe4275f4f40

AkihiroSuda commented 1 year ago

Thank you @naoki9911

AkihiroSuda commented 10 months ago

@naoki9911 May I ask the current status of this?

naoki9911 commented 10 months ago

Sorry for waiting long time. I reimplemented bypass4netns entirely and its implementation very differs from current released one. https://github.com/naoki9911/bypass4netns/tree/ng-b4ns

Should I make PR for this issue seperately or PR for entire reimplemented bypass4netns?

AkihiroSuda commented 10 months ago

Thanks, feel free to just open a single PR for the entire work

naoki9911 commented 10 months ago

Thanks! I opened https://github.com/rootless-containers/bypass4netns/pull/39