virtio net bugfixes and performance improvement#149
Merged
slp merged 7 commits intocontainers:mainfrom Nov 29, 2023
Merged
Conversation
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>
Collaborator
Author
|
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>
b9f6a5f to
8731651
Compare
Collaborator
|
@mtjhrc LGTM, could you please force-push this PR to retrigger the checks? |
Signed-off-by: Matej Hrica <mhrica@redhat.com>
8731651 to
6669f1f
Compare
Signed-off-by: Matej Hrica <mhrica@redhat.com>
slp
approved these changes
Nov 29, 2023
Collaborator
slp
left a comment
There was a problem hiding this comment.
Thanks, let's merge it now.
This file contains hidden or 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
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.