Messages in this thread | | | Date | Wed, 9 Jul 1997 00:12:56 -0700 (PDT) | From | Alex Belits <> | Subject | Re: InfoWorld web server shootout |
| |
On Tue, 8 Jul 1997, Paul H. Hargrove wrote:
> Certainly any decent porn site has more "content" than will mmap into > the 4GB memory space of an x86. I guess it's time to drop the Intel > platforms and use Alphas for serious porn sites. ;-) > > Seriously though, the idea sounds great for servers with small enough content.
I have "preloaded" files support (now converting it into cache) that are just loaded into real allocated memory and are sent using select() and nonblocking write()s, although probably the same thing will work well on mmap()'ed files, too. I don't use any kind of threads and IMHO in Linux threads have no advantage over plain operations on select()'ed descriptors, given that the time spent in request parsing and preparing the response isn't huge compared to actual data transfer -- obviously kernel can fill buffers while request is being parsed, and if server started output before buffers are filled up by clients, there will be no possible way to increase the server throughput by the use of threads (reducing the number of context switches between processes at the price of having context switches between threads, if I'm not mistaken, is worthless in Linux where context switch between threads isn't much cheaper than context switch between processes).
-- Alex
| |