lkml.org 
[lkml]   [1997]   [Jul]   [9]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: 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


\
 
 \ /
  Last update: 2005-03-22 13:39    [W:0.102 / U:0.116 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site