← Back
Home › Systems › Observability and operations

capacity-planning

capacity forecasting

Facebook capacity planning

SystemTechniques · 6Primitives · 27 capacity-planning Change point detectionstatistics · medium: CUSUM/E-divisive/PELT to find shifts in a time series mean or distributionQueueing theorystatistics · medium: Little's law, M/M/c and the universal scalability law for capacity modelsTime-series forecasting (baselines,…statistics · medium: The end-to-end recipe: fix horizon and uncertainty, beat naive baselines, choose a model family, and validate with rolling-origin backtests and scale-free metrics.›Rollup aggregationstorage · medium: Fold raw events into one mergeable partial aggregate per time bucket and dimension key, then merge fine buckets into coarser ones, so long ranges read few rows and stay exact.›Discrete event simulationnumerics · medium: Simulation driven by a time-ordered event queue with deterministic, reproducible replayArimastatistics · medium: ARIMA/SARIMA forecasting: differencing, AR and MA terms, order selection, maximum-likelihood fitMonte Carlo integrationnumerics · low: Estimate an expectation by averaging random samples; error falls as σ/√N in any dimension, and variance reduction (antithetic, control variates, importance sampling) shrinks σ.›Quantile sketchesdata-structures · low: Mergeable quantile sketches: t-digest, DDSketch, HDR histogramsLinear and logistic regressionmachine-learning · low: Fit a weighted sum of features to a number (least squares) or a probability (logistic); the baseline every model must beat.›Bin packingoptimization · low: Pack items of given sizes into the fewest fixed-capacity bins; sort descending, then first-fit, gives at most 11/9 of optimal and runs in O(n log n).›Simplex methodoptimization · low: Solves linear programs by walking along the edges of the feasible polytope from vertex to vertex, one basis swap (pivot) at a time; the workhorse behind MIP solvers.›Bayesian rate estimationstatistics · low: Estimate a conversion or event rate from few observations with a Beta-Binomial or Gamma-Poisson update: two counters, an honest interval, and P(B beats A) directly.›Robust statisticsstatistics · low: Location and scale estimates (median, MAD, trimmed mean, Huber M-estimator) that stay correct when a minority of the data is garbage.›Croston methodstatistics · low: Forecasting intermittent demand by separately smoothing demand sizes and intervals (Croston, SBA, TSB)Exponential smoothing (ETS, Holt-Wi…statistics · low: Forecast by keeping a few running states (level, trend, seasonal) updated by a fraction of each forecast error; O(1) memory per series and a strong baseline.›STL decomposition (seasonal-trend w…statistics · low: Split a series into trend, seasonal and remainder with iterated loess smoothing; the seasonal shape may drift and robust weights keep outliers out of it.›Time-series cross-validation (rolli…statistics · low: Estimate forecast error by repeatedly training on the past and testing on the next h steps, moving the origin forward; never trains on the future.›Hash aggregationstorage · low: GROUP BY via hash tables with partitioning and spill to diskTime partitioningstorage · low: Cut a table into fixed-interval time blocks so queries read only overlapping blocks and retention drops a whole block as one metadata change.›d-ary heapdata-structures · low: Array heap with d children per node (d = 4 typical): half the binary heap's depth, siblings in one cache line, faster priority queues.›PRNGs (PCG, xoshiro)numerics · low: Small, fast, statistically strong non-cryptographic generators: PCG32 and xoshiro256**, with seeding, parallel streams and unbiased ranges.›Finite differencesnumerics · low: Replace derivatives with weighted differences of grid values; simple stencils plus a stability condition (CFL) turn PDEs like heat, advection and waves into array loops.›+ 11 more primitives

Similar systems

Share the most building blocks with this one.