Follow @Openwall on Twitter for new release announcements and other news
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Date: Sat, 21 Jan 2012 02:15:24 +0400
From: Solar Designer <>
Subject: Re: DES with OpenMP

On Fri, Jan 20, 2012 at 09:35:26PM +0000, Alex Sicamiotis wrote:
> ...the OMP version is scoring +200k in many salts over the noOMP despite threads=1,


> when it should be equal.

No, it should not.  It should be close, but not equal.  Normally, OpenMP
build running with 1 thread is slightly slower than non-OpenMP build,
but it can also be the other way around.  The code is different in many
ways.  Even the chunk size (number of passwords being hashed per
crypt_all() call) differs by a factor of 32 between these builds.
Normally, this hurts performance when you don't actually run multiple
threads, but in certain builds and on certain machines it can be the
other way around as you have seen.

> This implies a boost from the second core

No, it does not.

> (and top confirms this boost).

It is tricky to actually confirm that with top.  I think you're seeing
what you expect to see rather than what actually happens.

> Note that this is with icc and the intel openmp library. The gap on GCC is even larger (fresh GCC build / -O2 -march=nocona / ASM=0) :

The gap on gcc is caused by the gcc 4.6 performance regression (compared
to older versions of gcc), which is mostly mitigated in the OpenMP build
(register allocation differs).  This was already known to me.

> These extra 700/400k (many/one salt) are from the second cpu thread despite the threads=1.

That's merely your guess, but it's a wrong one.

For icc, I am in doubt regarding your theory - it _might_ be right
(although probably it is not).  For gcc, I had experimented with this
myself, I saw a similar performance difference (on 4.6.x), and I know
that its cause is not use of a second core.


Powered by blists - more mailing lists

Confused about mailing lists and their use? Read about mailing lists on Wikipedia and check out these guidelines on proper formatting of your messages.