Openwall GNU/*/Linux - a small security-enhanced Linux distro for servers
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Date: Sun, 18 Mar 2012 04:45:24 +0400
From: Solar Designer <solar@...nwall.com>
To: john-dev@...ts.openwall.com
Subject: Re: SSH thread-safety

On Sun, Mar 18, 2012 at 02:14:03AM +0400, Solar Designer wrote:
> On Sat, Mar 17, 2012 at 10:01:19AM +0530, Dhiru Kholia wrote:
> > On Sat, Mar 17, 2012 at 9:45 AM, Solar Designer <solar@...nwall.com> wrote:
> > > The speed is slightly better than it was before this round of changes
> > > (that is, before your introduction of locking). :-)  I am getting almost
> > > 700k c/s on 8-core.  I am running the high thread count tests now.
> > 
> > Wish I had an 8-core (or 16-core) CPU. :-)
> 
> Actually, I run these tests on a dual quad-core machine now (so it has 8
> cores across two CPU chips), not on one 8-core CPU.  (I'll try on my
> so-called 8-core FX-8120 later.)

Here's what I get on FX-8120 at stock clocks (3.1 GHz base, 4.0 GHz turbo):

Non-OpenMP build:

user@...l:~/john/magnum-jumbo/src$ ../run/john -te -fo=ssh
Benchmarking: ssh [32/64]... DONE
Raw:    146448 c/s real, 146448 c/s virtual

OpenMP:

user@...l:~/john/magnum-jumbo/src$ ../run/john -te -fo=ssh
Benchmarking: ssh [32/64]... (8xOMP) DONE
Raw:    717852 c/s real, 89196 c/s virtual

user@...l:~/john/magnum-jumbo/src$ OMP_NUM_THREADS=1 ../run/john -te -fo=ssh
Benchmarking: ssh [32/64]... DONE
Raw:    146413 c/s real, 146413 c/s virtual

user@...l:~/john/magnum-jumbo/src$ OMP_NUM_THREADS=2 ../run/john -te -fo=ssh
Benchmarking: ssh [32/64]... (2xOMP) DONE
Raw:    267428 c/s real, 133374 c/s virtual

user@...l:~/john/magnum-jumbo/src$ OMP_NUM_THREADS=4 ../run/john -te -fo=ssh
Benchmarking: ssh [32/64]... (4xOMP) DONE
Raw:    455680 c/s real, 114168 c/s virtual

user@...l:~/john/magnum-jumbo/src$ OMP_NUM_THREADS=6 ../run/john -te -fo=ssh
Benchmarking: ssh [32/64]... (6xOMP) DONE
Raw:    553554 c/s real, 91613 c/s virtual

Assuming that non-OpenMP was at 4.0 GHz and 8 threads were at 3.1 GHz,
this is 79% efficiency:

717852/(146448*8*3.1/4) = 0.79

which is very good for a CPU that is not fully 8-core.

Without that assumption about CPU clock rate changes, there's only a
4.9x increase between one and 8 threads, though.

I might benchmark this with turbo disabled later.

Alexander

Powered by blists - more mailing lists

Your e-mail address:

Powered by Openwall GNU/*/Linux - Powered by OpenVZ