httpd-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Dean Gaudet <>
Subject Re: Number of Virtual Servers
Date Fri, 15 Dec 1995 20:58:05 GMT
In message <>, Randy Terbush writes:
>> You can cache open log handles.  Have a configuration directive
>> LogCacheSize, and a way to seed the cache in the parent httpd.  Then the
>> children just close something when they need a different handle.
>How can you do this without the parent maintaining the open descriptor?

Maybe I'm misunderstanding the original problem.  I was under the
impression that if we assume that every virtual server has its own log
files, say 2 of them, then you run out of handles fast.  But if you
assume that not all of your virtual servers are as busy as the others
then you don't need to have all those logs open.  So pre-open the ones
that are busy, and open the others as required.

But then a way to extend this is to keep a cache of already open
file handles and close old handles as new ones have to be opened.
The children can communicate with the parent to give the parent an idea
of which virtual servers are busy so that the parent can pre-seed the
cache for the forks.

While that might sound good it still has a fundamental problem: the
same child doesn't necessarily serve a client's subsequent requests.
So you might end up with cache thrashing.  However if we assume that
someone is going to implement Keep-Alive then the same child will gain
from having cached an open log handle.

But I seem to be able to easily get 1024 file handles under Solaris 2.4,
2500 under IRIX 5.3, and 6668 under BSDI 2.0 without doing anything
really special.  So what's all the fuss? ;)


View raw message