httpd-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Rasmus Lerdorf <ras...@apache.org>
Subject Re: perchild on FreeBSD 5?
Date Wed, 14 Aug 2002 19:47:54 GMT
> >If we end up having to mutex, sure, if every request for that domain needs
> >to access the mutxed library, then yes, you would only be able to serve up
> >one request at a time from that domain.
> >
> >
>
> That's not accurate in general.  The amount of serialization will depend on
> how much time you spend in mutexed operations in that library, relative
> to the entire request processing time.  If the time spent in mutex-protected
> code is 1% of the total request processing time on an otherwise idle server,
> you'll see good concurrency as you add more requests.  In contrast, if the
> time spent in mutex-protected code is 99% of the total request processing
> time, then the server will scale poorly.  The key success factor is to not
> use libraries that require locking for lengthy operations.

If, for example, we have to mutex an entire database library and every
request needs to make an sql query, then effectively we are down to
serializing the requests and only handling one at a time.  And yes, it
goes without saying that it is better to use libraries that don't need to
be locked.  I don't think he was asking for the best-case scenario when he
asked that question.

-Rasmus




Mime
View raw message