httpd-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Martin Kraemer <Martin.Krae...@mch.sni.de>
Subject Re: Minimizing number of system calls?
Date Thu, 13 Nov 1997 14:04:24 GMT
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 |  <Martin.Kraemer@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

Mime
View raw message