-
-
Notifications
You must be signed in to change notification settings - Fork 2.2k
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
example: fast, multi-threaded, non-blocking, port and host reuse, thread-safe, epoll server #23094
base: master
Are you sure you want to change the base?
Conversation
…d-safe, epoll server
Please use something like Just |
Also add the new folder name in the |
What we are missing to a 500k+ Requests/sec in wrk -H 'Connection: keep-alive' --connections 512 --threads 8 --duration 5s --timeout 1 http://localhost:3000/ Unfortunately, I don't have much time to research and investigate bottlenecks. So, having the community's help would be amazing!! |
wrk -H 'Connection: keep-alive' --connections 512 --threads 8 --duration 60s --timeout 1 http://localhost:3000/ Running 1m test @ http://localhost:3000/
8 threads and 512 connections
Thread Stats Avg Stdev Max +/- Stdev
Latency 1.42ms 1.12ms 13.48ms 78.10%
Req/Sec 47.73k 1.74k 51.86k 75.52%
22792466 requests in 1.00m, 2.02GB read
Requests/sec: 379530.05
Transfer/sec: 34.39MB |
NOTE: Removing all lockers and runnig with (*server).lock_flag.lock()
mut readed_request_buffer := []u8{cap: bytes_read}
(*server).lock_flag.unlock()
defer {
unsafe {
(*server).lock_flag.lock()
readed_request_buffer.free()
(*server).lock_flag.unlock()
}
}
unsafe {
readed_request_buffer.push_many(&request_buffer[0], bytes_read)
} Needs to be made :| |
I'm very busy this week. I'll try to complete this task as soon as possible. |
It makes a lot more sense to use manual memory management for something low-level like this, where you want the best possible throughput. |
I am more concerned about it not compiling on windows. Examples should either compile everywhere (ideally), or be skipped on the platforms, where they are known to fail in |
I agree with you. It will be compiled in all OSs |
Benchmark
with pontencial to be faster
Huly®: V_0.6-21532