explaingit

brendangregg/perfmodels

Analysis updated 2026-07-15 · repo last pushed 2014-12-05

72RAudience · ops devopsComplexity · 3/5DormantSetup · moderate

TLDR

A collection of R and gnuplot scripts that model system scalability using Amdahl's Law, the Universal Scalability Law, and queueing theory. You feed in performance data to predict whether adding more resources will actually improve throughput or hit diminishing returns.

Mindmap

mindmap
  root((repo))
    What it does
      Predicts system scaling
      Visualizes performance limits
      Models contention overhead
    Models included
      Amdahls Law
      Universal Scalability Law
      Queueing theory
    Tech stack
      R
      gnuplot
      Sample data files
    Audience
      Performance engineers
      Systems analysts
    Use cases
      Capacity planning
      Database scaling analysis
      Resource bottleneck prediction
Click or tap to explore — scroll the page freely

Code map

Detail Auto

An interactive map of this repo's files and how they connect — its source is parsed live in your browser. Click Visualize to build it.

filefunction / class

What do people build with it?

USE CASE 1

Predict whether adding more CPUs to a database cluster will actually improve throughput or hit diminishing returns.

USE CASE 2

Visualize where system performance will plateau as you scale up resources using sample or real measurement data.

USE CASE 3

Model response time degradation as system utilization increases using built-in queueing theory scripts.

USE CASE 4

Estimate the non-parallelizable portion of a workload to understand the maximum speedup possible with additional hardware.

What is it built with?

Rgnuplot

How does it compare?

brendangregg/perfmodelshadley/mylittleponyhadley/logger
Stars72181
LanguageRRR
Last pushed2014-12-052018-11-092024-10-16
MaintenanceDormantDormantStale
Setup difficultymoderateeasyeasy
Complexity3/51/52/5
Audienceops devopsdeveloperdeveloper

Figures from each repo's GitHub metadata at analysis time.

How do you get it running?

Difficulty · moderate Time to first run · 30min

Requires R and gnuplot installed, plus enough understanding of performance theory to adapt the scripts to your specific system.

In plain English

perfmodels is a collection of analysis tools that help you figure out how well a system will scale as you throw more resources at it. If you've ever wondered whether doubling your server count will actually double your capacity, or whether you'll hit a point of diminishing returns, this project provides the mathematical models to answer that question. The repository includes several models written in R and gnuplot. Some apply Amdahl's Law, a classic principle that accounts for the portion of a task that can't be parallelized. Others use the Universal Scalability Law, which factors in contention and coordination overhead between resources. There's also a queueing theory model that predicts response times as system utilization increases. You feed in sample data, and the tools help you visualize and predict where performance will plateau or degrade. This is built for performance engineers and systems analysts who already work with scalability concepts. For example, someone evaluating whether to add more CPUs to a database cluster could use these models to predict actual throughput gains rather than guessing. The sample data file gives you a starting point to see how the math works before plugging in your own measurements. The README is upfront about a key limitation: these aren't polished, run-it-and-go tools. The author describes them as projects that expect customization for each system you're modeling. You'll need to understand the underlying performance theory to get value from them. Think of this less as a finished application and more as a set of reference implementations and starting points that a knowledgeable practitioner would adapt to their specific infrastructure.

Copy-paste prompts

Prompt 1
Help me apply the Universal Scalability Law from the perfmodels repo to my own throughput data. I have measurements of requests per second at 1, 2, 4, 8, and 16 CPU cores. Walk me through customizing the R script to fit the model and plot the results.
Prompt 2
I cloned the perfmodels repo and want to use the Amdahl's Law model. My workload has an estimated 15% serial portion. Help me modify the gnuplot script to predict speedup at 2, 4, 8, 16, and 32 processors and identify where diminishing returns kick in.
Prompt 3
Using the perfmodels queueing theory script as a reference, help me predict response times for my web service. My current average response time is 50ms at 40% utilization. Help me adapt the R code to plot projected response times from 40% to 95% utilization.
Prompt 4
I have the perfmodels sample data file working. Help me understand what the output plots are telling me about scalability bottlenecks, and guide me through replacing the sample data with my own production measurements in the correct format.

Frequently asked questions

What is perfmodels?

A collection of R and gnuplot scripts that model system scalability using Amdahl's Law, the Universal Scalability Law, and queueing theory. You feed in performance data to predict whether adding more resources will actually improve throughput or hit diminishing returns.

What language is perfmodels written in?

Mainly R. The stack also includes R, gnuplot.

Is perfmodels actively maintained?

Dormant — no commits in 2+ years (last push 2014-12-05).

How hard is perfmodels to set up?

Setup difficulty is rated moderate, with roughly 30min to a first successful run.

Who is perfmodels for?

Mainly ops devops.

Open on GitHub → Explain another repo

This repo across BitVibe Labs

Verify against the repo before relying on details.