During my talk “The Quantum Physics of Java” at Oredev, @holly_cummins tweeted about the beer cache hierarchy. It is an analogy with which my former colleague, Richard Thompson, came up to describe the differences between memory access times. This tweet hit a nerve with more than 1.500 Retweets and more than 900 Favorites. It also inspired quite a few people to extend the analogy to other areas. Here are some of my favorites:
This is the tweet with which it all began.
L1 cache is a beer in hand, L3 is fridge, main memory is walking to the store, disk access is flying to another country for beer. @net0pyr
— Holly Cummins (@holly_cummins) November 6, 2014
And shortly after @holly_cummins added the missing piece.
If anyone is desperate for the missing part of the analogy, "L2 cache is a beer cooler by the sofa." @net0pyr
— Holly Cummins (@holly_cummins) November 7, 2014
Immediately some people extended the analogy to other access times…
… registers …
— meat (@meat) November 6, 2014
— Ryan Zezeski (@rzezeski) November 6, 2014
… remote direct memory access (RDMA) …
— Sargun Dhillon (@sargun) November 7, 2014
… SSD and tape …
— Matt Parker (@MattLlt) November 7, 2014
… network …
— Pozorvlak (@pozorvlak) November 7, 2014
… database requests …
— Brian Rice (@BrianTRice) November 7, 2014
… more SSD …
— Didier Verna (@didierverna) November 8, 2014
… and more tape.
— Peter Kjellström (@nsccap) November 8, 2014
Some people quickly pointed out that the analogy for disk access was way off (to my defense, it was just the part of a joke). 🙂
— Ian Massingham (@IanMmmm) November 8, 2014
— Matteo Collina (@matteocollina) November 9, 2014
— Chimichenga (@secretasianman) November 16, 2014
But what amazed me the most was how people extended the beer cache analogy.
— Слоупок опаздывает (@is_a_cdr) November 7, 2014
Some focused on the actual act of drinking of which the following was one of the family-friendly one.
— Jordan Blake (@Jksblkt) November 17, 2014
I always knew that beer and out-of-order execution are related, …
— Mattias Johansson (@folkol) November 18, 2014
… but that you can even explain prefetching with the beer cache analogy was a surprise.
— Calvin Walton (@kepstin) November 21, 2014
Enjoy your weekend!