|
Message-ID: <20150509113125.GA28913@openwall.com> Date: Sat, 9 May 2015 14:31:25 +0300 From: Solar Designer <solar@...nwall.com> To: john-dev@...ts.openwall.com Subject: Re: Adding OpenMP support to SunMD5 Lei, On Sat, May 09, 2015 at 11:36:55AM +0800, Lei Zhang wrote: > > On May 9, 2015, at 10:00 AM, Solar Designer <solar@...nwall.com> wrote: > >> [lei@...er src]$ ../run/john --test --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: 5907 c/s real, 194 c/s virtual > > > > Note that this is only ~11x faster than single-thread speed. It should > > be ~15x+ faster. > > Now I dropped those threadprivate stuffs. The three dynamic arrays are now enlarged to be shared by all threads, and another two static arrays are moved into stack. But the performance doesn't get better: > > [lei@...er src]$ ../run/john --test --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: 4954 c/s real, 162 c/s virtual > > [lei@...er src]$ OMP_NUM_THREADS=1 ../run/john --test --format=sunmd5 > Warning: OpenMP is disabled; a non-OpenMP build may be faster > Benchmarking: SunMD5 [MD5 128/128 AVX 4x3]... DONE > Speed for cost 1 (iteration count) of 5000 > Raw: 528 c/s real, 528 c/s virtual > > Hints? Please try the hints from super's /etc/motd, in particular "export GOMP_CPU_AFFINITY=0-31" Does it help? Other than that, it is possible that you ran into false sharing. Having a gap between the different threads' data structures can be beneficial. Alexander
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.