Modern GPUs transform password cracking from hours to minutes. This lesson covers how to harness GPU parallel processing in Hashcat, tune performance, manage thermals, and troubleshoot common issues.
CPUs are designed for complex sequential tasks with a few powerful cores. GPUs contain thousands of smaller cores optimized for parallel computation — perfect for hashing.
Example: An NVIDIA RTX 4090 can compute ~160 billion MD5 hashes per second. A high-end CPU manages ~5 billion. That is a 32x difference on a single GPU.
Before using GPU acceleration, your system must have the correct drivers and compute frameworks installed.
nvidia-smiclinfoUse hashcat -I to list all available compute devices on your system.
# List all OpenCL/CUDA devices
hashcat -I
Sample output:
OpenCL Info:
============
Platform ID #1
Name.....: NVIDIA CUDA
Vendor...: NVIDIA Corporation
Device ID #1
Name...........: NVIDIA GeForce RTX 4090
Type...........: GPU
Memory.........: 24564 MB
OpenCL Version.: OpenCL 3.0 CUDA
Platform ID #2
Name.....: Intel(R) OpenCL
Device ID #2
Name...........: Intel(R) Core(TM) i9-13900K
Type...........: CPU
Device IDs matter. Use these IDs with -d to target specific devices.
The -D flag selects the device type. Use -D 2 to target GPUs exclusively.
# Dictionary attack on GPU
hashcat -m 0 -a 0 -D 2 -o results.txt hashes.txt rockyou.txt
| Flag | Value | Description |
|---|---|---|
-D 1 | CPU | Use CPU only |
-D 2 | GPU | Use GPU only |
-D 1,2 | CPU + GPU | Use both (not always optimal) |
# Use only GPU devices 1 and 2
hashcat -m 0 -a 0 -D 2 -d 1,2 hashes.txt rockyou.txt
The -w flag controls how aggressively Hashcat uses the GPU. Higher profiles yield faster speeds but can make the system unresponsive.
| Profile | Name | Description | Use Case |
|---|---|---|---|
-w 1 | Low | Minimal GPU usage | Desktop remains usable |
-w 2 | Medium | Default balance | Background cracking |
-w 3 | High | Aggressive GPU usage | Dedicated cracking rig |
-w 4 | Maximum | Full GPU saturation | Headless server, no display |
# High workload profile
hashcat -m 0 -a 3 -D 2 -w 3 hashes.txt ?a?a?a?a?a?a
Warning: Profile -w 4 can cause display freezes and system instability on machines with a single GPU that also drives the display.
Hashcat provides built-in thermal management to protect your hardware.
# Abort if GPU reaches 85C, throttle to stay under 75C
hashcat -m 0 -a 0 -D 2 \
--gpu-temp-abort=85 \
--gpu-temp-retain=75 \
hashes.txt rockyou.txt
--gpu-temp-abort=N — Immediately stop if any GPU reaches N degrees Celsius--gpu-temp-retain=N — Dynamically throttle speed to keep the GPU at or below N degreesnvidia-smi -l 1 (NVIDIA) or watch -n1 sensors (Linux).Advanced flags for fine-tuning GPU performance:
| Flag | Description | Notes |
|---|---|---|
-n | Kernel accel (threads per block) | NVIDIA tuning; higher = more parallelism |
-u | Kernel loops (work blocks) | AMD tuning; controls work granularity |
-T | Kernel threads (vector width) | Number of vector elements per thread |
# Run for at most 1 hour, show status every 60 seconds
hashcat -m 0 -a 3 -D 2 \
--runtime=3600 \
--status-timer=60 \
hashes.txt ?a?a?a?a?a?a
Tip: Let Hashcat auto-tune first (-w 3 without -n/-u/-T). Only manually tune if you understand your GPU architecture and need to squeeze out the last few percent.
Common GPU issues and solutions:
-w 3 or -w 4)-D 2 (not CPU)--gpu-temp-retain=75-d to select specific devicesnvidia-smihashcat -I and system tools-D 2-w 1 through -w 4