CPU Frequency Governor & Power/Performance Tuning Prompt
Audit and tune Linux CPU frequency scaling (cpufreq governors, scaling driver, turbo/C-states, energy-performance bias) to balance latency, throughput, and power for a given workload.
- Target user
- Linux sysadmins and performance engineers
- Difficulty
- Intermediate
- Tools
- Claude, ChatGPT
The prompt
You are a senior Linux performance engineer who tunes CPU frequency scaling for a specific workload profile. Recommend changes conservatively and explain the latency/throughput/power trade-off of each. I will provide: - The workload type and goal (low-latency trading, batch compute, virtualization host, laptop battery life, etc.) - Output of `cpupower frequency-info`, `cat /sys/devices/system/cpu/cpu*/cpufreq/scaling_governor` (a sample), `cat /sys/devices/system/cpu/cpu*/cpufreq/scaling_driver`, and `lscpu` - Current `intel_pstate`/`amd_pstate`/`acpi-cpufreq` driver, turbo state, and any `tuned` profile in use - Latency or throughput symptoms (jitter, frequency sticking low under load, thermal throttling) Your job: 1. **Identify the scaling stack** — name the active driver (intel_pstate active/passive, amd_pstate, acpi-cpufreq) and which governors it actually supports, since pstate drivers expose a different set. 2. **Match governor to goal** — recommend performance vs powersave vs schedutil/ondemand, and explain why (e.g. performance for latency-sensitive, schedutil for balanced). 3. **Tune turbo and C-states** — advise on turbo/boost and whether to limit deep C-states (`intel_idle.max_cstate`, `processor.max_cstate`, or `cpu_latency_qos`) for wake-latency-sensitive workloads, noting the power cost. 4. **Set energy-performance bias** — recommend `energy_performance_preference`/EPB values appropriate to the goal. 5. **Persist correctly** — show how to make it stick via a `tuned` profile or systemd/udev/kernel cmdline rather than transient `cpupower` calls, and call out that some BIOS settings override the OS. 6. **Verify** — confirm with `cpupower frequency-info`, `turbostat`, and a workload re-measure showing the effect. Output: (a) detected scaling stack, (b) governor + turbo + C-state recommendation with rationale, (c) persistence config, (d) verification commands and expected before/after signal.
Run this prompt with AI
Test it, get an AI-improved version, or compare models — live in the Prompt Workspace. No copy-paste.
Related prompts
-
Linux Block I/O Scheduler Selection & Tuning Review Prompt
Review the per-device block I/O scheduler (mq-deadline, bfq, kyber, none) and queue tunables against a workload and storage type, and recommend a persistent, verifiable configuration.
-
Transparent HugePages Workload Tuning Review Prompt
Review Transparent HugePages (THP) and explicit hugepage configuration against a workload (databases, JVMs, KVM hosts) and recommend the right setting, with the latency-spike and memory-bloat trade-offs spelled out.
-
cpupower Frequency Governor Tuning Prompt
Tune CPU frequency scaling governors, energy-performance bias, and turbo behavior with cpupower to trade latency against power for a given workload profile.
-
Linux High Load & CPU Runaway Investigation Prompt
Diagnose high load average, CPU saturation, run-queue pressure, IRQ storms, and steal time on Linux servers — distinguish user CPU vs system CPU vs I/O wait vs steal.
More Linux Admins prompts & error guides
Browse every Linux Admins prompt and troubleshooting guide in one place.
Reading prompts? Get all 500 in one free PDF
500 battle-tested, copy-paste AI prompts engineered by a senior systems engineer — every one with fill-in placeholders and safety/back-out notes. Drop your email and it's yours.
- 500 prompts: Linux · Kubernetes · Terraform · OpenStack · GitLab · Docker · Monitoring · Incident Response
- Instant PDF download — yours free, forever
- Plus one practical AI-workflow email a week (no spam)
Single opt-in · unsubscribe anytime · no spam.