-
Notifications
You must be signed in to change notification settings - Fork 1.8k
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 multi-core concurrent packet processing #2234
Conversation
Awesome! |
I wonder if this could improve performance on smaller cpus like the ones in commercial NASs |
Update: Packet re-ordering seemed to be an issue in situations where a single TCP stream was being received by a large number of high-performance cores so the following changes were made which I believe are a good compromise for the time being: This latest commit will not have multicore enabled by default, it can be enabled with When enabled it will only use To experiment with core pinning you can use Suggested default usage:
I am interested in hearing how this performs for people. Thanks. |
Yes, exactly. This is where I'm seeing the best gains in my testing. |
This comment was marked as resolved.
This comment was marked as resolved.
I'm not entirely sure if I'm building it right but I just did some tests, in particular related to video workflows using Blackmagic Disk Speed Test. The connection should reach 100mbit/s from Win to Synology, and 900mbit/s from Synology to Win. All tests are from the Win machine perspective.
P.S: container running from this Docker Hub image (tag |
i get the same result with 50Mb/s Upload Connection
|
Thanks for your results everybody. It's still a work in progress. Some updates:
Example config:
More updates to come. |
Update: At this point we are seeing decent gains in most cases and no worsening of performance in any case. However, this is claim is only true for Linux at the moment. Once things are fully ironed out we plan on porting these changes to other platforms. If anyone is willing to give this another go it would be very much appreciated. Thank you |
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.
I think this is fine to ship disabled by default. Will continue to test including release builds, but want to merge and make build branch and start release process.
Thanks @adamierymenko, just a quick question: where could I follow its development and to quickly test it in a Synology nas should I build my own docker image based on Also: currently it is only configurable via configs, ENV variables are disabled still? |
Yes building a docker image from latest |
Hopefully it's just a temporary decision, handling ENV vars in a docker container is such a breaze compared to binding mounts, in particular when A/B testing. Thanks for the work |
Maybe both? Having runtime configuration is super helpful. |
That's actually a good point. We'll consider doing that. |
For now I'm going to leave this here, since there isn't an official issue to track this, nor I do have useful information/reproducibility to open up one, but I've quickly tested 1.14.1 with the below Same setup as last time:
|
I tested some situations. To enjoy the performance improvement of multithreading, both ends must be Linux clients and multithreading must be enabled. pve virtual machine, two zerotier clients, debian12, x64. My confusion is that if the server opens another iperf3 instance and adds the client2 -> server test, the bandwidth of the two sets of tests is still only 3G. ps: This test environment is a server environment, the CPU frequency is not high, so the absolute performance is not very good. |
ZeroTier on multiple threads
This patch enables concurrent processing of packets in the RX and TX directions and appears to improve performance significantly in low-powered hardware such as arm chips in routers, raspberry pis, etc.
This has only been implemented for Linux and FreeBSD.
Example usage (
local.conf
):