How we saved 100 terabytes of memory by optimizing 1.1.1.1’s DNS cache

28 points by rmpr


baetylboy

Interesting, I was expecting some super complex rust shenanigans when I read about the breadth of their benchmarking setup (wrapping the system allocator, large test dataset, etc.), but actually reading through the optimizations, they are pretty simple and easy to understand. A lot of them are dependent on the minute details of their exact use case, which I guess goes to show how important knowledge about your system is in optimizing it. This seems kind of obvious in retrospect, and is no doubt the reason for the complex benchmarking setup. Good read on an interesting topic

bal-e

Oh, it looks like they might be using some of the domain::new API I put together! Box<Name> stands out in particular. That's really cool :)

sanxiyn

Will we see more software less profligate (I dare not expect frugal, but less profligate, sure) with memory? I really hope so.

tobin_baker

I got the impression that these sorts of simple low-level optimizations are really at odds with idiomatic Rust.