in reply to Re^2: PSGI/Plack unsatisfactory performance
in thread PSGI/Plack unsatisfactory performance
I feel like there is something going wrong with the "accept" loops in Gazelle. I checked on the implementation, and it looks very much like it forks, and then each worker calls accept() on the same listening socket, and then they *should* be able to receive new connections in parallel. Yet, on the slower server, the pool of workers were unable to beat the performance of a single worker. I'm aware of the "stampede" effect where a listen socket becoming readable wakes all the workers instead of just one, but with Gazelle's loop implemented in C, that should still be low enough overhead that they should be able to run in parallel even for a tiny request. I'd be interested to see it if you or anyone else decide to chase this down to some microsecond-level traces. It's a lot of effort though, to shave off a mere 3-5ms per request. It wouldn't make any difference to any of the apps I maintain.
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re^4: PSGI/Plack unsatisfactory performance
by locked_user beautyfulman (Sexton) on Dec 18, 2021 at 21:48 UTC |