Topics /

Systems & Performance

The most popular blog posts about systems & performance on Hacker News. 555 posts.

2023
451

-Werror Is not your friend (2017)

22 May 2017 by Phillip Johnston • Last updated 27 October 2023I want to make a few points up front to short-circuit common misunderstandings with this article: I have a zero warning policy on my projects. I turn on a lot of warnings. -Wall, -Wextra, and a whole host of specific warning flags. I supplement … Continue…

453

Practical Libc-free threading on Linux

Suppose you’re not using a C runtime on Linux, and instead you’re programming against its system call API. It’s long-term and stable after all. Memory management and buffered I/O are easily solved, but a lot of software benefits from concurrency. It would be nice to also have thread spawning capability. This article…

454

Who invented vector clocks?

Back in spring 2020, I was wrapping up the distributed systems course I was teaching, and for the last lecture, decided to spend a little time poking at the question of who actually invented vector clocks. Most people who need something to cite for vector clocks cite Friedemann Mattern’s “Virtual Time and Global…

456

Efficiency trades off against resiliency

What’s the “right” level of CPU utilization for a server? If you look at a monitoring dashboard from a well-designed and well-run service, what CPU utilization should we hope to see, averaged over a day or two? It’s a very general question, and it’s not clear it should have a single answer. That said, for a long time…

462

Batch computing and the coming age of AI systems

There’s a lot of excitement right now about human-in-the-loop systems supercharged by foundation models including chat assistants ( ChatGPT ), word processing ( Microsoft Office ), graphic design ( Stable Diffusion ), and code editing ( Copilot ). However, these systems only begin to scratch the surface of the role…

465

We Built a Streaming SQL Engine

A streaming SQL engine keeps queries’ results up to date without ever having to recalculate them, even as the underlying data changes. To explain this, imagine a simple query, such as SELECT count(*) FROM humans

466

Escape analysis hates copy elision (2021)

Yesterday Lauri Vasama showed me this awesome Godbolt: struct S { static std::unique_ptr<S> make() noexcept; ~S(); static std::unique_ptr<S> factory() { std::unique_ptr<S> s = S::make(); return M(s); } }; void take_ownership(S*) noexcept; void test() { std::unique_ptr<S> p = S::factory()…

468

Storing Data in Control Flow

A decision that arises over and over when designing concurrent programs is whether to represent program state in control flow or as data. This post is about what that decision means and how to approach it. Done well, taking program state stored in data and storing it instead in control flow can make programs much…

475

Using uninitialized memory for fun and profit (2008)

This is the story of a clever trick that's been around for at least 35 years, in which array values can be left uninitialized and then read during normal operations, yet the code behaves correctly no matter what garbage is sitting in the array. Like the best programming tricks, this one is the right tool for the job…

480

Queues should be empty

I’ve been writing a pubsub listener for work recently and had this silly “shower thought”: the ideal queue should be empty. Why? If the queue is not empty, it means that whatever job is consuming from the queue is not keeping up with messages coming into it. Ok, then if queues are supposed to be empty, then what are…