httpd-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Dean Gaudet <dgau...@arctic.org>
Subject Re: Apache 2.0 ideas
Date Mon, 16 Nov 1998 17:05:45 GMT


On Sun, 15 Nov 1998, Mark D. Anderson wrote:

> I think we all agree with the conclusion (most web sites can fit in
> an affordable amount of RAM). But this argument still doesn't work for me.
> Suppose i have a movie on my 22Gb DVD, and i want to play that to
> someone over the net. I'm not going to get 22Gb of RAM, and even
> if i did, it wouldn't really do much for me (hence my reference to
> Gray's "5 minute rule").

It's fine if you have a 22Gb movie to show, because you don't need the
entire thing in RAM at any point in time.  I'm not at all familiar with
the "5 minute rule".  But if it's something like "enough RAM to hold all
the data needed in a 5 minute period", and your system has 100Mbits/s
bandwidth, then 300 s * 10Mbyte/s = 3Gb of RAM would satisfy your
*theoretical peak* needs -- buy an alpha.  RAM is cheap.  Your observed
needs will be lower.

> But seriously, isn't the design of a web server's caching algorithm
> confronted with the same set of issues as a virtual memory system -- 
> because in fact it is doing practically the same thing?

Similar.  Web serving is (essentially) sequential until you have so many
clients at random points in a large file...  VM has somewhat more random
access in general.  With sendfile()/TransmitFile() the kernel knows where
all the cursors are and can make educated guesses about which blocks to
toss.  It could also apply slight delay heuristics where it's permitted to
add latency to "synchronize" bundles of clients so that they need the same
blocks at the same/similar time.

> On a somewhat unrelated note -- and apologize for slipping this question
> in here -- is there an apache module for hooking the caching algorithm,
> so that i can fill and invalidate the cache for POST requests using my
> own information? 

What caching algorithm?  Apache doesn't do any caching.  It's a
multiprocess model server, caching is futile because it can't be shared
conveniently between processes.

Dean



Mime
View raw message