Follow @Openwall on Twitter for new release announcements and other news
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <aff6177dd379df5254bc51d6d1c4ed57@smtp.hushmail.com>
Date: Fri, 19 Apr 2013 19:40:56 +0200
From: magnum <john.magnum@...hmail.com>
To: john-dev@...ts.openwall.com
Subject: Re: Re: minor raw-sha1-ng pull request

On 19 Apr, 2013, at 19:22 , magnum <john.magnum@...hmail.com> wrote:
> OK, I get this for non-OMP build:
> Benchmarking: Raw SHA-1 (pwlen <= 15) [128/128 AVX intrinsics 4x]... DONE
> Raw:	23784K c/s real, 23784K c/s virtual
> 
> And this for OMP-build but running 1 core:
> Benchmarking: Raw SHA-1 (pwlen <= 15) [128/128 AVX intrinsics 4x]... DONE
> Raw:	23553K c/s real, 23553K c/s virtual
> 
> That's fine. But trying to use more cores does not work well:
> Benchmarking: Raw SHA-1 (pwlen <= 15) [128/128 AVX intrinsics 4x]... (4xOMP) DONE
> Raw:	16872K c/s real, 9373K c/s virtual
> 
> 
> I see you already have SHA1_PARALLEL_HASH of 512. Look at init() in raw-sha256-ng and try to mimic that - you probable want to use an OMP_SCALE of 3 and the number of keys would be actual number of cores in use * OMP_SCALE * SHA1_PARALLEL_HASH. I bet this will give much better results. But this means you need to dynamically allocate the buffers.

I tried this, have a look at 12b881e.

Now I get this on core i7:

$ for OMP_NUM_THREADS in 1 2 4 8; do ../run/john -t -fo:raw-sha1-ng; done
Benchmarking: Raw SHA-1 (pwlen <= 15) [128/128 AVX intrinsics 4x]... DONE
Raw:	24018K c/s real, 24018K c/s virtual

Benchmarking: Raw SHA-1 (pwlen <= 15) [128/128 AVX intrinsics 4x]... (2xOMP) DONE
Raw:	40424K c/s real, 23067K c/s virtual

Benchmarking: Raw SHA-1 (pwlen <= 15) [128/128 AVX intrinsics 4x]... (4xOMP) DONE
Raw:	62259K c/s real, 22156K c/s virtual

Benchmarking: Raw SHA-1 (pwlen <= 15) [128/128 AVX intrinsics 4x]... (8xOMP) DONE
Raw:	60817K c/s real, 13636K c/s virtual

Hype-Threading is useless as usual.


magnum

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.