Introduction
CPU affinity management for Linux gaming on AMD multi-CCD processors
ccdbind + ccdpin
CPU affinity management tools for Linux gaming, designed for AMD processors with multiple Core Complex Dies (CCDs).
These tools automatically detect your CPU topology and optimize game performance by isolating game workloads from OS tasks.
The Problem
On AMD CPUs with multiple CCDs (like Ryzen 9 or Threadripper), processes can migrate between CCDs during execution. Each CCD has its own L3 cache, so cross-CCD migration causes cache misses and performance degradation.
Games are particularly sensitive to this because:
- They have tight frame timing requirements
- Background OS tasks compete for the same cores
- Cache thrashing from core migration causes stuttering
The Solution
ccdbind and ccdpin solve this by:
- Detecting CCD groups via L3 cache topology from sysfs
- Pinning OS slices (
app.slice,background.slice) to one CCD group - Dedicating game processes to a separate CCD group with exclusive L3 cache access
Two Tools, Two Approaches
ccdbind (Daemon)
Background service that automatically detects games and manages CPU pinning
ccdpin (Wrapper)
Launch wrapper for Steam games with manual control over CPU affinity
When to Use Which?
| Use Case | Recommended |
|---|---|
| "Set and forget" automatic management | ccdbind |
| Per-game control via Steam launch options | ccdpin |
| Both automatic + manual overrides | Both together |
Quick Start
Install
git clone https://github.com/youruser/quicksetd
cd quicksetd
./install.shVerify
ccdbind status(Optional) Use with Steam
Add to your game's launch options:
ccdpin %command%Requirements
- Linux with systemd (user session)
- AMD CPU with multiple CCDs (or manual CPU group configuration)
- Go 1.21+ (for building from source)