Home
Name Modified Size InfoDownloads / Week
stresslab.py < 20 hours ago 137.3 kB
README.md < 20 hours ago 13.1 kB
StressLab.exe < 20 hours ago 15.5 MB
requirements.txt 2026-02-24 71 Bytes
THIRD_PARTY_LICENSES 2026-02-24 7.3 kB
LICENSE 2026-02-23 1.1 kB
Totals: 6 Items   15.7 MB 28

StressLab v9.0

Internal Hardware Testing Suite for Windows

StressLab is an all-in-one hardware stress testing and verification tool built for PC builders, repair shops, and QA workflows. It runs sequential stress tests across CPU, RAM, GPU, VRAM, and Disk, with live temperature monitoring, speed benchmarking, and pass/fail reporting.

Windows Python License


Features

  • Sequential stress testing — run CPU → RAM → GPU → VRAM → Disk in order, or pick individual tests
  • Power mode — simultaneous CPU + GPU load for PSU/thermal stress testing
  • CPU stress — multi-process integer + float workload, targets 95%+ utilization across all cores
  • RAM verify — multi-threaded pattern testing with VirtualLock (pinned pages), uses memcmp for fast in-place verification with 5 test patterns + inversions
  • GPU stress — adaptive OpenGL raymarching shader that auto-tunes to ~95% GPU utilization
  • VRAM verify — integrates memtest_vulkan for Vulkan compute-based memory error detection (NVIDIA, AMD, Intel)
  • Disk verify — unbuffered write + readback verification with per-block latency measurement, bus-type-aware speed benchmarking, and configurable write cap
  • Live temperature monitoring — CPU and GPU temps via LibreHardwareMonitor (auto-downloaded), with peak tracking
  • Speed benchmarking — auto-detects NVMe vs SATA and warns on underperformance (NVMe <1800 MB/s, SATA <400 MB/s)
  • Auto-export — health and stress reports automatically saved to Documents\StressLab Reports\ on completion
  • Health checks — SMART disk health, driver status, BIOS age, Windows activation, BSoD history, and more
  • System info — CPU, RAM, GPU, OS build (with display version like 24H2), and disk summary
  • Export — generate timestamped certificates with pass/fail results (auto or manual)
  • Dark themed UI — modern dark interface built with tkinter

Requirements

  • OS: Windows 10 or 11 (x64)
  • Python: 3.10 or newer
  • GPU stress: OpenGL 3.3+ capable GPU and drivers (integrated or discrete)
  • VRAM test: Vulkan 1.1 capable GPU and drivers (any modern NVIDIA, AMD, or Intel GPU)
  • Disk test: Any SSD or HDD (unbuffered I/O requires no special drivers)
  • Temperatures: Admin recommended for full sensor access via LibreHardwareMonitor

Python Dependencies

psutil>=5.9.0
wmi>=1.5.1
pywin32>=306
moderngl>=5.8.0
glcontext>=2.5.0

Install with:

pip install -r requirements.txt

Note: moderngl and glcontext are used only for the GPU stress test (OpenGL shader). They are optional — if not installed, the GPU stress test will be unavailable but everything else works.

Auto-Downloaded Components

StressLab automatically downloads these components on first launch. No manual setup required.

Component Purpose Size License Source
LibreHardwareMonitorLib CPU/GPU temperature sensors ~4 MB MPL 2.0 GitHub
lhm_reader.exe C# helper compiled via csc.exe ~8 KB MIT (StressLab) Built locally
memtest_vulkan.exe VRAM error detection (Vulkan compute) ~600 KB zlib GitHub
  • LibreHardwareMonitor is prompted as a dialog on first launch (downloads DLL + compiles a small C# sensor reader using the system's csc.exe compiler)
  • memtest_vulkan downloads silently in the background on startup — ready by the time you need it
  • SSL certificate errors on some systems are handled automatically with a fallback

All downloaded files are stored in %LOCALAPPDATA%\StressLab\.

Usage

Run from source

python stresslab.py

For full temperature monitoring (recommended):

stresslab_admin.bat

Or right-click → Run as Administrator.

Build standalone EXE

build_exe.bat

Produces dist\StressLab.exe — a single-file executable with admin elevation built in.

Running a test

  1. Select which tests to run (CPU, RAM, GPU, VRAM, Disk) using the checkboxes
  2. Set the duration per test (5m, 15m, or 60m)
  3. Optionally set the disk write cap (200GB, 500GB, or 1TB) — default 200GB
  4. Click ▶ START
  5. Tests run sequentially — progress, temperatures, and metrics update live
  6. When complete, a pass/fail summary is shown in the log
  7. Reports auto-export to Documents\StressLab Reports\ (uncheck "Auto-export" to disable)
  8. Click Export for manual save-as to a custom location

Test Details

CPU Stress Spawns worker processes (one per logical core) running tight integer and floating-point loops. Targets 95%+ CPU utilization. Temperature is monitored throughout.

RAM Verify Allocates ~75% of available RAM using VirtualAlloc with VirtualLock (pins pages to physical RAM, preventing swapping). Runs 5 test patterns (Solid 0x00, Solid 0xFF, Checkerboard 0xAA, Checkerboard 0x55, Random) plus their bitwise inversions across multiple worker threads. Verification uses msvcrt.memcmp for fast in-place comparison — only falls back to byte-level inspection on mismatch. Reports error count and passes completed.

GPU Stress Renders a computationally expensive raymarching shader (SDF scene with reflections, refractions, soft shadows, ambient occlusion, and fractal noise). Adaptive algorithm adjusts shader complexity (ray steps and noise octaves) to maintain ~95% GPU utilization. Uses a background nvidia-smi poller thread for utilization feedback (no CPU impact from process spawning).

VRAM Verify Launches memtest_vulkan as a subprocess — a Vulkan compute-based memory tester that allocates as much VRAM as possible and writes/reads test patterns directly via compute shaders. Uses non-sequential memory access patterns designed to catch address bus errors that linear patterns miss. Reports iteration count, read/write bandwidth, and any bit-level errors detected. Works on any GPU with Vulkan 1.1 support.

Disk Verify Creates a temporary test file (25% of free space, up to 2GB) and performs unbuffered write + readback verification using the Windows CreateFileW API with FILE_FLAG_NO_BUFFERING | FILE_FLAG_WRITE_THROUGH — bypasses the entire OS filesystem cache so every write goes to NAND and every read comes from NAND.

Each pass:

  1. Writes 1MB blocks with a test pattern + position-dependent stamp
  2. Reads back each block, measures per-block latency, and verifies via memcmp
  3. Cycles through 5 patterns: Random (incompressible), 0xAA, 0x55, 0xFF, 0x00

What it catches that SMART misses:

  • Bad NAND cells — write succeeds but readback data differs
  • Degrading cells — blocks >10ms read latency (SSD needs internal retries)
  • Controller issues — data corruption in the I/O path
  • Fake/counterfeit drives — later blocks return garbage
  • Speed degradation — auto-detects NVMe vs SATA via WMI and warns if speeds fall below expected thresholds (NVMe <1800 MB/s, SATA <400 MB/s)

The write cap (200GB / 500GB / 1TB) limits total bytes written to protect drive endurance. A 200GB test uses ~0.03% of a typical 600 TBW SSD's lifetime. If the cap is reached before the timer expires, the test completes early automatically.

Power Mode Runs CPU stress and GPU stress simultaneously for maximum system-wide thermal and power delivery stress testing.

Auto-Export

When enabled (default), health check results and stress test certificates are automatically saved to:

%USERPROFILE%\Documents\StressLab Reports\

Filenames include the hostname and timestamp, e.g. StressLab_Stress_DESKTOP-ABC_20260226_143022.txt. The "Auto-export" checkbox appears on both the Health and Stress tabs. Manual export via the Export button is always available regardless of this setting.

Architecture

StressLab is a single-file Python application (~2,300 lines) with no framework dependencies beyond tkinter (bundled with Python). It uses:

  • tkinter — UI framework (ships with Python)
  • psutil — CPU/RAM metrics and process management
  • wmi — Windows system information queries
  • moderngl — OpenGL context and shader rendering for GPU stress
  • ctypes — direct Windows API calls (VirtualAlloc, VirtualLock, CreateFileW, kernel32, msvcrt)
  • subprocess — manages memtest_vulkan and lhm_reader helper processes
  • multiprocessing — CPU stress worker processes
  • threading — RAM verify workers, disk verify worker, nvidia-smi poller, temperature reader, async stop handlers

Temperature Monitoring Priority Chain

  1. lhm_reader.exe — compiled C# helper using LibreHardwareMonitorLib.dll (best coverage)
  2. WMI OHM/LHM namespace — if user runs LHM/OHM GUI separately
  3. nvidia-smi — NVIDIA GPU temperature only
  4. WMI thermal zone — basic CPU fallback

File Layout

StressLab/
├── stresslab.py          # Main application
├── stresslab.ico         # Application icon
├── requirements.txt      # Python dependencies
├── stresslab_admin.bat   # Run as admin launcher
├── build_exe.bat         # PyInstaller build script
├── stresslab.spec        # PyInstaller spec file
├── LICENSE               # MIT license
├── THIRD_PARTY_LICENSES  # Bundled component licenses
└── README.md             # This file

Runtime data (auto-created in %LOCALAPPDATA%\StressLab\):

%LOCALAPPDATA%\StressLab\
├── LibreHardwareMonitorLib.dll   # Downloaded
├── HidSharp.dll                  # Downloaded (LHM dependency)
├── lhm_reader.exe                # Compiled locally via csc.exe
├── lhm_reader.cs                 # C# source for sensor reader
└── memtest_vulkan.exe            # Downloaded

Auto-exported reports:

%USERPROFILE%\Documents\StressLab Reports\
├── StressLab_Health_HOSTNAME_YYYYMMDD_HHMMSS.txt
└── StressLab_Stress_HOSTNAME_YYYYMMDD_HHMMSS.txt

Troubleshooting

"memtest_vulkan not found" during VRAM test The auto-download may have failed (firewall, no internet). Go to the Utilities tab and click "Download memtest_vulkan" manually. Requires internet access to GitHub.

SSL certificate errors on download Some fresh Windows installs or enterprise systems have incomplete certificate chains. StressLab automatically falls back to unverified SSL if the default context fails. No action needed.

Temperatures show as "—" Run as Administrator for full sensor access. If the LHM download was skipped, go to Utilities tab to download it. Some systems may need a Defender exclusion for the WinRing0 driver — StressLab adds this automatically when running as admin (covers both the app directory and the TEMP directory where WinRing0 extracts).

Windows Defender flags WinRing0 StressLab automatically adds Defender exclusions for its app directory, the TEMP directory, and the WinRing0x64.sys driver filename. If you still see alerts, manually add %LOCALAPPDATA%\StressLab\ and %TEMP% as exclusions.

GPU stress test unavailable Install moderngl and glcontext: pip install moderngl glcontext. Requires OpenGL 3.3+ drivers.

RAM test shows 0 passes after several minutes This was fixed in v9.0 — the RAM worker now uses msvcrt.memcmp for fast in-place verification instead of copying each block into Python. If you're seeing this, make sure you're on the latest version.

GPU utilization settles below target The adaptive algorithm needs nvidia-smi for feedback. Ensure NVIDIA drivers are installed. On AMD/Intel GPUs, the shader runs at fixed high complexity without adaptive tuning.

Disk test shows low speeds on NVMe If the test file is small relative to the drive's SLC cache, speeds may appear normal even on a degrading drive. Use the 500GB or 1TB write cap to push past the cache and measure steady-state performance. Low speeds on pass 1 are ignored (cold start).

Windows shows "Not Activated" in health checks Correctly reports Windows activation status. WMI license codes 0 (Unlicensed) and 5 (Notification) are both reported as "Not Activated".

License

StressLab is licensed under the MIT License.

Third-party components have their own licenses — see THIRD_PARTY_LICENSES for details.

Credits

StressLab — Cincy Power Computers, LLC

Built with:

Source: README.md, updated 2026-02-27