Follow @Openwall on Twitter for new release announcements and other news
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <1239230573.2518325.1588201396045@mail.yahoo.com>
Date: Wed, 29 Apr 2020 23:03:15 +0000 (UTC)
From: oayz <oayz@...oo.com>
To: john-users@...ts.openwall.com
Subject: Re: Reduce CPU load. Is it possible?

 > When you do use it on Windows, how many OpenMP threads does JtR say it runs?
I have 4 cores. Running all 4 as    start /affinity 0xffffffff \JOHN\run\john.exe
 (left side of plots) than with only cores 3 and 4 as    start /affinity 0xfffffffe \JOHN\run\john.exe
(right side)
But in both cases JtR says "will use 4 OpenMP threads"



    On Wednesday, April 29, 2020, 12:33:21 PM PDT, Solar Designer <solar@...nwall.com> wrote:  
 
 On Wed, Apr 29, 2020 at 05:17:52PM +0000, oayz wrote:
>  If you indeed want to spare some CPU and are running Windows on multiple core CPU than you can use start's "affinity" mask to specify how many cores are allocated to JtR. Examples:
> Use all but one core (don't use core#1):start /affinity 0xfffffffe \JOHN\run\john.exe
> 
> Use only 3 cores (1,2,3):start /affinity 0x07 \JOHN\run\john.exe

I'm not on Windows and I've never tried the above, but I am concerned
this might result in the OpenMP implementation that JtR uses thinking
you have more CPUs than you let it use, resulting in highly unoptimal
use of whatever CPUs you do let JtR use (you might see 100% load on
those cores, but actually much of the CPU time would be wasted on
synchronization between the too many threads).  When you do use it on
Windows, how many OpenMP threads does JtR say it runs?

OpenMP libraries provide their own ways to set CPU affinity (e.g., via
the GOMP_CPU_AFFINITY environment variable when using libgomp), but they
(also?) do not limit the number of threads (which is something you need
to tell OpenMP to do separately, via OMP_NUM_THREADS).

While the example commands I provided are for a Unix shell, they should
also work as-is in the Cygwin shell, and the OMP_NUM_THREADS environment
variable may be set from whatever other shell using that shell's proper
commands, e.g. "set OMP_NUM_THREADS=7" before running "john".

Alexander
  
Content of type "text/html" skipped

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.