What's Changed
New Features
-
CPU core pinning for Intel hybrid CPUs (#7) — Pin containers to P-cores (performance) or E-cores (efficiency) on Intel Alder Lake / Raptor Lake and newer. New
cpu_pinningtier config option acceptsp-cores,e-cores,all, or explicit ranges like0-11. Core topology is auto-detected from the kernel at startup. -
VitePress documentation site — Full documentation rewrite with 15 structured pages, local search, sidebar navigation, and edit-on-GitHub links. Live at fabriziosalmi.github.io/proxmox-lxc-autoscale.
Bug Fixes
- Fix CPU measurement always showing ~100% (#6, #23, #25) — Replaced the broken
/proc/statmethod with host-side cgroup accounting (cgroup v2/v1). The old method usedpct execto read/proc/statinside containers, which without LXCFS showed host CPU (not container CPU), and the overhead itself saturated CPU on low-core hosts. The new method reads directly from the kernel with zero overhead. - Fix tier lookup never finding configured tiers (#25) —
resource_manager.pyused a nonexistent config key instead ofLXC_TIER_ASSOCIATIONS. - Fix misleading scaling log messages — Now distinguishes "at max_cores" from "no host cores available".
- Fix missing
scale_in()function — Was called but never defined (horizontal scaling was broken). - Fix
get_container_config()crash — Name-shadowing bug causedUnboundLocalError. - Remove dead duplicate code between
lxc_utils.pyandresource_manager.py.
Improvements
- LXCFS is no longer required — Cgroup CPU measurement works without LXCFS.
- Much faster data collection — No
pct execcalls for CPU measurement; just host-side file reads. - Smarter caching — Cgroup paths and previous CPU readings cached across poll cycles.
- Cleaner logs — Reduced noisy INFO messages to DEBUG; compact single-line container status.
CI / Infra
- CI now passes for the first time in months — Added
requirements.txt, dropped EOL Python 3.8, added Python 3.12. - VitePress docs deploy — Automated build and deploy to GitHub Pages on every push to
docs/.
Breaking Changes
- Minimum Python version is now 3.9 (was 3.6).
Full Changelog: v1.1.0...v1.2.0