-
Notifications
You must be signed in to change notification settings - Fork 79
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
virtio net bugfixes and performance improvement #149
Merged
Merged
Conversation
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Since bug https://bugs.passt.top/show_bug.cgi?id=74 is now fixed in passt, it is now became possible to test with small socket buffers, doing so revealed this mistake. Signed-off-by: Matej Hrica <mhrica@redhat.com>
Previously when write_loop was called by try_finish_write and it wrote something to the socket (but not fully finish the current frame), it would set last_partial_write_length to an incorect value. This commit also changes the type of last_partial_write_length to usize from, Option<NonZeroUsize> because it seems to be simpler to work with. Signed-off-by: Matej Hrica <mhrica@redhat.com>
Signed-off-by: Matej Hrica <mhrica@redhat.com>
mtjhrc
changed the title
Draft: virtio net fixes
Draft: virtio net bugfixes and performance improvments
Oct 18, 2023
mtjhrc
changed the title
Draft: virtio net bugfixes and performance improvments
virtio net bugfixes and performance improvments
Oct 19, 2023
The clippy issues seem to be fixed in #148 so not fixing them in this PR. |
With the default small socket buffer sizes of 204KiB, this seems to masively improve iperf3 TCP upload from guest to host. The throughput is now around 33 Gbits/sec instead of 130 Mbits/sec. To set the socket buffer sizes you can use: $ sudo sysctl -w net.core.rmem_max=$((204*1024)) -w net.core.wmem_max=$((204*1024)) Tested with passt version: 0^20231004.gf851084-1.fc38.x86_64 Signed-off-by: Matej Hrica <mhrica@redhat.com>
Signed-off-by: Matej Hrica <mhrica@redhat.com>
mtjhrc
force-pushed
the
virtio-net-fixes
branch
from
October 24, 2023 11:24
b9f6a5f
to
8731651
Compare
mtjhrc
changed the title
virtio net bugfixes and performance improvments
virtio net bugfixes and performance improvement
Oct 25, 2023
@mtjhrc LGTM, could you please force-push this PR to retrigger the checks? |
Signed-off-by: Matej Hrica <mhrica@redhat.com>
mtjhrc
force-pushed
the
virtio-net-fixes
branch
from
November 29, 2023 16:00
8731651
to
6669f1f
Compare
Signed-off-by: Matej Hrica <mhrica@redhat.com>
slp
approved these changes
Nov 29, 2023
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks, let's merge it now.
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Since bug https://bugs.passt.top/show_bug.cgi?id=74 is now fixed in passt, it now became possible to test with small socket buffers, doing so revealed some bugs and a performance issue on the libkrun side.
If you want to test this, please use passt 0^20231004.gf851084, because of the aforementioned bug.
Note that there is now a performance issue where increasing the socket buffer sizes to the previously recommended 16Mib decreases performance. The performance of libkrun with small socket buffers is better than QEMU+passt, with bigger buffer sizes they are both kind of slow. Curiously limiting iperf3 speed (using -b) increases the performance. This seems to be another passt issue.