ccdbind

Installation

Install ccdbind and ccdpin on your Linux system

Installation

Prerequisites

  • Linux with systemd user session support
  • Go 1.21+ (for building from source)
  • AMD multi-CCD CPU (or Intel/other with manual CPU group config)

The tools work best on AMD Ryzen 9 / Threadripper CPUs with multiple CCDs, but can be configured manually for any CPU topology.

Automated Installation

The easiest way to install is using the provided install script:

Clone the repository

git clone https://github.com/youruser/quicksetd
cd quicksetd

Run the installer

./install.sh

This will:

  • Build the binaries
  • Install to ~/.local/bin/
  • Set up systemd user units
  • Create default configuration

Verify installation

ccdbind status
systemctl --user status ccdbind.service

Manual Installation

If you prefer manual control:

Build

go test ./...
go build ./cmd/ccdbind
go build ./cmd/ccdpin

Install binaries

install -Dm755 ./ccdbind ~/.local/bin/ccdbind
install -Dm755 ./ccdpin ~/.local/bin/ccdpin

Install systemd units

install -Dm644 systemd/user/ccdbind.service ~/.config/systemd/user/ccdbind.service
install -Dm644 systemd/user/game.slice ~/.config/systemd/user/game.slice

Install configuration

install -Dm644 ./config.example.toml ~/.config/ccdbind/config.toml

Enable the service

systemctl --user daemon-reload
systemctl --user enable --now ccdbind.service

Install Script Options

The installer supports several options:

./install.sh [OPTIONS]
OptionDescription
-h, --helpShow help message
-n, --dry-runPrint actions without executing
-s, --skip-buildSkip building (use existing binaries)
-S, --skip-serviceSkip systemd service setup
--prefix=PATHInstall prefix (default: ~/.local)
--bindir=PATHBinary directory (default: PREFIX/bin)
--configdir=PATHConfig directory (default: ~/.config/ccdbind)

Environment Variables

VariableDescription
PREFIXInstall prefix
BINDIRBinary directory
CONFIGDIRConfig directory
GOGo compiler (default: go)
GOFLAGSAdditional flags for go build

Uninstallation

To remove ccdbind and ccdpin:

./uninstall.sh

Or manually:

systemctl --user disable --now ccdbind.service
rm ~/.local/bin/ccdbind ~/.local/bin/ccdpin
rm ~/.config/systemd/user/ccdbind.service
rm ~/.config/systemd/user/game.slice
rm -rf ~/.config/ccdbind
rm -rf ~/.local/state/ccdbind
rm -rf ~/.local/state/ccdpin
systemctl --user daemon-reload

Verifying Your Setup

After installation, verify everything is working:

Check CPU topology detection

ccdbind --print-topology

Expected output (example for Ryzen 9 5900X):

OS_CPUS:   0-5,12-17
GAME_CPUS: 6-11,18-23

Check service status

ccdbind status

Check systemd service

systemctl --user status ccdbind.service
journalctl --user -u ccdbind.service -f

Troubleshooting Installation

If ccdbind --print-topology shows all CPUs in one group, your CPU may not have multiple CCDs, or the L3 cache topology isn't exposed in sysfs. See Configuration for manual CPU group setup.

Common issues

"command not found" after install

  • Ensure ~/.local/bin is in your PATH
  • Add to ~/.bashrc: export PATH="$HOME/.local/bin:$PATH"

Service fails to start

  • Check logs: journalctl --user -u ccdbind.service
  • Verify config: ccdbind --config ~/.config/ccdbind/config.toml --dry-run

Permission denied errors

  • Ensure you're running as a regular user (not root)
  • systemd user session must be running

On this page