Async hazard: MMAP is blocking IO
Memory-mapping a file is convenient, but it's a hazard when used with async/await concurrent code: it means a "simple" memory index does blocking IO.
The latest blog posts to take off on Hacker News. 4,387 posts.
Memory-mapping a file is convenient, but it's a hazard when used with async/await concurrent code: it means a "simple" memory index does blocking IO.
How do you solve a memory heisenbug?
C. J. Date's Sigmod 1983 keynote, "Database Usability", was prescient. Usability is the most important thing to the customers. They care les...
LMAX is a retail financial trading system that can handle that can 6 million orders per second on a single JVM thread. The business logic runs in-memory surrounded by disruptors using event sourcing.
A follow-up on a previous story, in which we identify another problem, and perhaps confirm a theory through a theorem.
This article was supposed to be published all at once on July 30'th. But because of the staggered launch delay into August 8 and 15, some sections of this article were redacted until August 14th.
rqlite is a lightweight, open-source, distributed relational database written in Go. It is built on the Raft consensus protocol and uses SQLite as its storage engine. Development of 9.0 has begun and aims to reduce disk usage by approximately 50%. This goal will be achieved through a high-level design overhaul…
Using `mdb` and `pmap` to find the cause of a crash.
Over the course of working on PSRayTracing (PSRT), I've been trying to find all sorts of tricks and techniques to squeeze out more performance from this C++ project. Most of it tends to be alternative algorithms, code rewriting, and adjusting data structures. I thought sprinkling the final keyword like an all purpose…
A high-level overview of how PostgreSQL stores data on disk, covering segments, pages and more.
Disclaimer: This is to the best of my knowledge. It's a complicated topic, there are tons of options, and this only covers a tiny fraction of this topic anyway. If you spot mistakes, please tell me.
Go has good support for calling into assembly, and a lot of the fast cryptographic code in the stdlib is carefully optimized assembly, bringing speedups of over 20 times.
We show that a system that has only GNU's find and mkdir commands is Turing-complete.
One of Go's advantages is being able to produce statically-linked binaries [1] . This doesn't mean that Go always produces such binaries by default, however; in some scenarios it requires extra work to make this happen. Specifics here are OS-dependent; here we focus on Unix systems.
I think I should blog more about random troubleshooting sessions, if nothing else it will remind me what steps I took when it inevitably happens again!
A couple of years ago I wrote about tolower() in bulk at speed using SWAR tricks . A couple of days ago I was interested by Olivier Giniaux’s article about unsafe read beyond of death , an optimization for handling small strings with SIMD instructions, for a fast hash function written in Rust.
Learn the microarchitecture-level details of the processor that enable to execute two threads at the same time on a CPU core
A large contributor to the "feel" of an Operating System comes from the software it chooses to include by default. There are entire linux distributions that differentiate themselves just based on the default configured software. There is room for so many options of base software because there are in general many…
In my previous post , I mentioned that I found a number of oddities when digging through the details of various Atari 8-bit file systems. I...
Creating a simple driver for a simple PCI-e device (in QEMU)
https://blog.packagecloud.io/illustrated-guide-monitoring-tuning-linux-networking-stack-receiving-data/
How I scaled One Million Checkboxes to handle half a million users
Introduction & background information NOTE: This content is from an internal talk I gave, thus the reason it may read like a presentation So what is …
code { white-space : pre-wrap !important; } This article is tightly scoped to cover one topic with specific, actionable advice: How to configure...
Brewer’s CAP theorem, and Gilbert and Lynch’s formalization of it , is the first introduction to hard trade-offs for many distributed systems engineers. Going by the vast amounts of ink and bile spent on the topic, it is not unreasonable for new folks to conclude that it’s an important, foundational, idea.
Lately I’ve been thinking about Stephan Berger’s recent blog post on hiding Linux processes with bind mounts. Bottom line here is that if you have an evil process you want to hide, use …
A door is a "file" descriptor used to describe a procedure in a process and optionally some additional state associated with the procedure. Doors were initially designed as Spring object descriptors used to encapsulate the state and capabilities of C++ objects. A process which obtains a door is free to pass it, along…
“Summing ASCII Encoded Integers on Haswell at the Speed of memcpy” turned out more popular than I expected, which inspired me to take on another challenge on HighLoad: Counting uint8s . I’m currently only #13 on the leaderboard, ~7% behind #1, but I have already learned some interesting things. In this post I’ll…