Follow @Openwall on Twitter for new release announcements and other news
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <20200429193248.GA11207@openwall.com>
Date: Wed, 29 Apr 2020 21:32:48 +0200
From: Solar Designer <solar@...nwall.com>
To: john-users@...ts.openwall.com
Subject: Re: Reduce CPU load. Is it possible?

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

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.