------- Comment #14 from solar-gcc at openwall dot com  2010-07-02 01:39 -------
We're also seeing this problem on OpenMP-using code built with gcc 4.5.0
release on linux-x86_64.  Here's a user's report (400x slowdown on an 8-core
system when there's a single other process running on a CPU):

http://www.openwall.com/lists/john-users/2010/06/30/3

Here's my confirmation of the problem report (I easily reproduced similar
slowdowns), and workarounds:

http://www.openwall.com/lists/john-users/2010/06/30/6

GOMP_SPINCOUNT=10000 (this specific value) turned out to be nearly optimal in
cases affected by this problem, as well as on idle systems, although I was also
able to identify cases (with server-like unrelated load: short requests to many
processes, which quickly go back to sleep) where this setting lowered the
measured best-case speed by 15% (over multiple benchmark invocations), even
though it might have improved the average speed even in those cases.

All of this is reproducible with John the Ripper 1.7.6 release on Blowfish
hashes ("john --test --format=bf") and with the -omp-des patch (current
revision is 1.7.6-omp-des-4) on DES-based crypt(3) hashes ("john --test
--format=des").  The use of OpenMP needs to be enabled by uncommenting the
OMPFLAGS line in the Makefile.  JtR and the patch can be downloaded from:

http://www.openwall.com/john/
http://openwall.info/wiki/john/patches

To reproduce the problem, it is sufficient to have one other CPU-using process
running when invoking the John benchmark.  I was using a non-OpenMP build of
John itself as that other process.

Overall, besides this specific "bug", OpenMP-using programs are very sensitive
to other system load - e.g., unrelated server-like load of 10% often slows an
OpenMP program down by 50%.  Any improvements in this area would be very
welcome.  However, this specific "bug" is extreme, with its 400x slowdowns, so
perhaps it is to be treated with priority.

Jakub - thank you for your work on gcc's OpenMP support.  The ease of use is
great!


-- 

solar-gcc at openwall dot com changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
                 CC|                            |solar-gcc at openwall dot
                   |                            |com


http://gcc.gnu.org/bugzilla/show_bug.cgi?id=43706

Reply via email to