A lightweight Windows utility that automatically sets CPU affinity for games and processes launched by Steam. It automatically identifies and excludes the first physical core (Logical Processors 0 & 1 on HT/SMT systems). This generally improves raw CPU performance by around 2-5% by avoiding the core heavily used by the OS kernel, interrupts, and background tasks.
- Automatic Detection: Monitors processes launched by
steam.exe. - Hardware-Aware Affinity: Automatically detects your CPU topology (Hyper-Threading/SMT) and disables only the first physical core (which handles OS interrupts and background tasks).
- On HT/SMT systems: Disables Logical Processors 0 and 1.
- On non-HT/SMT systems: Disables only Logical Processor 0.
- System Tray Integration: Runs silently in the background with a system tray icon.
- Log Viewer: Built-in log window to see which processes are being modified.
- Startup Management: Option to automatically start when you log in.
Download and run the .msi installer from the releases page (or build it yourself). This will:
- Install the application to
Program Files. - Create a Start Menu shortcut.
You can also run the standalone executable:
cargo run --release- Rust
- WiX Toolset v3 (for building the installer)
-
Build the executable
cargo build --release -
Build the MSI installer
# Ensure WiX v3 bin folder is in your PATH cargo wixor
cargo wix --bin-path "C:\Program Files (x86)\WiX Toolset v3.14\bin" --nocapture
The installer will be generated in
target/wix/steam_affinity-x.y.z-x86_64.msi.
Once running, Steam Affinity sits in your system tray (gear icon).
Tray Menu Options:
- Show Logs: Opens a window displaying recent actions and detected processes.
- Monitoring: Toggle the automatic affinity adjustment on/off.
- Start on Login: Toggle whether the app starts automatically with Windows.
- Exit: Closes the application.
The application supports command-line arguments for advanced usage:
steam_affinity.exe --verbose --interval-ms 3000--verbose: Enable detailed logging to stdout (useful for debugging).--interval-ms <MS>: Set the polling interval in milliseconds (default: 3000ms).
- Uses
CreateToolhelp32Snapshotto snapshot running processes. - Identifies
steam.exeand monitors for new child processes. - Uses
GetLogicalProcessorInformationto determine the mask for Physical Core 0. - Applies
SetProcessAffinityMaskto identified children, ensuring the first physical core is excluded while all other cores remain active. - Stores startup configuration in
HKCU\Software\Microsoft\Windows\CurrentVersion\Run.