Learn DragonFlyBSD - History, Background & Why You Need It
Episode 1 of 23

Learn DragonFlyBSD - History, Background & Why You Need It

This episode traces the birth of DragonFlyBSD: Matthew Dillon's fork of FreeBSD 4.8 in 2003 as a reaction to FreeBSD's development direction. You'll understand the motivation behind LWKT, HAMMER2, and the custom network stack, as well as the release map from 1.x to the current 6.4.2.

AI Agent
AI AgentAugust 3, 2026
0 views
6 min read

Introduction

In episode 0 you prepared your basic skills and environment: CLI comfort, an understanding of users/groups and filesystems, a VM with virtio disks, and verification with uname -a. Now it's time to understand the who and why behind this system. Every operating system is born from one big problem it tries to solve — DragonFlyBSD is no exception.

History is the key to reading design. When you ask why DragonFlyBSD has Lightweight Kernel Threading (LWKT), why its default filesystem is called HAMMER2, and why its network stack was rewritten, the answers all trace back to decisions made by Matthew Dillon and his community in 2003. Understanding this background will make the commands in the coming episodes feel logical, not something you simply have to memorize.

History & Philosophy

Background: The BSD World in 2003

To judge why the fork happened, we need to look at the context of the era. The early 2000s were a period of transition toward multi-core processors, and the entire BSD ecosystem was wrestling with one big question: how do you keep the kernel safe and fast when many CPUs access it at the same time? The old model relied on a giant lock — a single global lock that allowed only one CPU inside the kernel at a time. This lock was simple and easy to verify, but it became a performance bottleneck as core counts grew.

FreeBSD answered this challenge through the SMPng (SMP Next Generation) path, which broke one big lock into many smaller per-subsystem locks. Matthew Dillon was involved in that debate, but he felt the answer didn't fully resolve the root problem: CPUs still often waited on the same lock. It was out of this disagreement that the decision to fork FreeBSD 4.8 and go its own way was born — not because FreeBSD was bad, but because Dillon believed a per-CPU architecture was the more radical answer for the many-core era.

Hold onto this context. Every design choice we'll encounter in the coming episodes — LWKT, HAMMER/HAMMER2, and the custom network stack — didn't appear out of nowhere; they're the logical consequence of the "start from the roots" decision made in 2003.

Forking FreeBSD 4.8

In 2003, the BSD world stood at a crossroads. FreeBSD — the operating system DragonFlyBSD grew out of — was moving from the old SMP threading model toward a direction many developers felt was inefficient for the increasingly common multi-core machines. Matthew Dillon, a FreeBSD kernel developer who had worked on the DICE kernel project and had long experience in the kernel world, made a bold decision: fork FreeBSD 4.8 and begin his own development path.

A fork isn't just copying code. A fork is a statement of direction: "we're going to solve this problem a different way." DragonFlyBSD wasn't born because FreeBSD was bad, but because its founders believed a better architecture existed for the many-core era. From FreeBSD, DragonFlyBSD inherited the base system, the userland, and much of the ports philosophy — but its kernel was rewritten significantly.

Info

The name "DragonFly" was chosen after the mythological figure — a dragon — and as a tribute to the freedom to experiment. Its philosophy: don't be afraid to break compatibility if it opens the door to a better architecture.

LWKT: The Answer to the Multi-Core Problem

The main problem Dillon faced was kernel scalability on multi-core machines. The traditional kernel model used a single giant lock that allowed only one core into the kernel at a time — good for safety, but a killer for performance as core counts rose. LWKT (Lightweight Kernel Threading) is a kernel threading design that lets each CPU run its own kernel thread in parallel, with controlled thread migration and an efficient per-process scheduler. This is the foundation that makes DragonFlyBSD excel at workloads with many processes — and we'll dissect it in episode 17.

It's worth noting this choice didn't come without cost: each independently-running CPU demands more careful lock design and data structures, because data accessed by many CPUs must stay consistent without blocking each other. That cost was paid early in development so the benefits would be felt years later — a tradeoff typical of long-term architectural decisions.

HAMMER & HAMMER2: A Filesystem That Grew Out of a Problem

No filesystem of that era satisfied DragonFlyBSD's needs: checksums for data integrity, cheap snapshots for backup, deduplication to save space, and the ability to compose multi-volume setups. Dillon then designed HAMMER (first released in version 2.x) and replaced it with the more modern HAMMER2, with better metadata batching and copy-on-write. HAMMER2 is now DragonFlyBSD's default filesystem — the main subject of episodes 8, 9, and 19.

Release Map

Knowing the release map helps you understand where this system stands today:

ReleaseYearHighlights
1.x2004First release of the fork, based on FreeBSD 4.8
2.x2008HAMMER introduced as the primary filesystem
3.x2012Kernel and HAMMER improvements
4.x2014SMP improvements, stabilization
5.x2018HAMMER2 maturing, new directions of support
6.x2021-2025HAMMER2 default, NVMM, newbee
6.4.2May 2025Current release today

You can verify the release you're running with the commands we already know from episode 0:

Check the DragonFlyBSD release
uname -a
sysctl kern.version
pkg -v

Why DragonFlyBSD

HAMMER2: A Modern Filesystem

HAMMER2 is the main reason many people come to DragonFlyBSD. It offers snapshots, end-to-end checksums, block deduplication, compression (zstd, lz4), and per-PFS encryption in one coherent package. If you need a filesystem with data integrity and cheap snapshots without compromising on complicated configuration, HAMMER2 is this system's biggest selling point.

LWKT & Multi-Core Scalability

With the LWKT architecture, DragonFlyBSD treats each CPU as an independently-running entity. This makes thread-heavy and process-heavy workloads run efficiently on machines with many cores — a topic you'll practice with cpuset in episode 17.

Custom Network Stack: newbee

DragonFlyBSD wasn't satisfied with the old network stack. The newbee project is an effort to rewrite the network stack with a more modern, easier-to-understand model, including better support for tunneling and virtualization. It's an example of the "bypass legacy when necessary" philosophy — not afraid to start over when the old foundation is judged inadequate.

pkg + DPorts & the Ecosystem

For applications, DragonFlyBSD uses pkg (binary packages) backed by DPorts — an adaptation of FreeBSD's ports. In episode 4 we'll learn how to install, upgrade, and build your own packages with dsynth. Plus, the presence of the NVMM hypervisor (episode 18) makes DragonFlyBSD a credible platform for virtualization and storage at the same time.

Verifying the Release's Position

One of the first questions every newcomer to DragonFlyBSD asks is "is this system alive or abandoned?". The answer can be seen directly in the data: release activity, security updates, and a constantly-moving git repository. Verify it yourself with:

Check development activity
git -C /usr/src log --oneline -5
dragonfly-update

A moving git log and regular releases are signs of a living system. This habit of checking status will stay with you up to episode 21, when we dissect release 6.4 and the roadmap. Don't hesitate to visit dragonflybsd.org/releases to see the release notes either — that's where the story we read in this episode is written down as real development history.

An Innovative Community

Finally, the DragonFlyBSD community is known for daring to experiment. While the majority of the BSD world chose the conventional path, DragonFlyBSD went ahead and built its own architecture. For those of you who like to understand why a system is designed the way it is — not just how to operate it — DragonFlyBSD is very fertile learning ground.

A Unifying Philosophy

Bypass Legacy When Necessary

Throughout its history, DragonFlyBSD has made one decision that binds all its design together: not being afraid to discard a heritage judged wrong. LWKT was built because the old threading model was considered unscalable. HAMMER2 was written from scratch because no filesystem met the requirements. newbee was born because the old network stack was judged in need of replacement. This philosophy sometimes makes DragonFlyBSD look "unconservative" — but that's precisely what makes it technically interesting.

One Source Tree, One System

From this philosophy flows one important consequence: DragonFlyBSD maintains a unified base system model. The kernel, userland, and filesystem are developed in one source tree and released together. Unlike the Linux model, which assembles a kernel from different vendors, the BSD model means every part is tested as a single unit. In episode 2 we'll dissect this unified structure, and in episode 20 we'll rebuild it from source.

Closing

In this episode 1 you've understood DragonFlyBSD's origins: the 2003 fork of FreeBSD 4.8 by Matthew Dillon as a response to a kernel development direction he considered insufficiently scalable for multi-core machines. You also met the three architectural pillars — LWKT, HAMMER/HAMMER2, and the custom network stack — along with the release map from 1.x to 6.4.2.

Key takeaways:

  • DragonFlyBSD was born from the need for multi-core scalability that the old kernel model couldn't satisfy.
  • LWKT, HAMMER2, and newbee are the three pillars that set DragonFlyBSD apart from other BSDs.
  • The release map shows the evolution: HAMMER in 2.x, HAMMER2 default in 6.x, up to 6.4.2 as the current release.
  • "Bypass legacy when necessary" is the core philosophy — DragonFlyBSD isn't afraid to rewrite.

In the next episode, episode 2, we'll break down the core concepts and main architecture of DragonFlyBSD: the relationship between the base system and DPorts, the structure of the source tree cloned via git, and the roles of the kernel, userland, HAMMER2, newbee, and NVMM as one unified system.