|
|
|
|
|
by jerf
5345 days ago
|
|
I would love to see "someone" do that benchmark; using epoll, accept as many sockets as possible, for the sake of argument let's stuff one byte down them, and then properly shut them down. I'm curious how close to the limit of the underlying poll technology we're getting, because it seems like everyone is converging in roughly the same area, in an order-of-magnitude sense. I also find myself wondering about the implications of these artificial benchmarks and the stuff Zed discussed here: http://sheddingbikes.com/posts/1280829388.html |
|
It matters because select will have to iterate over all the file descriptors you passed to it, while kqueue for example have knotes registered to it when it wakes up and won't need to iterate over everything, but just the knotes it got. Not to mention the data copying from userland to the kernel in case of select/poll.
Back to the request rate limitations, the limitation is mainly coming from the # of system calls you can execute in a sec (accept() in this case) which is heavily influenced by the context switches.
Looking at the application CPU gives you a very good idea of what your bottleneck is. If your CPU is 100% then it's clear your application is hitting the limit, but if the application CPU is at 30% and you cannot process more requests / sec then you've hit the system limit here.