Usage estimation
Estimate usage for a compute over a known active runtime.
Neon · Const
Compute hours measure Neon compute usage. Calculate them by multiplying compute size in Compute Units by the number of active hours.
Compute hours measure resource consumption by combining a compute's capacity, expressed in Compute Units, with the time it remains active. Multiply the compute size by active hours; larger computes therefore accumulate the metric faster, while suspended time does not count as active runtime.
compute hours = compute size * active hoursA usage quantity measured in compute hours.
const computeSize = 0.25;
const activeHours = 4;
const computeHours = computeSize * activeHours;
console.log(`${computeHours} compute hour`);Calculates compute-hour usage from a compute size and its active runtime.
Estimate usage for a compute over a known active runtime.
Compare consumption between compute sizes running for the same duration.
Interpret Neon usage metrics for billing and resource monitoring.
Compute hours are calculated as compute size multiplied by active hours. The formula is compute hours = compute size * active hours.
Follow-up: How much does a 2 CU compute use in 3 active hours? It uses 6 compute hours.
A 0.25 CU compute needs four active hours to consume one compute hour. A 4 CU compute needs only 15 active minutes for the same usage.
Follow-up: Why do these runtimes differ? Compute-hour usage scales directly with the compute's CU size.
Compute hours track compute usage rather than simply elapsed wall-clock time. The relevant runtime is the period during which the compute is active.
Follow-up: What should be checked when usage is unexpectedly high? Inspect both the compute size and how long it remains active.
active hourscompute sizeCompute Unit (CU)