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

In vde_switch retry send() when it returns ENOBUFS on Darwin and FreeBSD #35

Merged

Conversation

jandubois
Copy link
Contributor

On these platforms ENOBUFS can be returned by send() even on blocking sockets.

I've done throughput testing with Lima on macOS (uses a qemu VM under the hood), downloading a 4GB ISO (hosted by Apache on the host) over various interfaces, writing to /dev/null.

  • Using vde_switch and vde_vmnet it takes about 75min.

  • With the patch in this PR (and a similar one to vde_vmnet) it takes about 90s.

  • Over the qemu slirp interface it takes 13s.

  • Directly on the host it takes less than 3s.

It is not clear to me why vde_switch & vde_vmnet are still so much slower than slirp, but that will be a separate investigation.

Fixes #19

Fixes https://bugs.launchpad.net/qemu/+bug/1861875

cc/ @AkihiroSuda

Related downstream issues:

lima-vm/vde_vmnet#19
rancher-sandbox/rancher-desktop#1070

On these platforms ENOBUFS can be returned by send() even on blocking
sockets.

Signed-off-by: Jan Dubois <jan.dubois@suse.com>
jandubois added a commit to lima-vm/vde_vmnet that referenced this pull request Dec 7, 2021
Same issue as virtualsquare/vde-2#35

Signed-off-by: Jan Dubois <jan.dubois@suse.com>
jandubois added a commit to rancher-sandbox/lima-and-qemu that referenced this pull request Dec 8, 2021
For vde_vmnet we bump from 0.5.1 → 0.5.2

For vde-2 we point the submodule to a fork under rancher-sandbox
to use the HEAD of an unmerged PR for testing. See
virtualsquare/vde-2#35.

Signed-off-by: Jan Dubois <jan.dubois@suse.com>
jandubois added a commit to rancher-sandbox/lima-and-qemu that referenced this pull request Dec 8, 2021
For vde_vmnet we bump from 0.5.1 → 0.5.2

For vde-2 we point the submodule to a fork under rancher-sandbox
to use the HEAD of an unmerged PR for testing. See
virtualsquare/vde-2#35.

Also bump lima to latest `master` commit.

Signed-off-by: Jan Dubois <jan.dubois@suse.com>
@danielinux danielinux merged commit 74278b9 into virtualsquare:master Dec 13, 2021
@jandubois jandubois deleted the switch-no-buffer-available branch December 13, 2021 06:55
jandubois added a commit to lima-vm/vde_vmnet that referenced this pull request Dec 13, 2021
Includes virtualsquare/vde-2#35

Signed-off-by: Jan Dubois <jan.dubois@suse.com>
jandubois added a commit to rancher-sandbox/lima that referenced this pull request Dec 13, 2021
Includes virtualsquare/vde-2#35

Signed-off-by: Jan Dubois <jan.dubois@suse.com>
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.

vde_switch on darwin doesn't use af_unix/sock_dgram sockets robustly
3 participants