Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add --ignore-bind (bind is already fast without bypassing) #68

Merged
merged 1 commit into from
Apr 8, 2024

Conversation

AkihiroSuda
Copy link
Member

Workaround for:

This flag disables the acceleration for bind syscalls, as the current hook is not robust enough for bind with complicated setup.

Anyway, the performance of bind is not really problematic so far in the plain Rootless Containers. So we can just keep enabling bypass4netns for connect and relevant syscalls, and call it for a day.

See the logs of RootlessKit CI:
https://github.com/rootless-containers/rootlesskit/actions/runs/8558692577/job/23453781376

  • Benchmark: TCP Ports (network driver=slirp4netns, port driver=builtin): 34.8 Gbps, 34.7 Gbps
  • Benchmark: TCP Ports (network driver=pasta, port driver=implicit): 39.3 Gbps, 39.2 Gbps
  • Benchmark: UDP Ports (network driver=slirp4netns, port driver=builtin): 25.1 Gbps, 17.2 Gbps
  • Benchmark: UDP Ports (network driver=pasta, port driver=implicit): 37.9 Gbps, 13.2 Gbps

@AkihiroSuda AkihiroSuda added this to the v0.5.0 milestone Apr 5, 2024
@AkihiroSuda AkihiroSuda marked this pull request as ready for review April 5, 2024 21:51
@AkihiroSuda AkihiroSuda requested a review from naoki9911 April 5, 2024 21:52
@AkihiroSuda AkihiroSuda changed the title Add --disable-bind Add --disable-bind (bind is already fast without bypassing) Apr 5, 2024
@AkihiroSuda
Copy link
Member Author

AkihiroSuda commented Apr 5, 2024

nerdctl will support this via --annotation=nerdctl/bypass4netns-ignore-bind=true

@AkihiroSuda AkihiroSuda changed the title Add --disable-bind (bind is already fast without bypassing) Add --ignore-bind (bind is already fast without bypassing) Apr 6, 2024
@AkihiroSuda
Copy link
Member Author

Renamed the flag from --disable-bind to --ignore-bind

Workaround for issue 65.

This flag disables the acceleration for `bind` syscalls,
as the current hook is not robust enough for `bind` with complicated setup.

Anyway, the performance of `bind` is not really problematic so far in the plain Rootless Containers.
So we can just keep enabling bypass4netns for `connect` and relevant syscalls, and call it for a day.

See the logs of RootlessKit CI:
https://github.com/rootless-containers/rootlesskit/actions/runs/8558692577/job/23453781376
- Benchmark: TCP Ports (network driver=slirp4netns, port driver=builtin): 34.8 Gbps, 34.7 Gbps
- Benchmark: TCP Ports (network driver=pasta, port driver=implicit):      39.3 Gbps, 39.2 Gbps
- Benchmark: UDP Ports (network driver=slirp4netns, port driver=builtin): 25.1 Gbps, 17.2 Gbps
- Benchmark: UDP Ports (network driver=pasta, port driver=implicit):      37.9 Gbps, 13.2 Gbps

Signed-off-by: Akihiro Suda <[email protected]>
Copy link
Collaborator

@naoki9911 naoki9911 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM, thanks!

@AkihiroSuda AkihiroSuda merged commit c3c127b into rootless-containers:master Apr 8, 2024
23 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants