mirror of
https://github.com/openwall/john.git
synced 2026-12-03 18:45:21 +07:00
[GH-ISSUE #829] extremely varying run times for some dynamic formats when using OMP_NUM_THREADS and --fork #441
Labels
No labels
bug
core branch
documentation
enhancement
enhancement
fixed - pending verify
fuzz bug
good first issue
invalid
invalid
maintenance/cleanup
new cracking mode
new format
new tool
non-trivial
notes/external issues
portability
question
RFC / discussion
testing
WONTFIX
No milestone
No project
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set.
Reference
openwall/john#441
Loading…
Add table
Add a link
Reference in a new issue
No description provided.
Delete branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Originally created by @frank-dittrich on GitHub (Oct 26, 2014).
Original GitHub issue: https://github.com/openwall/john/issues/829
Not sure whether this is to be expected or not. but so far, I only noticed this for dynamic formats.
I'm not sure whether salted formats are more affected, or whether the saltless formats are just too fast to notice such an extreme slowdown.
Adding --skip-self-tests to -passthru makes no difference.
This is on a 64bit linux system with a quad core without hyperthreading:
So, with --fork and a "high enough" number of forked processed, any value for OMP_NUM_THREADS that is greater than the default number of OMP threads works as expected.
But --fork combined with OMP_NUM_THREADS equal to (or a little lower than) the default value causes a massive performance hit.
With lover values for --fork, it gets somewhat better:
@frank-dittrich commented on GitHub (Oct 26, 2014):
On a quad code with HT (default OMP_NUM_THREADS = 8), I get
So, 9 forked processes with 9 threads each work OK, but 9 forked processes with 8 threads cause a performance hit.
@frank-dittrich commented on GitHub (Oct 26, 2014):
I suspected that it might somehow be related to
Max. keys per crypt 6144for dynamic_1.But when I reduce max keys per crypt to 10 using
--mkpc=10, the performance hit did not dissapear.The (now increased) run time between 3 and 8 seconds jumps to 554 seconds for OMP_NUM_THREADS=4 (quad core without hyperthreading).
@magnumripper commented on GitHub (Oct 26, 2014):
Overbooking your CPU cores using --fork is not a big problem but ANY overbooking when running OMP usually results in significant performance drop. So I am not sure this qualifies as an issue at all, unless I totally misunderstand the description.
@frank-dittrich commented on GitHub (Oct 26, 2014):
I am also not sure, but:
--fork==9 OMP_NUM_THREADS=5: Time used was 1 seconds
--fork==9 OMP_NUM_THREADS=4: Time used was 53 seconds
@magnumripper commented on GitHub (Oct 26, 2014):
Yeah it fluctuates a lot. But what if you re-run the exact same tests? Maybe the ones that take forever are totally different ones? Or is it reproducible?
@frank-dittrich commented on GitHub (Oct 26, 2014):
Definitely Reproducable. The worst is the OMP_NUM_THREADS that corresponds to OMP_NUM_THREADS=0, and the order of magnitude of the performance regression is also always nearly the same as in the examples copied in the first 2 comments.
@jfoug commented on GitHub (Oct 27, 2014):
this could likely be due to how I chunk the buffers out to the OMP children. Dyna HAS to be done that way, since I have OMP overhead on each function. If I did not chunk like that, dyna would have no gain (at times even loss), due to so much parameter passing.
@frank-dittrich commented on GitHub (Oct 27, 2014):
Then this issue should just be closed as invalid.
If it is easy to detect such OMP overload, we could print a warning to stderr (and log file).
But if it is not that easy, just leave everything as it is. After all, users are not supposed to combine OMP_NUM_THREADS and --fork to create such an overload.
Initially, I thried these runs to find correctness issues, and just stumbled across the huge performance regressions.