epoll/kqueue #11602
Replies: 7 comments
-
+HTTPAPI :) https://docs.microsoft.com/en-us/windows/win32/http/http-server-sample-application |
Beta Was this translation helpful? Give feedback.
-
Of course, we can't ignore Windows Server users :) |
Beta Was this translation helpful? Give feedback.
-
Once #1469 / #1470 or similar approach is in, you could try to test picoev, which has built-in support for epoll/kqueue/select https://github.com/S-YOU/picoev.v/blob/master/examples/http_hello.v Which I get 200k reqeusts/second on my machine, for following code. https://mobile.twitter.com/__s_you/status/1157683017357250560 import picoev
pub fn callback(req byteptr) string {
return 'Hello, World!'
}
pub fn main() {
picoev.new(8080, &callback).serve()
} And hyper(rust) is running par with picoev.v on my machine, so it is basically can max out performance as much as it can be like on this benchmark. https://www.techempower.com/benchmarks/#section=data-r18&hw=ph&test=plaintext |
Beta Was this translation helpful? Give feedback.
-
@S-YOU Good work! |
Beta Was this translation helpful? Give feedback.
-
Wow, on my old i3, I get over 100K req/s ! There is a memory leak, but still... |
Beta Was this translation helpful? Give feedback.
-
Great!, and you could probably get better with less threads (other than -t 10) on wrk side unless you have more than 10 physical cpus, because wrk may probably use same cpu that is in use by web server, it could slow things down, imo. And I have no idea which cause the memory leak :D |
Beta Was this translation helpful? Give feedback.
-
Using taskset definitely helped the average latency (my processor has 2 cores and fixing wrk and the http_bench process on their own cores is a good idea, 10x!) ... |
Beta Was this translation helpful? Give feedback.
-
Right now the web server uses simple blocking IO. This results in terrible performance: about 1k requests/second.
It should use epoll/kqueue instead, that should bring it to 50-100k.
Beta Was this translation helpful? Give feedback.
All reactions