<!-- mobian-agent-page publisher="dailydev" canonical="https://daily.dev/posts/make-your-qemu-10-times-faster-with-this-one-weird-trick-g3j4ghu5y" -->

---
title: Make your QEMU 10 times faster with this one weird trick
description: A developer investigating slow NixOS VM tests discovered that QEMU's 9p file server was using a linked list to look up open file handles (fids), resulting in...
canonical: https://daily.dev/posts/make-your-qemu-10-times-faster-with-this-one-weird-trick-g3j4ghu5y
twitter:card: summary_large_image
twitter:site: @dailydotdev
og:type: website
og:site_name: daily.dev
og:title: Make your QEMU 10 times faster with this one weird trick | daily.dev
og:description: A developer investigating slow NixOS VM tests discovered that QEMU's 9p file server was using a linked list to look up open file handles (fids), resulting in...
og:url: https://daily.dev/posts/make-your-qemu-10-times-faster-with-this-one-weird-trick-g3j4ghu5y
og:image: https://api.daily.dev/og/posts/g3J4ghU5y.png
og:image:alt: Make your QEMU 10 times faster with this one weird trick
og:image:width: 1200
og:image:height: 630
og:locale: en
---

> ## Documentation Index
> Fetch the complete documentation index at: https://daily.dev/llms.txt
> Use this file to discover all available pages before exploring further.

# Make your QEMU 10 times faster with this one weird trick

**[Determinate Systems](https://daily.dev/sources/determinate-systems)** · 9 min read · 0 upvotes · 0 comments

## Summary

A developer investigating slow NixOS VM tests discovered that QEMU's 9p file server was using a linked list to look up open file handles (fids), resulting in O(n) complexity per file operation. With 278k files being copied, this caused a test that should take minutes to run for over 2 hours. After profiling with perf and flame graphs, the fix was replacing the linked list with a glib hash table, reducing lookup to O(1) and cutting test time from 2+ hours to 7 minutes. The patch was submitted upstream to QEMU via its email-based workflow and accepted. The post also covers the profiling journey using poor man's profiler and perf, PID namespace quirks with gdb, and lessons learned from contributing to an open source project.

## Full article

daily.dev links to this article rather than hosting it. Read it at the original source: <https://determinate.systems/blog/qemu-fix>

## Similar posts on daily.dev

- [Simple Optimization For Linux 7.4 Can Open Files For Reading ~39% Faster](https://daily.dev/posts/simple-optimization-for-linux-7-4-can-open-files-for-reading-39-faster-zaaxl2fpm) · Phoronix · 0 upvotes · 0 comments
- [How a 40-Line Fix Eliminated a 400x Performance Gap](https://daily.dev/posts/how-a-40-line-fix-eliminated-a-400x-performance-gap-knjx43zh3) · Hacker News · 1 upvotes · 0 comments
- [I built a 2x faster lexer, then discovered I/O was the real bottleneck](https://daily.dev/posts/i-built-a-2x-faster-lexer-then-discovered-i-o-was-the-real-bottleneck-x9d2r1nis) · Lobsters · 0 upvotes · 0 comments
- [Making devenv start fast, and the whole nixpkgs with it](https://daily.dev/posts/making-devenv-start-fast-and-the-whole-nixpkgs-with-it-acjj6izku) · Lobsters · 2 upvotes · 0 comments

---

Tags: [#performance](https://daily.dev/tags/performance), [#nixos](https://daily.dev/tags/nixos)

[View this post on daily.dev](https://daily.dev/posts/make-your-qemu-10-times-faster-with-this-one-weird-trick-g3j4ghu5y)

```json
{"@context":"https://schema.org","@graph":[{"@type":"Organization","@id":"https://daily.dev/#organization","name":"daily.dev","url":"https://daily.dev","logo":{"@type":"ImageObject","url":"https://daily.dev/apple-touch-icon.png","width":180,"height":180},"sameAs":["https://twitter.com/dailydotdev","https://github.com/dailydotdev","https://www.linkedin.com/company/daily-dev-ltd"]},{"@type":"WebSite","@id":"https://daily.dev/#website","url":"https://daily.dev","name":"daily.dev","publisher":{"@id":"https://daily.dev/#organization"},"potentialAction":{"@type":"SearchAction","target":{"@type":"EntryPoint","urlTemplate":"https://daily.dev/search?q={search_term_string}"},"query-input":"required name=search_term_string"}}]}
{"@context":"https://schema.org","@type":"TechArticle","headline":"Make your QEMU 10 times faster with this one weird trick","url":"https://daily.dev/posts/make-your-qemu-10-times-faster-with-this-one-weird-trick-g3j4ghu5y","mainEntityOfPage":{"@type":"WebPage","@id":"https://daily.dev/posts/make-your-qemu-10-times-faster-with-this-one-weird-trick-g3j4ghu5y"},"datePublished":"2026-07-26T07:48:32.284Z","dateModified":"2026-07-26T07:52:43.888Z","description":"A developer investigating slow NixOS VM tests discovered that QEMU's 9p file server was using a linked list to look up open file handles (fids), resulting in...","image":"https://media.daily.dev/image/upload/f_auto,q_auto/v1/posts/eb8d017b877ced192c9253269ba60ab9?_a=AQAEuop","thumbnailUrl":"https://media.daily.dev/image/upload/f_auto,q_auto/v1/posts/eb8d017b877ced192c9253269ba60ab9?_a=AQAEuop","isAccessibleForFree":true,"articleSection":"Determinate Systems","inLanguage":"en","publisher":{"@type":"Organization","name":"daily.dev","url":"https://daily.dev","logo":{"@type":"ImageObject","url":"https://daily.dev/apple-touch-icon.png","width":180,"height":180}},"author":{"@type":"Organization","name":"Determinate Systems","logo":"https://media.daily.dev/image/upload/s--E2qrkc9w--/c_limit,w_256/f_auto,q_auto/v1785052094/logos/determinate-systems?_a=BAMAMicg0","url":"https://daily.dev/sources/determinate-systems"},"commentCount":0,"discussionUrl":"https://daily.dev/posts/make-your-qemu-10-times-faster-with-this-one-weird-trick-g3j4ghu5y","interactionStatistic":[{"@type":"InteractionCounter","interactionType":{"@type":"LikeAction"},"userInteractionCount":0},{"@type":"InteractionCounter","interactionType":{"@type":"CommentAction"},"userInteractionCount":0}],"keywords":"performance,nixos","timeRequired":"PT9M"}
{"@context":"https://schema.org","@type":"BreadcrumbList","itemListElement":[{"@type":"ListItem","position":1,"name":"Home","item":"https://daily.dev"},{"@type":"ListItem","position":2,"name":"Determinate Systems","item":"https://daily.dev/sources/determinate-systems"},{"@type":"ListItem","position":3,"name":"Make your QEMU 10 times faster with this one weird trick"}]}
```

