Follow @Openwall on Twitter for new release announcements and other news
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <20150817185754.GA2541@openwall.com>
Date: Mon, 17 Aug 2015 21:57:54 +0300
From: Solar Designer <solar@...nwall.com>
To: john-dev@...ts.openwall.com
Subject: Re: Sybase-PROP (Re: FMT_OMP_BAD)

On Mon, Aug 17, 2015 at 09:06:48PM +0300, Solar Designer wrote:
> On Sun, Aug 16, 2015 at 07:56:22PM +0200, magnum wrote:
> > On 2015-08-16 19:30, Solar Designer wrote:
> > >I just noticed that one format in the below 4.0 range isn't actually
> > >that fast.  So FAST_FORMATS_OMP wouldn't be appropriate for it.
> > >Instead, we need to figure out and correct whatever other scalability
> > >issue it has.  It's this one:
> > >
> > >[solar@...er run]$ OMP_NUM_THREADS=1 ./john -test -form=Sybase-PROP
> > >Warning: OpenMP is disabled; a non-OpenMP build may be faster
> > >Benchmarking: Sybase-PROP [salted FEAL-8 32/64]... DONE
> > >Many salts:     382976 c/s real, 382976 c/s virtual
> > >Only one salt:  380928 c/s real, 380928 c/s virtual
> > 
> > This is now https://github.com/magnumripper/JohnTheRipper/issues/1673
> 
> I found the main problem with this one: it turned out to be use of
> static variables (thus, shared between the threads) in feal8_plug.c:
> Rot2().  I'll post a patch for this and more shortly.

I've attached the patch.  There are many changes, but almost all of the
speedup comes from the replaced Rot2().

Non-OpenMP is only slightly faster than before:

[solar@...er run]$ ./john -test -form=sybase-prop
Benchmarking: Sybase-PROP [salted FEAL-8 32/64]... DONE
Many salts:     399104 c/s real, 399104 c/s virtual
Only one salt:  397312 c/s real, 397312 c/s virtual

but OpenMP scaling is now much better:

[solar@...er run]$ OMP_NUM_THREADS=1 ./john -test -form=sybase-prop
Warning: OpenMP is disabled; a non-OpenMP build may be faster
Benchmarking: Sybase-PROP [salted FEAL-8 32/64]... DONE
Many salts:     398464 c/s real, 398464 c/s virtual
Only one salt:  396672 c/s real, 396672 c/s virtual

[solar@...er run]$ OMP_NUM_THREADS=10 ./john -test -form=sybase-prop
Will run 10 OpenMP threads
Benchmarking: Sybase-PROP [salted FEAL-8 32/64]... (10xOMP) DONE
Many salts:     3543K c/s real, 352541 c/s virtual
Only one salt:  3345K c/s real, 335904 c/s virtual

[solar@...er run]$ OMP_NUM_THREADS=16 ./john -test -form=sybase-prop
Will run 16 OpenMP threads
Benchmarking: Sybase-PROP [salted FEAL-8 32/64]... (16xOMP) DONE
Many salts:     5275K c/s real, 329316 c/s virtual
Only one salt:  4915K c/s real, 306433 c/s virtual

[solar@...er run]$ GOMP_CPU_AFFINITY=0-31 ./john -test -form=sybase-prop
Will run 32 OpenMP threads
Benchmarking: Sybase-PROP [salted FEAL-8 32/64]... (32xOMP) DONE
Many salts:     7786K c/s real, 243628 c/s virtual
Only one salt:  6815K c/s real, 212726 c/s virtual

magnum, please apply this.

Alexander

View attachment "john-SybasePROP-opt.diff" of type "text/plain" (14272 bytes)

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.