Severe regression in wine startup latencies

Alan W. Irwin irwin at beluga.phys.uvic.ca
Sat Aug 27 19:22:13 CDT 2011


The startup latency of commands run under wine-1.3.27 is much worse than it
used to be.

I did the following experiment with bash-3.1.17 that you get with the
latest (mingw-get-inst-20110802.exe) MinGW/MSYS installer.

wineconsole --backend=curses MinGW/msys/1.0/bin/bash.exe

Then I ran the following commands within that MSYS bash environment.

bash.exe-3.1$ which echo
/z/home/wine/newstart1/MinGW/msys/1.0/bin/echo.exe

bash.exe-3.1$ time echo "hello"
hello

real    0m0.000s
user    0m0.000s
sys     0m0.000s

This shows there is at least one command (echo) available under wine
that executes with essentially zero latency.  So the problem cannot be
the time wine takes to read the executable file
(/z/home/wine/newstart1/MinGW/msys/1.0/bin/echo.exe in this case). But
the rest of the commands I tried had latencies near 1 second.  (I only
report the second run in each case to make sure as much as possible is
cached in memory for maximum speed.)

bash.exe-3.1$ time bash --version
GNU bash, version 3.1.17(1)-release (i686-pc-msys)
Copyright (C) 2005 Free Software Foundation, Inc.

real    0m0.905s
user    0m0.160s
sys     0m0.060s


bash.exe-3.1$ time cmake-2.8.5-win32-x86/bin/cmake --version
cmake version 2.8.5

real    0m0.922s
user    0m0.080s
sys     0m0.020s

bash.exe-3.1$ time make --version
GNU Make 3.81
Copyright (C) 2006  Free Software Foundation, Inc.
This is free software; see the source for copying conditions.
There is NO warranty; not even for MERCHANTABILITY or FITNESS FOR A
PARTICULAR PURPOSE.

This program built for i686-pc-msys

real    0m0.540s
user    0m0.100s
sys     0m0.020s

bash.exe-3.1$ time gcc --version
gcc.exe (GCC) 4.5.2
Copyright (C) 2010 Free Software Foundation, Inc.
This is free software; see the source for copying conditions.  There
is NO
warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR
PURPOSE.


real    0m0.901s
user    0m0.080s
sys     0m0.040s

Those are horrendous latencies.  The last time I did such tests
(for wine-1.3.9) the corresponding latency numbers were almost an order of magnitude
better, and Linux latencies were two orders (!) of magnitude better
than these.

==============Linux latency results here

To prove those Linux latency results once again
here are the corresponding results under Linux:

wine at raven> which echo
/bin/echo
wine at raven> time echo "hello"
hello

real    0m0.000s
user    0m0.000s
sys     0m0.000s

wine at raven> time bash --version
GNU bash, version 4.1.5(1)-release (x86_64-pc-linux-gnu)
Copyright (C) 2009 Free Software Foundation, Inc.
License GPLv3+: GNU GPL version 3 or later
<http://gnu.org/licenses/gpl.html>

This is free software; you are free to change and redistribute it.
There is NO WARRANTY, to the extent permitted by law.

real    0m0.001s
user    0m0.004s
sys     0m0.000s

wine at raven> time cmake --version
cmake version 2.8.2

real    0m0.008s
user    0m0.004s
sys     0m0.008s

wine at raven> time make --version
GNU Make 3.81
Copyright (C) 2006  Free Software Foundation, Inc.
This is free software; see the source for copying conditions.
There is NO warranty; not even for MERCHANTABILITY or FITNESS FOR A
PARTICULAR PURPOSE.

This program built for x86_64-pc-linux-gnu

real    0m0.001s
user    0m0.004s
sys     0m0.000s

wine at raven> time gcc --version
gcc (Debian 4.4.5-8) 4.4.5
Copyright (C) 2010 Free Software Foundation, Inc.
This is free software; see the source for copying conditions.  There
is NO
warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR
PURPOSE.


real    0m0.001s
user    0m0.000s
sys     0m0.000s

==========End of Linux latency results

I compiled wine-1.3.27 with -O3, and I run it with the wineserver
turned on and

export WINEDEBUG='fixme-all'

Why is its command startup latency typically an order of magnitude
worse than previous wine versions (1.3.9 is the one I previously
tested in detail), and ~two orders of magnitude worse than the Linux
case?

Although startup latencies are not much of an issue if you are running
just one command such as a game, they are a serious issue for those
like me attempting to build software on the wine platform.  I
previously complained here about this issue for cmake-1.3.9 where
cmake configuration and make commands were roughly 2-3 times slower
than the corresponding Linux case because both commands execute _a
lot_ of subcommands where latency delays accumulate like crazy.  But
now that the wine-1.3.27 latency is 10 times worse than in the 1.3.9
case, typical cmake configurations are something like 25 (!) times
slower than the corresponding Linux command.

What can be done to address this bad command-startup latency
regression for wine?

I would be happy to run any tests that might point to a solution. For
example, I did run "top" from time to time while running the very long
cmake configuration step, and the cpu's (I have a duo core system)
were mostly idle indicating the latency bottleneck (whatever it is)
does not involve excessive amounts of cpu time.  However, wineserver
was always high in the "top" list of commands that were grabbing the
most cpu.

If wine sets up a detailed GUI environment for every command it
runs is there an easy way to turn that off in case that is
the cause of the startup latency?  (All the builds I want
to do on the MinGW/MSYS/wine platform are strictly from the MSYS bash
command line with no GUI required.)

Alan
__________________________
Alan W. Irwin

Astronomical research affiliation with Department of Physics and Astronomy,
University of Victoria (astrowww.phys.uvic.ca).

Programming affiliations with the FreeEOS equation-of-state
implementation for stellar interiors (freeeos.sf.net); the Time
Ephemerides project (timeephem.sf.net); PLplot scientific plotting
software package (plplot.sf.net); the libLASi project
(unifont.org/lasi); the Loads of Linux Links project (loll.sf.net);
and the Linux Brochure Project (lbproject.sf.net).
__________________________

Linux-powered Science
__________________________



More information about the wine-devel mailing list