------- Comment #17 from solar-gcc at openwall dot com  2010-08-24 11:07 -------
(In reply to comment #16)
> I would really like to see this bug tackled.

I second that.

> Fixing it is easily done by lowering the spin count as proposed.  Otherwise,
> please show cases where a low spin count hurts performance.

Unfortunately, yes, I've since identified real-world test cases where
GOMP_SPINCOUNT=10000 hurts performance significantly (compared to gcc 4.5.0's
default).  Specifically, this was the case when I experimented with my John the
Ripper patches on a dual-X5550 system (16 logical CPUs).  On a few
real-world'ish runs, GOMP_SPINCOUNT=10000 would halve the speed.  On most other
tests I ran, it would slow things down by about 10%.  That's on an otherwise
idle system.  I was surprised as I previously only saw GOMP_SPINCOUNT=10000
hurt performance on systems with server-like unrelated load (and it would help
tremendously with certain other kinds of load).

> In general, for a tuning parameter, a good-natured rather value should be
> preferred over a value that gives best results in one case, but very bad ones
> in another case.

In general, I agree.  Even the 50% worse-case slowdown I observed with
GOMP_SPINCOUNT=10000 is not as bad as the 400x worst-case slowdown observed
without that option.  On the other hand, a 50% slowdown would be fatal as it
relates to comparison of libgomp vs. competing implementations.  Also, HPC
cluster nodes may well be allocated such that there's no other load on each
individual node.  So having the defaults tuned for a system with no other load
makes some sense to me, and I am really unsure whether simply changing the
defaults is the proper fix here.

I'd be happy to see this problem fixed differently, such that the unacceptable
slowdowns are avoided in "both" cases.  Maybe the new default could be to
auto-tune the setting while the program is running?

Meanwhile, if it's going to take a long time until we have a code fix, perhaps
the problem and the workaround need to be documented prominently.


-- 


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

Reply via email to