[GH-ISSUE #375] Add FMT_OMP_BAD for formats that scale poorly. #113

Closed
opened 2026-10-14 02:53:16 +07:00 by bsakaguchi · 12 comments
Owner

Originally created by @magnumripper on GitHub (Sep 16, 2013).
Original GitHub issue: https://github.com/openwall/john/issues/375

LM has FMT_OMP_BAD. The only effect this flag has is a warning/notice that it might be better using --fork. We could add this for some raw formats (including select dynamic ones).

Note that it should be (FMT_OMP | FMT_OMP_BAD) and not just the latter (unless we change the definition in formats.h so FMT_OMP_BAD includes FMT_OMP).

Originally created by @magnumripper on GitHub (Sep 16, 2013). Original GitHub issue: https://github.com/openwall/john/issues/375 LM has FMT_OMP_BAD. The only effect this flag has is a warning/notice that it might be better using --fork. We could add this for some raw formats (including select dynamic ones). Note that it should be (FMT_OMP | FMT_OMP_BAD) and not just the latter (unless we change the definition in formats.h so FMT_OMP_BAD includes FMT_OMP).
bsakaguchi 2026-10-14 02:53:16 +07:00
Author
Owner

@kholia commented on GitHub (Sep 17, 2013):

Sounds like a good idea. Lot of my formats have OMP scaling problems.

<!-- gh-comment-id:24568348 --> @kholia commented on GitHub (Sep 17, 2013): Sounds like a good idea. Lot of my formats have OMP scaling problems.
Author
Owner

@magnumripper commented on GitHub (Sep 30, 2013):

ce8104f added it for nt2, raw-md4 and raw-md5.

<!-- gh-comment-id:25333078 --> @magnumripper commented on GitHub (Sep 30, 2013): ce8104f added it for nt2, raw-md4 and raw-md5.
Author
Owner

@magnumripper commented on GitHub (Jan 9, 2014):

@jfoug it should be added for a number of dynamic formats too. If we have this in place we can make a john.conf option for automatically setting OMP_NUM_THREADS=1 for these formats if you run a machine that scales really poor (some AMDs I've seen perform like sh!t using OMP for raw fast formats).

<!-- gh-comment-id:31905863 --> @magnumripper commented on GitHub (Jan 9, 2014): @jfoug it should be added for a number of dynamic formats too. If we have this in place we can make a john.conf option for automatically setting OMP_NUM_THREADS=1 for these formats if you run a machine that scales really poor (some AMDs I've seen perform like sh!t using OMP for raw fast formats).
Author
Owner

@kholia commented on GitHub (Jan 10, 2014):

@magnumripper

How do I "mark" a format to say that it scales well with OMP?

Should we have "FMT_OMP_GOOD" flag too or is adding a comment to the format enough?

<!-- gh-comment-id:31999687 --> @kholia commented on GitHub (Jan 10, 2014): @magnumripper How do I "mark" a format to say that it scales well with OMP? Should we have "FMT_OMP_GOOD" flag too _or_ is adding a comment to the format enough?
Author
Owner

@magnumripper commented on GitHub (Jan 10, 2014):

You just do not set FMT_OMP_BAD. There would be no sense in adding an inverted flag for that.

<!-- gh-comment-id:32035263 --> @magnumripper commented on GitHub (Jan 10, 2014): You just do not set FMT_OMP_BAD. There would be no sense in adding an inverted flag for that.
Author
Owner

@kholia commented on GitHub (Jan 10, 2014):

I do not want to test each and every format for bad OMP behaviour. How do I skip over formats which are known to be good already?

<!-- gh-comment-id:32037322 --> @kholia commented on GitHub (Jan 10, 2014): I do not want to test each and every format for bad OMP behaviour. How do I skip over formats which are known to be good _already_?
Author
Owner

@magnumripper commented on GitHub (Jan 11, 2014):

In general you can tell from the raw speed. NT is like 50Mc/s on one core so scales like crap. DCC2 is like 1Kc/s so scales nearly linearly.

<!-- gh-comment-id:32082924 --> @magnumripper commented on GitHub (Jan 11, 2014): In general you can tell from the raw speed. NT is like 50Mc/s on one core so scales like crap. DCC2 is like 1Kc/s so scales nearly linearly.
Author
Owner

@magnumripper commented on GitHub (Jan 11, 2014):

But if you want to test all formats, I'd just --test all of them in non-OMP and output to file, then again with OMP to another file. Then use relbench.pl with -v to look for formats that scale poorly (ignore many-salts figures).

<!-- gh-comment-id:32083059 --> @magnumripper commented on GitHub (Jan 11, 2014): But if you want to test all formats, I'd just --test all of them in non-OMP and output to file, then again with OMP to another file. Then use relbench.pl with `-v` to look for formats that scale poorly (ignore many-salts figures).
Author
Owner

@jfoug commented on GitHub (Nov 22, 2014):

Should the format do anything other than setting the flag? Will john core handle switching OMP on and off at some later time? The reason I ask, is because there is a granularity computation done at the time I build the format structures (WAY before any call to init), so it would be nice to know that a certain format was NOT going to be OMP, so that the count set properly for non OMP runs.

<!-- gh-comment-id:64077928 --> @jfoug commented on GitHub (Nov 22, 2014): Should the format do anything other than setting the flag? Will john core handle switching OMP on and off at some later time? The reason I ask, is because there is a granularity computation done at the time I build the format structures (WAY before any call to init), so it would be nice to know that a certain format was NOT going to be OMP, so that the count set properly for non OMP runs.
Author
Owner

@magnumripper commented on GitHub (Nov 22, 2014):

OMP will still be enabled so that is probably not an issue. AFAIK the only thing this flag does is print a warning that -fork or MPI might be better.

But if we implement what I wrote in https://github.com/magnumripper/JohnTheRipper/issues/375#issuecomment-31905863, you might have to consider that.

<!-- gh-comment-id:64078038 --> @magnumripper commented on GitHub (Nov 22, 2014): OMP will still be enabled so that is probably not an issue. AFAIK the only thing this flag does is print a warning that -fork or MPI might be better. But if we implement what I wrote in https://github.com/magnumripper/JohnTheRipper/issues/375#issuecomment-31905863, you might have to consider that.
Author
Owner

@jfoug commented on GitHub (Nov 22, 2014):

c7896a1

Here are the ratios that were removed:

Ratio:  1.09911 real, 0.58414 virtual   dynamic_0:Raw
Ratio:  1.34124 real, 0.61349 virtual   dynamic_2:Raw
Ratio:  1.17945 real, 0.60563 virtual   dynamic_19:Raw
Ratio:  0.98809 real, 0.54766 virtual   dynamic_26:Raw
Ratio:  1.13546 real, 0.66361 virtual   dynamic_29:Raw
Ratio:  0.86690 real, 0.57858 virtual   dynamic_30:Raw
Ratio:  1.07254 real, 0.62223 virtual   dynamic_33:Raw
Ratio:  1.14616 real, 0.52435 virtual   dynamic_34:Raw
Ratio:  1.29800 real, 0.57241 virtual   dynamic_50:Raw
Ratio:  1.36331 real, 0.58498 virtual   dynamic_60:Raw
Ratio:  1.21349 real, 0.84015 virtual   dynamic_1003:Raw
Ratio:  1.29128 real, 0.56302 virtual   dynamic_1010:Raw
Ratio:  1.17113 real, 0.51233 virtual   dynamic_1023:Raw
Ratio:  1.27696 real, 0.65144 virtual   dynamic_1300:Raw
Ratio:  1.23700 real, 0.71297 virtual   dynamic_1400:Raw
Ratio:  0.97214 real, 0.54603 virtual   dynamic_2000:Raw
Ratio:  1.03767 real, 0.58008 virtual   pix-md5, Cisco PIX:Many salts
<!-- gh-comment-id:64079823 --> @jfoug commented on GitHub (Nov 22, 2014): c7896a1 Here are the ratios that were removed: ``` Ratio: 1.09911 real, 0.58414 virtual dynamic_0:Raw Ratio: 1.34124 real, 0.61349 virtual dynamic_2:Raw Ratio: 1.17945 real, 0.60563 virtual dynamic_19:Raw Ratio: 0.98809 real, 0.54766 virtual dynamic_26:Raw Ratio: 1.13546 real, 0.66361 virtual dynamic_29:Raw Ratio: 0.86690 real, 0.57858 virtual dynamic_30:Raw Ratio: 1.07254 real, 0.62223 virtual dynamic_33:Raw Ratio: 1.14616 real, 0.52435 virtual dynamic_34:Raw Ratio: 1.29800 real, 0.57241 virtual dynamic_50:Raw Ratio: 1.36331 real, 0.58498 virtual dynamic_60:Raw Ratio: 1.21349 real, 0.84015 virtual dynamic_1003:Raw Ratio: 1.29128 real, 0.56302 virtual dynamic_1010:Raw Ratio: 1.17113 real, 0.51233 virtual dynamic_1023:Raw Ratio: 1.27696 real, 0.65144 virtual dynamic_1300:Raw Ratio: 1.23700 real, 0.71297 virtual dynamic_1400:Raw Ratio: 0.97214 real, 0.54603 virtual dynamic_2000:Raw Ratio: 1.03767 real, 0.58008 virtual pix-md5, Cisco PIX:Many salts ```
Author
Owner

@magnumripper commented on GitHub (Sep 4, 2015):

I think @loverszhaokai addressed this during GSoC

<!-- gh-comment-id:137813212 --> @magnumripper commented on GitHub (Sep 4, 2015): I think @loverszhaokai addressed this during GSoC
Sign in to join this conversation.
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference
openwall/john#113
No description provided.