HackerReposA FIELD GUIDE TO OPEN SOURCE
ProSponsor the shelf♧ 0
← Back to top all-time
sirupsen
napkin-math
Rust2020–2026
sirupsen / napkin-math

napkin-math

Techniques and numbers for estimating system's performance from first-principles

11Distinct people
17Mentions
0Explicit recommenders
5.8KGitHub stars
REPOSITORY AT A GLANCE

What to know before exploring

What it is

Techniques and numbers for estimating system's performance from first-principles

GitHub

Where it is used

No documented product use was verified in the last source check.

What people are saying

No recommendation phrase was found in the indexed comments.

No classified warning is attached to this page. Read the discussions before treating silence as approval.

Also in these discussions

No other repository is repeatedly linked in the same discussions.

This week on Hacker News

Nov 7–Nov 14 UTC · Direct repository links and separately labeled related project stories. Indexed through 11/14/2026, 5:04:57 PM UTC.

No direct repository links were found in the indexed HN discussions over the past seven days. Older discussions are available below.

Mentions over time

HN mentions by year17 dated mentions

Observed mentions: 2020-10-03 21:42:57 UTC to 2026-06-22 00:50:48 UTC.

012342020-01-01 00:00:00 UTC to 2021-01-01 00:00:00 UTC (exclusive): 1 mentions; 0 submissions, 1 comments20202021-01-01 00:00:00 UTC to 2022-01-01 00:00:00 UTC (exclusive): 1 mentions; 1 submissions, 0 comments2022-01-01 00:00:00 UTC to 2023-01-01 00:00:00 UTC (exclusive): 4 mentions; 1 submissions, 3 comments2023-01-01 00:00:00 UTC to 2024-01-01 00:00:00 UTC (exclusive): 2 mentions; 1 submissions, 1 comments20232024-01-01 00:00:00 UTC to 2025-01-01 00:00:00 UTC (exclusive): 3 mentions; 2 submissions, 1 comments2025-01-01 00:00:00 UTC to 2026-01-01 00:00:00 UTC (exclusive): 2 mentions; 0 submissions, 2 comments2026-01-01 00:00:00 UTC to 2027-01-01 00:00:00 UTC (exclusive): 4 mentions; 3 submissions, 1 comments. Incomplete calendar period.2026*

* An incomplete calendar period is marked with an outlined bar. Its count is not directly comparable with a full period.

Counts come from the repository’s dated source evidence. Index cutoff: 2026-11-02 08:16:59 UTC.

View mention counts and date ranges
UTC ranges include their start and exclude their end. Select a period to filter the source evidence.
PeriodStart (UTC)End (exclusive, UTC)MentionsSubmissionsComments
20202020-01-01 00:00:00 UTC2021-01-01 00:00:00 UTC101
20212021-01-01 00:00:00 UTC2022-01-01 00:00:00 UTC110
20222022-01-01 00:00:00 UTC2023-01-01 00:00:00 UTC413
20232023-01-01 00:00:00 UTC2024-01-01 00:00:00 UTC211
20242024-01-01 00:00:00 UTC2025-01-01 00:00:00 UTC321
20252025-01-01 00:00:00 UTC2026-01-01 00:00:00 UTC202
2026 (partial)2026-01-01 00:00:00 UTC2027-01-01 00:00:00 UTC431

What Hacker News says

17 sources
stopachka·Jun 22, 2026Submission

Show HN: Baserates.dev, memorize programmer napkin math

When I began my career in programming I remember reading Jeff Dean's "Latency Numbers Every Programmer Should Know" [1], and getting inspired. Alas, it's been over a decade, and I never fully internalized all the numbers. Until recently. I discovered Simon Eskildsen's talk [2] and github repo [3] on programmer napkin math. I liked his reasoning, and decided to _actually_ internalize the numbers now. So I made baserates.dev. It's a spaced repetition program that teaches you the napkin math from Simon, enhanced with a few things from Jeff Dean's list. The main changes: I included CPU instructions, like L1 Cache reads. I also included some nooby context, like how to pronounce the character μ, and a reminder on what is bigger: nano seconds, or micro seconds. The app automatically saves your progress, and doesn't require auth. Most of the log
Read the rest
ic is vibe coded: I fed Claude all the links. I use InstantDB [^4] for the backend, mainly to support guest auth and saving progress. Most of my time spent on the project was just going through and making sure the numbers were right. [^5] Hope you enjoy it! [1]: https://gist.github.com/jboner/2841832 [2]: https://www.youtube.com/watch?v=IxkSlnrRFqc [3]: https://github.com/sirupsen/napkin-math [4]: Disclaimer: I am the founder of InstantDB [5]: One fun story: I got claude to spin up a bunch of machines on Amazon, to confirm latency numbers for same AZ, cross AZ, cross region requests.
2 points · Open discussion
Most production storage systems/databases built on top of S3 spend a significant amount of effort building an SSD/memory caching tier to make them performant enough for production (e.g. on top of RocksDB). But it's not easy to keep it in sync with blob... Even with the cache, the cold query latency lower-bound to S3 is subject to ~50ms roundtrips [0]. To build a performant system, you have to tightly control roundtrips. S3 Express changes that equation dramatically, as S3 Express approaches HDD random read speeds (single-digit ms), so we can build production systems that don't need an SSD cache—just the zero-copy, deserialized in-memory cache. Many systems will probably continue to have an SSD cache (~100 us random reads), but now MVPs can be built without it, and cold query latency goes down dramatically. That's a big deal We're currentl
Read the rest
y building a vector database on top of object storage, so this is extremely timely for us... I hope GCS ships this ASAP. [1] [0]: https://github.com/sirupsen/napkin-math [1]: https://turbopuffer.com/
In S3 Express Is All You Need
Comparison on Clickhouse, also runs in about 30-40ms, however there's no indexing being used and this is a full-table scan. create table if not exists test_table ( id UInt64, text1 String, text2 String, int1000 UInt64, int100 UInt64, int10 UInt64, int10_2 UInt64 ) engine = MergeTree() order by (id) ; insert into test_table with repeat('b', 1024) as one_kib, repeat('b', 255) as bytes_255 select number as id, one_kib, bytes_255, rand() % 1000 as int1000, rand() % 100 as int100, rand() % 10 as int10, rand() % 10 as int10_2 from numbers(10e6) ; > select count(*) from test_table where int1000 = 1 and int100 = 1; ┌─count()─┐ │ 9949 │ └─────────┘
Read the rest
1 row in set. Elapsed: 0.034 sec. Processed 10.00 million rows, 160.00 MB (290.93 million rows/s., 4.65 GB/s.) The same table but with 1B rows instead, runs in ~1800ms > select count(*) from test_table where int1000 = 1 and int100 = 1; ┌─count()─┐ │ 999831 │ └─────────┘ 1 row in set. Elapsed: 1.804 sec. Processed 1.00 billion rows, 16.00 GB (554.24 million rows/s., 8.87 GB/s.) [1] Converted the table create and insert logic from here: https://github.com/sirupsen/napkin-math/blob/master/newslett...
In Index Merges vs. Composite Indexes in Postgres and MySQL
`madvise(2)` doesn't matter _that_ much in my experience with [1] on modern Linux kernels. SSD just can't read _quite_ as quickly as memory in my testing. Sure, SSD will be able to re-read a lot into ram, analogous to how memory reading will be able to rapidly prefetch into L1. I get ~30 GiB/s for threaded sequential memory reads, but ~4 GiB/s for SSD. However, I think the SSD number is single-threaded and not even with io_uring—so I need to regenerate those numbers. It's possible it could be 2-4x better. [1]: https://github.com/sirupsen/napkin-math
In I/O is no longer the bottleneck
Yes, sequential I/O bandwidth is closing the gap to memory. [1] The I/O pattern to watch out for, and the biggest reason why e.g. databases do careful caching to memory, is that _random_ I/O is still dreadfully slow. I/O bandwidth is brilliant, but latency is still disappointing compared to memory. Not to mention, in typical Cloud workloads, IOPS are far more expensive than memory. [1]: https://github.com/sirupsen/napkin-math
In I/O is no longer the bottleneck

Showing the 15 most recent of 17 sources. Enable JavaScript to search and browse every indexed mention.

MAKE YOURSELF AT HOME

A few shortcuts

/
Search the collection
?
Open this guide
Esc
Close dialogs and navigation

Your saved repositories and interests stay in this browser.