# Z840 Power Consumption Study A before/after power study documenting the Z840's evolution from a dual-socket Xeon workstation into a dedicated local AI inference box. Measured and documented 2026-05-18 for posterity — this was the early days of running local AI at home on recycled enterprise iron, before it became normal. --- ## The Machine HP Z840 Workstation. Bought second-hand. Repurposed as a local AI inference box running Ollama, Open WebUI, and Hermes monitoring. 128GB ECC DDR4 — retained because RAM prices made starting fresh impractical. See [[z840]] for full hardware spec and service documentation. --- ## Phase 1 — Baseline (2026-05-18, pre-upgrade) **CPUs installed:** 2× Intel Xeon E5-2698 v3 @ 2.30GHz - 16 cores / 32 threads per socket - TDP: 135W each — **270W combined TDP** - Architecture: Haswell-EP (v3), LGA 2011-3 **GPU installed:** NVIDIA Quadro M4000 (original workstation card, placeholder) - 8GB GDDR5 - Not suitable for modern AI inference **RAM:** 128GB DDR4 ECC Registered @ 2133 MT/s (8× 16GB DIMMs across both sockets) ### Measured idle power draw (RAPL, system at rest, load avg ~0.00) | Component | Idle Draw | |-----------|-----------| | CPU socket 0 (E5-2698 v3) | 21.3W | | CPU socket 1 (E5-2698 v3) | 19.8W | | DRAM | ~0.6W | | Quadro M4000 (nvidia-smi) | 42.3W | | **Total measured** | **~84W** | > Note: RAPL measures CPU package power only. Wall draw will be higher due to > motherboard, storage, fans, and PSU inefficiency. Estimated wall idle: **150–180W** ### AI inference capability at this stage - Ollama running but limited by Quadro M4000 (8GB VRAM, no modern tensor cores) - Models constrained to ~7B parameter quantised - No tensor parallelism across cards --- ## Phase 2 — CPU Upgrade (arriving 2026-05-19) **CPUs incoming:** 2× Intel Xeon E5-2620 v4 @ 2.10GHz - 8 cores / 16 threads per socket - TDP: 85W each — **170W combined TDP** (vs 270W before — **saving 100W TDP**) - Architecture: Broadwell-EP (v4), LGA 2011-3 - Cost: £24 for the pair (eBay) **Why this makes sense:** The GPU does the AI heavy lifting. CPU cores are largely idle during inference — they're just feeding data and managing I/O. Dropping from 16-core to 8-core per socket costs nothing in real-world AI performance. ### Expected power improvement | Scenario | Before (v3) | After (v4) | Saving | |----------|-------------|------------|--------| | CPU TDP (both sockets) | 270W | 170W | 100W | | Estimated CPU idle draw | ~41W | ~25W | ~16W | | Estimated wall idle | ~150–180W | ~130–160W | ~20W | > Measured figures to be recorded after swap — see Phase 2 update below. --- ## Phase 3 — GPU Upgrade (cards arriving, date TBC) **GPUs incoming:** 2× NVIDIA GeForce RTX 3060 - 12GB GDDR6 each — **24GB total VRAM across both cards** - TDP: 170W each — 340W combined at full load - Architecture: Ampere — proper tensor cores, CUDA compute 8.6 - Cost: TBC ### AI capability step-change | Capability | Quadro M4000 | 2× RTX 3060 | |------------|--------------|--------------| | VRAM | 8GB | 24GB (12GB×2) | | Max model size (quantised) | ~7B | ~70B (split across cards) | | Inference speed | Slow | Fast | | Stable Diffusion | Marginal | Excellent | | Tensor cores | No | Yes | ### Power at full AI load (estimated) | Component | Full Load Draw | |-----------|----------------| | 2× E5-2620 v4 | ~120W | | 2× RTX 3060 | ~300W | | Motherboard/RAM/fans | ~50W | | **Estimated wall draw** | **~500–550W** | Z840 PSU is 1125W — plenty of headroom. --- ## Phase 4 — Power Mitigation Scripts (planned) Once GPUs are installed, a set of scripts and Hermes integrations will manage power dynamically to reduce idle draw: ### GPU power capping (nvidia-smi) At idle, cap each 3060 to ~50W. On job start, restore full power limit: ```bash # /usr/local/bin/gpu-power-idle.sh nvidia-smi -i 0 -pl 50 nvidia-smi -i 1 -pl 50 # /usr/local/bin/gpu-power-full.sh nvidia-smi -i 0 -pl 170 nvidia-smi -i 1 -pl 170 ``` ### CPU core parking (single socket at idle) When no heavy job is queued, offline all cores on socket 1: ```bash # /usr/local/bin/cpu-park-socket1.sh for cpu in $(cat /sys/devices/system/node/node1/cpulist | tr ',' ' '); do echo 0 > /sys/devices/system/cpu/cpu${cpu}/online done # /usr/local/bin/cpu-unpark-socket1.sh for cpu in $(cat /sys/devices/system/node/node1/cpulist | tr ',' ' '); do echo 1 > /sys/devices/system/cpu/cpu${cpu}/online done ``` ### Hermes integration (planned) - Add GPU wattage to Hermes Z840 stats endpoint (`nvidia-smi --query-gpu=power.draw`) - Alert if combined GPU draw exceeds 400W unexpectedly - Dashboard panel showing real-time power consumption - Auto-cap GPUs after 30 minutes of idle inference --- ## Phase 2 Results — POST CPU SWAP (measured 2026-05-19, ~2 hours post-install, 34°C ambient) ``` CPU socket 0 (E5-2620 v4): 15.2W CPU socket 1 (E5-2620 v4): 14.0W DRAM socket 0: 1.9W DRAM socket 1: 0.9W GPU (Quadro M4000): 42.3W Total measured (RAPL + nvidia-smi): ~74W Estimated wall draw: ~130–150W Saving vs Phase 1 (CPU package only): ~12W ``` > RAPL sampled at idle (load avg ~0.00), 5-second window per domain. > DRAM figures slightly higher than Phase 1 sample — within normal variance. > CPU package power: 41.1W → 29.2W combined (-29% reduction). ## Phase 3 Results — POST GPU SWAP (to be filled in after cards arrive) ``` CPU socket 0 (E5-2620 v4): ___W CPU socket 1 (E5-2620 v4): ___W 2× RTX 3060 at idle: ___W Total measured idle: ___W Estimated wall idle: ___W 2× RTX 3060 at full inference load: ___W Total measured load: ___W Estimated wall load: ___W Saving vs Phase 1 idle: ___W Monthly cost at UK avg (28p/kWh, idle 18h/day + load 6h/day): £___ ``` --- ## Cost Context (UK electricity, May 2026) UK average electricity price: ~28p/kWh | Scenario | Draw | Daily cost | Monthly cost | |----------|------|-----------|--------------| | Phase 1 idle 24/7 | ~165W | £1.11 | £33.80 | | Phase 4 idle 18h + load 6h | ~160W idle + ~500W load | £0.97 | £29.50 | | Phase 4 idle only (nights off) | ~160W × 12h | £0.54 | £16.40 | > Moral: the CPUs are not the enemy. The GPUs at full load are. Smart scheduling > and power capping matter more than the CPU swap — but every watt counts.