The idea in one minute#
Toil is the operational work that is manual, repetitive, automatable, reactive, has no lasting value, and grows with the size of the service. Restarting a stuck process every week is toil. Writing the fix that stops it getting stuck is not.
Toil is not “work I dislike”. Some toil is unavoidable, and a little is even useful for staying close to production. The problem is that it grows linearly with traffic and services while the team does not, so unchecked it consumes everyone. SRE teams measure it, cap it at about half their time, and spend the other half removing it.
An analogy#
Bailing water out of a boat. Every bucket is useful in the moment, and if you stop, you sink. But if you spend all day bailing, you never patch the hole — and the boat that leaks twice as much next year needs twice as many people bailing.
A picture#
flowchart TB
W["A piece of operational work"] --> M{"Manual?"}
M -->|"no"| NT["Not toil"]
M -->|"yes"| R{"Repetitive?"}
R -->|"no, one-off"| NT2["Not toil<br/><small>overhead or a project</small>"]
R -->|"yes"| A{"Automatable?"}
A -->|"needs human judgement"| NT3["Not toil<br/><small>keep, but make it easier</small>"]
A -->|"yes"| V{"Lasting value?"}
V -->|"yes, the system improves"| ENG["Engineering"]
V -->|"no, back to where we were"| T["TOIL<br/><small>measure, cap, automate</small>"]
class W neutral
class M,R,A,V queue
class NT,NT2,NT3 neutral
class ENG compute
class T warnHow it really works#
The six properties#
From the Google SRE book, work is toil when it is:
| Property | Example of toil | Example that is not |
|---|---|---|
| Manual | SSHing in to clear a temp directory | A cron job that does it |
| Repetitive | Every week, the same disk fills | A one-time migration |
| Automatable | Steps are written down and identical each time | Deciding whether to roll back a risky release |
| Tactical / reactive | Driven by an alert or ticket | Planned design work |
| No enduring value | The service is the same afterwards | A config change that removes the cause |
| Grows with the service | Twice the customers → twice the quota requests | Fixed per-team overhead (meetings, HR) |
Overhead (meetings, planning, training) is not toil. Neither is on-call itself — answering a page needs judgement — but the repetitive fix you apply after the third identical page is.
Measuring toil#
You cannot reduce what you do not count. Three practical methods:
- Ticket and page tagging. Every ticket and page gets a label (
toil:cert-rotation,toil:quota-request). A monthly report sums time by label. - Survey. Each quarter, each engineer estimates their percentage split between toil, on-call, project work and overhead. Crude but surprisingly stable.
- Interrupt logs. For one week, everyone writes one line per interruption: what, how long, could a machine have done it.
The output you want is a ranked list: toil source, hours per month, trend, cost to automate.
Deciding what to automate#
Automation has a cost: building it, maintaining it, and the new failure modes it adds. A simple payback rule:
hours saved per month = frequency × minutes per occurrence ÷ 60
payback (months) = hours to automate ÷ hours saved per monthAutomate when payback is a few months, or when the manual step is error-prone (a typo in a manual failover is an outage), or when it blocks someone else (a developer waiting a day for a quota bump). Do not automate a task that happens twice a year and takes ten minutes — write a good runbook instead.
The automation ladder#
Automation is a ladder, not a switch. Climb one rung at a time:
- No automation. Knowledge in someone’s head.
- Runbook. Steps are written down; anyone on call can do it.
- Script. One command does the steps; a human decides when to run it.
- Self-service. The person who needs it (a developer) runs it themselves, with guardrails.
- Triggered automation. The system detects the condition and runs the fix, then tells a human.
- Autonomous. The condition can no longer happen — the system was redesigned.
The best toil reduction is often rung 6: not a faster way to clear the disk, but logs that rotate themselves.
A worked example#
An SRE team of six measures a month of interrupts:
| Toil source | Times / month | Minutes each | Hours / month | Cost to automate (h) |
|---|---|---|---|---|
| TLS certificate renewal for internal services | 12 | 45 | 9 | 24 (cert-manager + alert) |
| Manually adding a customer to an allow-list | 80 | 10 | 13.3 | 30 (self-service form + API) |
| Restarting a worker stuck on a poisoned message | 20 | 20 | 6.7 | 16 (dead-letter queue) |
| Quarterly access review spreadsheet | 0.33 | 240 | 1.3 | 40 |
| Re-running flaky deploy pipeline | 40 | 15 | 10 | 20 (fix the flaky step) |
The program below ranks these by payback. The quarterly access review is real work but not worth automating yet; the allow-list form pays back in about two months and also removes a developer’s wait.
Code#
// toil.go — rank toil sources by payback and project how toil grows with the service.
package main
import (
"fmt"
"sort"
)
type source struct {
name string
perMonth float64 // occurrences
minutesEach float64
hoursToAutomate float64
}
func (s source) hoursPerMonth() float64 { return s.perMonth * s.minutesEach / 60 }
func (s source) paybackMonths() float64 { return s.hoursToAutomate / s.hoursPerMonth() }
func main() {
toil := []source{
{"TLS cert renewal", 12, 45, 24},
{"customer allow-list", 80, 10, 30},
{"restart stuck worker", 20, 20, 16},
{"quarterly access review", 1.0 / 3, 240, 40},
{"re-run flaky deploy", 40, 15, 20},
}
sort.Slice(toil, func(i, j int) bool { return toil[i].paybackMonths() < toil[j].paybackMonths() })
total := 0.0
fmt.Printf("%-24s %10s %12s %s\n", "source", "h/month", "payback", "decision")
for _, s := range toil {
total += s.hoursPerMonth()
decision := "automate now"
if s.paybackMonths() > 6 {
decision = "runbook; revisit"
}
fmt.Printf("%-24s %10.1f %9.1f mo %s\n", s.name, s.hoursPerMonth(), s.paybackMonths(), decision)
}
const team = 6
const hoursPerEngineer = 140.0 // working hours per month
fmt.Printf("\ntoil today: %.0f h/month = %.0f%% of a %d-person team\n",
total, 100*total/(team*hoursPerEngineer), team)
// Toil grows with the service; the team does not.
fmt.Println("\nif traffic grows 60% a year and nothing is automated:")
t := total
for year := 1; year <= 4; year++ {
t *= 1.6
pct := 100 * t / (team * hoursPerEngineer)
flag := ""
if pct > 50 {
flag = " ← over the 50% cap"
}
fmt.Printf(" year %d: %5.0f h/month, %3.0f%% of the team%s\n", year, t, pct, flag)
}
}The second half of the output is the reason toil is capped: a manageable 5% today grows quietly, and nobody notices until the team is drowning.
Remember this#
- Toil: manual, repetitive, automatable, reactive, no lasting value, grows with the service.
- Measure it by tagging tickets and pages; rank by hours and payback.
- Cap operational work at about 50%; spend the rest removing it.
- Climb the automation ladder; the top rung is a redesign that removes the task.
Try it#
- Run
toil.go. Change the growth to 100% a year. In which year does the team cross the cap? - Keep an interrupt log for two days. Classify each item with the six properties.
- Pick your worst toil source and write the rung-6 version: what redesign would make it impossible?
Check yourself#
- Is answering a page toil? Is the fix you apply on the fifth identical page?
- Why does toil grow while the team stays the same size?
- When is a runbook better than automation?
- Give one risk that automation adds.
Sources#
- Google SRE book, chapter 5: Eliminating Toil
- Google SRE workbook, chapter 6: Eliminating Toil — case studies and the measurement methods