Add performance test using lima and iperf3#66
Merged
Conversation
nirs
commented
Nov 8, 2024
nirs
commented
Nov 8, 2024
nirs
commented
Nov 8, 2024
nirs
commented
Nov 8, 2024
5f58752 to
818ea8f
Compare
% test/perf.sh
Usage test/perf.sh command
Available commands:
create create test vms
delete delete test vms
host-to-vm [TIME] test host to vm performance
host-to-vm-2 [TIME] test host to vm performance with 1 extra vm
vm-to-vm [TIME] test vm to vm performance
Signed-off-by: Nir Soffer <nsoffer@redhat.com>
nirs
added a commit
to nirs/socket_vmnet
that referenced
this pull request
Nov 9, 2024
The way we used dispatch queue was not optimal, leading to creation of too many threads, which can cause unneeded context switching, and lower performance. We use now 2 queues: - vms_queue - concurrent queue use to run accepted connections threads. For this queue we must use concurrent queue since we want to process requests from VMs in parallel. - host_queue - serial queue for processing events from vmnet. This queue is used for the start and stop callback and for the events callback. With this change we use consistent number of threads: main thread, 1 vmnet thread, 1 thread per connected vm. Testing show no change in performance. | hardware | os | test | before (Gb/s) | after (Gb/s) | |----------|--------|---------------|---------------|--------------| | M1 Pro | 14.7.1 | host-to-vm | 3.252 | 3.219 | | M1 Pro | 14.7.1 | host-to-vm-2 | 1.902 | 1.880 | | M1 Pro | 14.7.1 | vm-to-vm | 1.493 | 1.507 | | M2 Max | 15.1 | host-to-vm | 2.335 | 2.359 | | M2 Max | 15.1 | host-to-vm-2 | 1.798 | 1.802 | | M2 Max | 15.1 | vm-to-vm | 1.275 | 1.266 | Results are average send throughput of 10 runs. Using performance tests from lima-vm#66. We have a performance regression on macOS 15.1. With 14.7 on same M2 Max machine it was up ot 1.2 times faster. With 15.1 it is up to 1.4 times slower. Signed-off-by: Nir Soffer <nsoffer@redhat.com>
AkihiroSuda
approved these changes
Nov 19, 2024
Member
AkihiroSuda
left a comment
There was a problem hiding this comment.
Thanks
Probably this should be executed on GHA too
Member
Author
It can be helpful to run this with very short time (e.g. |
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.
This may duplicate code in the github workflow, but performance testing cannot be done in github actions. You need a controlled and idle machine to get repeatable results.