[Top][All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

"sh -n testsuite" performance problem on Solaris 8

From: Paul Eggert
Subject: "sh -n testsuite" performance problem on Solaris 8
Date: Sun, 23 Apr 2006 01:56:41 -0700
User-agent: Gnus/5.1007 (Gnus v5.10.7) Emacs/21.4 (gnu/linux)

I have run "sh -n testsuite" on CVS autoconf on four Solaris 8 hosts.
Two were slow and two were fast.  The slow ones had a ufs /tmp (with
no logging, which if memory serves was the Solaris 8 default
installation), and the fast ones had a tmpfs /tmp.  I suspect this is
the problem, as "sh -n testsuite" creates zillions of /tmp files.

Upgrading to the latest Solaris 8 /bin/sh patch didn't affect things.

I found one amusing performance problem on Solaris 8 that is probably
common on other hosts.  ZSH_VERSION is not set, so you'd expect the
following shell code to run pretty fast:

        if test -n "${ZSH_VERSION+set}" && (emulate sh) >/dev/null 2>&1; then
          emulate sh
          # Zsh 3.x and 4.x performs word splitting on ${1+"$@"}, which
          # is contrary to our usage.  Disable this feature.
          alias -g '${1+"$@"}'='"$@"'
          setopt NO_GLOB_SUBST

since it can all be done in the shell, without looking at the file
system.  Wrong.  Solaris 8 /bin/sh stats for /bin/emulate,
/usr/bin/emulate, /usr/ccs/bin/emulate, etc., and similarly for the
alias and setopt commands, even though 'emulate', 'alias', and
'setopt' are never executed.  If you have a long PATH (and I do), and
if you use NFS heavily (which our systems do), this can get fairly
slow fairly quickly.

The general idea here, I guess, is that you can't assume that /bin/sh
won't look for a command in the PATH simply because your shell code
never executes the command.

reply via email to

[Prev in Thread] Current Thread [Next in Thread]