In simple words
- Toil: manual, repetitive work that grows with the system and has no lasting value, such as restarting the same service by hand.
- Automation: replacing toil with tools and scripts so it never needs a person again.
- Automation ladder: the steps from a written runbook, to a script, to a self-service tool, to full self-healing.
Big picture
Toil is work that keeps a service running but does not make it better. It is boring, manual and repeats forever. SREs try to measure toil and replace it with automation.
Picture washing dishes by hand every night. Buying a dishwasher costs money once, then saves time every day. Automation is the dishwasher.
What counts as toil
Work is toil when it is most of these:
| Sign | Meaning |
|---|---|
| Manual | A person types commands or clicks buttons |
| Repetitive | You do it again and again |
| Automatable | A script could do it |
| Tactical | It reacts to something, no plan behind it |
| No lasting value | After you finish, the service is no better |
| Grows with the service | Twice the users means twice the work |
Toil or not?
| Task | Toil? | Why |
|---|---|---|
| Restarting a stuck job by hand every day | Yes | Manual, repeated, no lasting value |
| Resizing disks when they fill up | Yes | Reactive and automatable |
| Writing a script that cleans old logs | No | Engineering work, it removes toil |
| Designing a new capacity plan | No | Needs judgment, has lasting value |
| Responding to a new kind of outage | No | New and creative |
| Approving access requests by hand | Yes | Rule-based, can be automated |
Not all manual work is toil. Reading a new problem and thinking it through is engineering.
Measure it first
You cannot reduce what you do not measure. Keep a simple log for two or three weeks.
Task Count/week Minutes each Hours/weekRestart queue worker 14 6 1.4Rotate expired certificate 2 30 1.0Create user access 25 8 3.3Clear full disk on db-3 3 20 1.0 Total 6.7Then compare with your whole work time. If one person works 40 hours and spends 6.7 on these tasks, that is about 17% toil from this list alone.
Decide what to automate first
Use a simple rule: the savings should beat the cost.
time saved per year = count per year x minutes saved eachbreak-even = time to build the automationExample: access requests take 8 minutes and happen 25 times a week.
25 x 8 min x 52 weeks = 10,400 minutes = about 173 hours per yearA self-service tool takes about 40 hours to build.It pays for itself in roughly 3 months.Also consider risk. Manual steps cause mistakes. A task that is rare but dangerous, like failing over a database, is worth automating even when the time saved is small.
The automation ladder
| Level | Example | Notes |
|---|---|---|
| 0. Tribal knowledge | "Ask Sam, he knows" | Fragile |
| 1. Documented steps | A wiki page of commands | Better, still manual |
| 2. A script | restart-worker.sh | One command |
| 3. A script with checks | Verifies health, rolls back on failure | Safer |
| 4. Self-service | A button or bot, with approval rules | Others can use it |
| 5. Fully automatic | The system fixes itself | Best, when safe |
Most toil should move up one step at a time. Do not jump to level 5 for something that nobody understands yet.
A small example
Before:
# every morning, someone runs this by handssh worker-1 "sudo systemctl restart queue-worker"ssh worker-2 "sudo systemctl restart queue-worker"After, as a systemd rule so the system restarts the service itself:
# /etc/systemd/system/queue-worker.service[Service]ExecStart=/usr/local/bin/queue-workerRestart=on-failureRestartSec=5$ sudo systemctl daemon-reload && sudo systemctl restart queue-worker$ systemctl show queue-worker -p RestartRestart=on-failureThis removes a daily task. The next question is why the worker crashes at all, which is the real fix.
Automate the cause, not only the symptom
An auto-restart hides a bug. Keep a counter of how often it fires and look at it each week. If restarts keep climbing, the system tells you something is wrong.
Common mistakes
- Automating a bad process. Fix or remove the step first.
- Building a huge tool for a task that happens twice a year.
- Scripts nobody else can read or run. Keep them in Git with a short README.
- Never measuring, so nobody can show that toil went down.
- Counting all manual work as toil. Thinking and design work is not toil.
Summary
- Toil is manual, repetitive, automatable work with no lasting value.
- Measure it, rank it, and automate where the saving is biggest.
- Climb the ladder step by step: document, script, check, self-service, automatic.
- Keep toil under about half of the team's time (lesson 01).
- Next: lesson 03 covers how to see what your service is doing.
CHECK YOUR UNDERSTANDING
3 quick questions
1. Which task is toil?
2. A task takes 8 minutes and happens 25 times a week. What is the yearly time?
3. What is the best first step to reduce toil?
You've finished the free preview of SRE Practices
Upgrade to Pro to unlock the remaining 15 lessons, every practice lab and a certificate when you finish.
See plans