# Napkin

By Simon Hørup Eskildsen · 2021-11-15 · https://sirupsen.com/napkin

<Favicon emoji="✖️" />

[![Napkin Math reference numbers](/images/napkin-header.png)][ref]

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? -- [Issue 4](/napkin/problem-4)


> Is fsyncs per seconds and transactions per second for MySQL always
> the same? -- [Issue 10](/napkin/problem-10-mysql-transactions-per-second)

> What do you expect the response time for a query that visits 50 database pages
> with a 80% page cache hit rate to be? -- [Issue 2](/napkin/problem-2)

With the napkin math [reference numbers][ref] in hand 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][talk] is the best primer on the topic.

I believe that first-principle thinking is _required_ to break out of iterative
improvement and make order of magnitude improvements.

### [See Archives][archives]

<Subscribe />

[ref]: https://github.com/sirupsen/napkin-math#numbers
[talk]: https://www.youtube.com/watch?v=IxkSlnrRFqc
[archives]: /category/code
