Topics /

Systems & Performance

The most popular blog posts about systems & performance on Hacker News. 6,942 posts.

Any year
2642

Async I/O on Linux in databases

I've been working on a complex multi-model database for a few weeks now, and recently I took time to simplify and test out an idea I had on a simple key-value database. I started with the basics: A hash table in memory, a simple append-only log

2651

On Sharding

If you need to handle really a lot of traffic, there’s only one way to do it: sharding. Which is to say, splitting up the incoming requests among as many hosts (or Lambda functions, or message brokers, or data streams) as you need. Once you get this working you can handle an essentially unlimited request volume. Of…

2654

Virtual Memory with 256 Bytes of RAM

I just finished updating my C compiler and minimal CPU specification to include virtual memory. The process of adding virtual memory support to a CPU, a kernel, and a compiler toolchain has made me realize that there is a lack of good explanations for how all of these parts fit together. I also realized that a…

2655

Setenv Is Not Thread Safe and C Doesn't Want to Fix It

You can't safely use the C setenv() or unsetenv() functions in a program that uses threads. Those functions modify global state, and can cause other threads calling getenv() to crash. This also causes crashes in other languages that use those C standard library functions, such as Go's os.Setenv ( Go issue ) and Rust's…

2658

A Review of Linux on Surface Pro 4

I bought a Surface Pro 4 in 2016. It has an Intel Core m3-6Y30 CPU and 4GB memory. The spec is not that impressive even compared to an average laptop released years earlier. On the other hand, the form factor is very attractive to me: at a very low price, you get a tablet with a beautiful HiDPI 2k screen, a pressure…

2665

Curious lack of sprintf scaling

Some days ago I noticed that on a Mac, doing snprintf calls from multiple threads shows curious lack of scaling ( see tweet ). Replacing snprintf with {fmt} library can speed up the OBJ exporter in Blender 3.2 by 3-4 times . This could have been the end of the story, filed under a “eh, sprintf is bad!” drawer, but I…

2667

Run OpenBSD on DigitalOcean for $4/month

My homepage now runs on OpenBSD with httpd(8) and Let's Encrypt via acme-client(1) . I previously hosted it on GitHub Pages and then eventually moved to Cloudflare Pages because both options were free and easy. Free and easy is cool, and I understand that writing software full-time leaves us wanting absolutely nothing…