Upload performance bottlenecked by server compared to Go for speed test (librespeed)? #2823
Unanswered
Zerowalker
asked this question in
Q&A
Replies: 1 comment 3 replies
-
How are you running your Rust app? |
Beta Was this translation helpful? Give feedback.
3 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
Summary
For some reason uploading causes a bottleneck in the server (cpu usage) compared to go.
This is not me complaining, just wondering why as it seems a bit odd as I believe rust should have the advantage.
here is the go implementation: https://github.com/librespeed/speedtest-go
The upload part is (as far as i can tell) simply reading and discarding all data as fast as possible.
The relevant parts in go vs axum is this:
This is my implementation of it, the headers are set using
tower_http::set_header::SetResponseHeaderLayer
,but I have tried setting it directly in the function, results seem to be the same.
The cpu usage on axum goes to 100% (on 1 thread) which limits the speed.
on go it's a lot less so it's not limited by it.
axum version
0.7.5
Beta Was this translation helpful? Give feedback.
All reactions