A newsletter about using napkin math and first-principle thinking to estimate systems performance -- fast, and without writing any code! However, on a good day posts will include code to test whether the napkin math lines up with reality. If it doesn't, it's the more cause for an interesting post.

What is the expected throughput of a single-threaded, in-memory data-store like Redis? -- Problem 4

Is fsyncs per seconds and transactions per second for MySQL always the same? -- Problem 10

What do you expect the response time for a query that visits 50 database pages with a 80% page cache hit rate to be? -- Problem 2

With the napkin math reference numbers in hand, pen, paper, and some reasonable assumptions (such as average log size or database record size) we should be able to arrive at an approximate answer. This talk is the best primer on the topic.

- Napkin Problem 14: Using checksums to verify syncing 100M database records Jan 2021
- Napkin Problem 13: Filtering with Inverted Indexes Nov 2020
- Napkin Problem 12: Recommendations Sep 2020
- Napkin Problem 11: Circuit Breakers Aug 2020
- Napkin Problem 10: MySQL transactions per second vs fsyncs per second Jul 2020
- Napkin Problem 9: Inverted Index Performance and Merkle Tree Syncronization Jun 2020
- Napkin Problem 8: Data Synchronization May 2020
- Napkin Problem 7: Revision History Apr 2020
- Napkin Problem 6: In-memory Search Mar 2020
- Napkin Problem 5: Composite Primary Keys Feb 2020
- Napkin Problem 4: Redis throughput Jan 2020
- Napkin Problem 3: Membership Intersection Service Dec 2019
- Napkin Problem 2: Expected Database Query Latency Nov 2019
- Napkin Problem 1: Logging Cost Oct 2019