You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@httpd.apache.org by Rasmus Lerdorf <ra...@lerdorf.on.ca> on 1997/11/13 06:25:55 UTC

Minimizing number of system calls?

I actually have a practical need for a completely stripped down Apache
server that takes the absolute minimum number of system calls to service a
request.  I remember someone posting a summary of how to go about
achieving this a couple of months back.  Did anybody save that message?
If so, please forward it to me so I don't need to start from scratch.

-Rasmus


Re: Minimizing number of system calls?

Posted by Martin Kraemer <Ma...@mch.sni.de>.
On Wed, Nov 12, 1997 at 09:47:40PM -0800, Dean Gaudet wrote:
> I actually thought of another call I could remove, but the trick to do it
> is escaping me right now ... I'll update the document next time it comes
> back to me. 

I observed a number of redundant system calls on various SVR4 systems:
depending on the setting of the TZ environment variable, _each_ call to
gettimeofday() could cost three extra system calls:

    open("/usr/lib/locale/TZ/localtime", O_RDONLY, 0) = 3
    read(3, "\0\0\0\0\0\0\0\0\0\0\0\0".., 7944)     = 778
    close(3)                                        = 0

This happens only if the TZ variable uses the external time zone files
(when you set TZ=:{timezone}, e.g., TZ=:MET), not when the SYSV syntax
with the summer time algorithm included in the TZ setting is used (e.g.,
TZ="MET-1MDT,M3.5.0/02:00:00,M10.5.0/03:00:00").

I think we should warn users _somewhere_ that SVR4 performance can be
slightly improved by setting the TZ variable right :-(

    Martin
-- 
| S I E M E N S |  <Ma...@mch.sni.de>  |      Siemens Nixdorf
| ------------- |   Voice: +49-89-636-46021     |  Informationssysteme AG
| N I X D O R F |   FAX:   +49-89-636-44994     |   81730 Munich, Germany
~~~~~~~~~~~~~~~~My opinions only, of course; pgp key available on request

Re: Minimizing number of system calls?

Posted by Dean Gaudet <dg...@arctic.org>.
www.apache.org/docs/misc/perf-tuning.html ... it includes a detailed trace
analysis with commentary.  There are another 4 or 5 calls you can
eliminate with more work and other assumptions about what configurations
you can run with.  I think I comment on all of these "not strictly
required" syscalls in that document ... and explain why they're still
there.

I actually thought of another call I could remove, but the trick to do it
is escaping me right now ... I'll update the document next time it comes
back to me. 

Dean

On Thu, 13 Nov 1997, Rasmus Lerdorf wrote:

> I actually have a practical need for a completely stripped down Apache
> server that takes the absolute minimum number of system calls to service a
> request.  I remember someone posting a summary of how to go about
> achieving this a couple of months back.  Did anybody save that message?
> If so, please forward it to me so I don't need to start from scratch.
> 
> -Rasmus
> 
>