On Thu, Aug 14, 2014 at 10:57:50AM +0200, FRIGN wrote: > On Thu, 14 Aug 2014 09:35:07 +0100 > Dimitris Papastamos <[email protected]> wrote: > > Hey Dimitris, > > thanks for the patches you sent in earlier! > > > Obviously these numbers do not mean anything unless compared to > > some other http server implementation. > > > > From some quick testing that me and Hiltjo did yesterday, we found > > that nginx is twice as fast. That's ok, quark has no optimizations in > > place and can easily serve a few thousands of clients with static > > content. > > > > Quark uses fork() internally to handle the clients. I think that's a > > bless in disguise. Any other technique (select, poll, epoll, etc.) will > > require some small finite state machine to keep track of the connections, > > recycle the appropriate file descriptors etc. More specific > > interfaces like sendfile(), epoll() etc. are also going to cause problems > > with portability. > > We gotta relect on that one. > Compared to fork(), poll()/epoll() are superior and should provide > better throughput.
epoll() is Linux specific though, so I'd avoid it as much as possible.
