[Benchmark] Apple M5 Ultra Metal WPA2 tuning
#1
Hi, sharing some WPA2 results from an Apple M5 Ultra using Metal 4 and hashcat 8.0.0 on macOS 27.2.

This used the same source build for each run, mode 22000, attack mode 0, the pure kernel and workload profile 4. The input was hashcat's public PMKID self test vector and one million synthetic eight digit candidates with best66.rule. Each full run checked 66 million candidates with none rejected. The order was baseline, tuned, tuned, baseline.

Full run time and end to end speed, including startup and autotuning:

Baseline: 72.237 seconds, 913.7 k candidates per second
Tuned: 69.299 seconds, 952.4 k candidates per second
Tuned: 67.634 seconds, 975.8 k candidates per second
Baseline: 71.362 seconds, 924.9 k candidates per second

Average time was 71.800 seconds baseline and 68.467 seconds tuned. That is 4.64% less time, or 4.87% higher end to end throughput.

Four 30 second runs per setting gave these hashcat device speeds in kH/s:

Baseline: 961.0, 963.5, 956.2, 954.0
Tuned: 1003.2, 1019.6, 1020.7, 998.5

The tuned runs used this local tuning database row. The baseline had no local row. Loops were left to autotune and the controlled tests did not use --force.

Apple_M5_Ultra 0 22000 1 512 A

The known answer test passed with the tuned setting. These runs were on a live desktop, so GPU activity was not controlled. Two full runs per setting are a small sample.

Some earlier short benchmark results in kH/s:

Auto: 959.6
Accel 64: 922.3
Accel 128: 971.3
Accel 128 with 1024 loops: 979.2
Accel 256: 991.1
Accel 512: 1013.1
32 threads: 943.8
128 threads requested: 959.1 with 64 actually used
Two virtual devices: 855.6 combined
Four virtual devices: 1010.3 combined

The manual settings in those exploratory benchmark runs used --force. In earlier 20 second wordlist tests, auto gave 959.6 and 951.3 kH/s, accel 512 gave 1017.2, 976.8 and 962.3, and accel 1024 gave 963.3 and 1017.1.

An earlier Homebrew OpenCL benchmark reported 1013.2 kH/s and the first source build Metal benchmark reported 962.3. Those used different builds and settings, so they are not a controlled backend comparison. The Homebrew Metal build could not find an include file during kernel compilation even though it existed, while the local source build worked.
Reply
#2
I ran your test on a Radeon Pro W5700X under Metal using the PMKID self test hash, one million eight digit words, and best66.rule. With that workload, your accel 512 row is 1.1 to 1.3 percent faster than autotune on both 8.0.0 and current master. About half of that comes from the loop kernel running slightly faster with more, shorter work items. The other half comes from spreading the part of each rule pass outside the loop kernel over more candidates. I would like to see where the 4.9 percent difference comes from on the M5 Ultra before changing autotune.

Could you please build current master from GitHub and run the same test there, with your tuning db row removed and using your own file names? Any autotune change would go into master, and on Apple silicon master also builds the Metal kernels at a different optimization level from 8.0.0, so the master numbers are the relevant comparison. Please post the line starting with AT3, the last line starting with Speed.#01, and the last two lines starting with [host]. The value in brackets on the Speed.#01 line shows how long each launch took.

Quote:git clone https://github.com/hashcat/hashcat.git
cd hashcat
make
HASHCAT_AUTOTUNE2_VERBOSE=1 ./hashcat -m 22000 -a 0 -w 4 --pipeline-stats --runtime 60 hash.22000 words.txt -r rules/best66.rule

Then the same with your accel 512 row copied into the tunings folder of that build, and HASHCAT_PIPE=5 set as well. A pass takes a few seconds there, and without it the report comes only every 50 passes:

Quote:HASHCAT_PIPE=5 HASHCAT_AUTOTUNE2_VERBOSE=1 ./hashcat -m 22000 -a 0 -w 4 --pipeline-stats --runtime 60 hash.22000 words.txt -r rules/best66.rule

The Homebrew build that could not find an include file is #5072: https://github.com/hashcat/hashcat/issues/5072. On macOS 27, Apple's Metal compiler only opens include files below the folder containing the hashcat binary. An installed hashcat keeps its kernels beside that folder rather than below it, so every kernel build fails, while a source build works. Current master works around this, and the next release will include the fix.
Reply