Email the Author
You can use this page to email Doug Hoyte about Zero Copy.
About the Book
Virtual memory is one of the most important abstractions underlying today's operating systems. By understanding how it works and the common techniques for using it, you will be able to write better performing and more efficient applications. Rather than trying to piece together information from dense sources like kernel and CPU documentation, or a patchwork of web articles, Zero Copy is a comprehensive and up-to-date guide to virtual memory.
This book starts with a thorough introduction to the topic: What virtual memory is used for and its implementation on x86-64 and Linux. As well as from a C++ programmer's perspective, command-line administrative tools like vmtouch are covered in depth.
Following is a comprehensive tutorial on LMDB, the Lightning Memory-Mapped Database, which gives us transactional access to the filesystem cache and much more. We'll go through every facet of using LMDB from languages like C, C++, Rust, and Python. We also cover advanced data serialization formats like flat buffers, capn proto, and apache arrow.
Next we'll talk about leveraging virtual memory and LMDB in real-world applications, using a C++17 websocket server as our motivating example. In particular, we'll show how to improve request latency, memory usage, CPU load, and start-up time. There is also detailed coverage on reliability and security considerations.
Finally we take a look at what the future may hold for computing with virtual memory assisted technologies like direct memory access (DAX) to NVRAM storage, CPU off-loading, and virtualization.
About the Author
I'm the inventor of vmtouch, a cross-platform command-line utility for controlling and diagnosing virtual memory that has been used by companies like Spotify and Instagram to optimize their infrastructure. I also maintain C++ bindings for the Lightning Memory-Mapped Database, as well as several other open source projects. I am the author of Let Over Lambda, a book on Lisp programming.
I admire simple solutions, efficient code, and clear explanations of technical concepts.