From 19ceb532a52e35cf833221dafb9815f2e135c87d Mon Sep 17 00:00:00 2001 From: Martin Kraemer Date: Wed, 15 Apr 1998 12:21:45 +0000 Subject: [PATCH] Add notice about some inefficient SVR4 implementations of time zones in gettimeofday() git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@80925 13f79535-47bb-0310-9956-ffa450edef68 --- docs/manual/platform/perf.html | 49 ++++++++++++++++++++++++++++++++++ 1 file changed, 49 insertions(+) diff --git a/docs/manual/platform/perf.html b/docs/manual/platform/perf.html index d8b09a9020..6bd50c3765 100644 --- a/docs/manual/platform/perf.html +++ b/docs/manual/platform/perf.html @@ -30,6 +30,7 @@ for the heavier TCP load, hardware/software conflicts that arise, etc.
  • Linux
  • Solaris
  • SunOS 4.x +
  • SVR4
    @@ -120,6 +121,54 @@ http://www.islandnet.com/~mark/somaxconn.html.


    +

    +SVR4 +

    + +Some SVR4 versions waste three system calls on every +gettimeofday() call. Depending on the syntactic +form of the TZ environment variable, these +systems have several different algorithms to determine the +local time zone (presumably compatible with +something). The following example uses the central european +time zone to demonstrate this: +
    +
    TZ=:MET +
    This form delegates the knowledge of the time zone + information to an external compiled zoneinfo file + (à la BSD).
    + Caveat: Each time the gettimeofday() + function is called, the external zone info is read in + again (at least on some SVR4 systems). That results in + three wasted system calls with every apache request + served.
    +     open("/usr/lib/locale/TZ/MET", O_RDONLY) = 3
    +     read(3, "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0"..., 7944) = 778
    +     close(3)                                = 0
    + +
    TZ=MET-1MDT,M3.5.0/02:00:00,M10.5.0/03:00:00 +
    This syntax form (à la SYSV) contains all the + knowledge about time zone beginning and ending times in + its external representation. It has to be parsed each + time it is evaluated, resulting in a slight computing + overhead, but it requires no system call. Though the + table lookup à la BSD is the more sophisticated + technical solution, the bad SVR4 implementation makes + this the preferred syntax on systems which otherwise + access the external zone info file repeatedly. +
    +You should use the truss utility on a +single-process apache server (started with the -X +debugging switch) to determine whether your system can profit +from the second form of the TZ environment +variable. If it does, you could integrate the setting of the +preferred TZ syntax into the httpd startup +script, which is usually simply a copy of (or symbolic link +to) the apachectl utility script, or into the +system's /etc/TIMEZONE script. + +


    +

    More welcome!

    If you have tips to contribute, send mail to