Follow @Openwall on Twitter for new release announcements and other news
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Date: Mon, 11 May 2015 19:58:14 +0200
From: Frank Dittrich <frank.dittrich@...lbox.org>
To: john-dev@...ts.openwall.com
Subject: Re: Adding OpenMP support to SunMD5

On 05/11/2015 06:42 PM, Solar Designer wrote:
> On Mon, May 11, 2015 at 05:36:31PM +0200, Frank Dittrich wrote:
>> Will run 512 OpenMP threads
>> Benchmarking: SunMD5 [MD5 128/128 AVX 4x3]... (512xOMP) DONE
>> Speed for cost 1 (iteration count) of 5000
>> Raw:	9309 c/s real, 300 c/s virtual
> 
> Great speed.
> 
>> This (higher c/s rate for OMP_NUM_THREADS >> number of cores) matches my
>> experience for sunmd5 on my hardware.
> 
> This suggests that "the problem" is false sharing or something like it.
> When you increase OMP_NUM_THREADS above the number of logical CPUs, you
> have the threads that are actually run on the CPUs concurrently (with
> the rest waiting to be scheduled by the kernel's scheduler) work on
> memory regions that are farther away from each other.

$ git diff
diff --git a/src/sunmd5_fmt_plug.c b/src/sunmd5_fmt_plug.c
index 059ef4c..8829858 100644
--- a/src/sunmd5_fmt_plug.c
+++ b/src/sunmd5_fmt_plug.c
@@ -32,7 +32,7 @@ john_register_one(&fmt_sunmd5);

 #ifdef _OPENMP
 #include <omp.h>
-#define OMP_SCALE 1
+#define OMP_SCALE 8
 #endif

 #include "arch.h"


This change alone results in

$ ../run/john --test=10 --format=sunmd5
Will run 32 OpenMP threads
Benchmarking: SunMD5 [MD5 128/128 AVX 4x3]... (32xOMP) DONE
Speed for cost 1 (iteration count) of 5000
Raw:	9990 c/s real, 312 c/s virtual


Frank

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.