UPS Runtime Sizing for a Dedicated Game Server: Load, Curve, Shutdown

A dual Xeon game node idles at 140 W and pulls 410 W with a busy 64-slot Battlefield server and its database warm. A 1500 VA consumer UPS rated at 900 W looks like a comfortable fit, until you read the datasheet note that the figure is at a 0.9 power factor on a resistive load and that runtime is declared at half load. At 410 W the unit has 45 percent headroom, not the 67 percent the sticker suggests, and the runtime curve bends sharply past 60 percent loading.

Getting this wrong does not show up as a dead server. It shows up as a two-minute ride-through that ends eight seconds before the shutdown script finishes flushing the world save and closing the MySQL tables. That produces a corrupted map file and a forty-minute player rollback, which is far worse than a clean power-off at second zero.

Measure real load, not label wattage

Nameplate figures on a 1U chassis power supply describe the maximum the PSU can deliver, not what the node draws. Put a metering PDU or a clamp meter on the feed and record four states: cold idle, steady population, peak during map load, and peak during a backup job. The highest of the four is your design number. Add the switch, KVM and out-of-band management into the same figure, since they lose power at the same instant.

Power factor matters here because UPS ratings are often quoted in VA while the load is described in watts. A modern platinum PSU with active power factor correction runs around 0.95 to 0.99, so a 1500 VA unit gives roughly 1425 W usable. Older or cheap supplies may sit at 0.7, which cuts a 1500 VA unit to about 1050 W. Dedicated hardware from a provider that publishes per-chassis power figures makes this estimate far easier; see the published specifications on the bare metal plans before you size anything.

# record peak draw over 15 minutes at full population
sudo ipmitool dcmi power reading
sudo nvidia-smi --query-gpu=power.draw --format=csv -l 5
# or, on a metered PDU
curl -s http://pdu/api/outlet/3 | jq .watts

Reading a runtime curve honestly

Vendors publish runtime at 25, 50 and 100 percent load because the curve is not linear — it is roughly hyperbolic. The battery holds a fixed energy budget and inverter losses rise with load, so 50 to 100 percent cuts runtime by 55 to 60 percent. A unit quoting 18 minutes at 50 percent is worth 7 to 8 minutes at full tilt.

The table below is a realistic shape for a 1500 VA tower unit, and it is the kind of curve you should extract from the manufacturer’s runtime graph rather than assume.

Load (W)Percent of 900 W ratingTypical runtimeUsable after 6-month battery age
15017%38 min33 min
30033%19 min16 min
45050%12 min10 min
65072%8 min6.5 min
900100%4.5 min3.5 min

Sizing target: three minutes of real work

A game node needs enough runtime to run a graceful sequence, not enough to keep players online through an outage. Budget the sequence explicitly: stop accepting new connections, write the world state, flush the database, unmount volumes, then issue the OS shutdown. On a populated survival server with a 12 GB world that sequence takes 40 to 90 seconds, and it can take three minutes if the save is competing with disk writeback.

Size for peak load plus 150 percent of that sequence time, then derate the battery by 30 percent for age and temperature. A 410 W peak with a 120-second sequence needs about 8 minutes of new-battery runtime at 410 W, which lands you at a 2200 VA class unit rather than 1500 VA. Buy for year three, not year one.

The shutdown hook is the actual deliverable

The UPS must tell the host it is on battery, and the host must act on that signal long before the battery is empty. Install NUT or apcupsd, point it at the USB or serial link, and configure two thresholds: a time-on-battery trigger and a low-battery trigger, whichever fires first. Set the time trigger to half your measured runtime so a failing battery still leaves margin.

# /etc/nut/upsmon.conf
MONITOR myups@localhost 1 upsmon_secret primary
MINSUPPLIES 1
SHUTDOWNCMD "/usr/local/bin/game-graceful-stop.sh"
POLLFREQ 5
POLLFREQALERT 2
HOSTSYNC 15
FINALDELAY 5

What the graceful stop script must do

The shutdown command runs as root under time pressure, so it must be short, idempotent and logged. Send the stop signal to the game process, wait with a bounded timeout, verify the process exited, then sync and let the init system close the rest. If the game does not exit inside the timeout, kill it and accept the save is compromised — but never let the script hang past the low-battery trigger.

The script should also set a lock file so a second invocation is a no-op, and it should write a timestamp and the battery charge percentage to a log so the next morning tells you exactly how much runway was left. That log entry is the only evidence you will have about whether the sizing was correct.

Physical and electrical detail that ruins plans

A UPS that browns out under a motor load is worse than none. Check the transfer time — line-interactive units typically switch in 4 to 8 ms, online double-conversion units in zero — and confirm the game node’s PSU holdup time exceeds the transfer window. Nearly all ATX supplies hold 12 to 20 ms, so line-interactive is fine, but only if the PSU is healthy and not loaded to its own limit.

Also verify the outlet circuit. A 2200 VA unit may ask for a 20 A circuit, and a shared rack feed that already carries two other nodes will trip the breaker the moment the UPS starts recharging after an outage. Recharge current is often 80 percent of full load for the first few minutes, which is the exact moment everything else is also trying to come back up.

Monitoring, testing and replacement

Self-test weekly and run a real battery test quarterly, during a maintenance window when players are already disconnected. Track the reported battery voltage and runtime estimate in your metrics system; a drop of more than 15 percent over six months means the battery is failing early, usually from heat. Batteries in a 30 C room lose half their service life compared to a 20 C room.

Replace batteries at three years regardless of the self-test result, and replace the unit if it has no network card and no dry-contact output. A UPS you cannot query is one you will not trust.

Treat the runtime number as a system property, not a box property: load, power factor, curve, derating and the script’s own timing all decide whether the node survives. If you would rather not own the battery math, a colocated dedicated server with managed power shifts the whole problem to a facility with generator-backed feeds and monitored racks.

Leave a Reply