Hacker News new | ask | show | jobs
by zandl 2733 days ago
Every time I read about DragonFly I’m never quite sure what it can do that’s different than other OSes that makes it interesting. The best I can tell it’s just that some of the subsystems are different and it’s more of an experiment for under the hood OS features.
2 comments

Their filesystem is interesting but what I find impressive is they're at like a linux level of performance despite having a team of like 10 people because of the way they approached concurrency. I believe they spawned out of dillon disagreeing with freebsd's approach, and it's beautiful to me that they're competitive with linux despite not having a huge team of people polishing it.

I also want to say that Matthew Dillon is brilliant and a wonderful person. I played with dragonflybsd on my laptop for a while and hung out in the IRC, and he was always around and willing to help. I found a couple legitimate bugs and he had non-trivial patches up for me in like an hour.

Their networking stuff is very cool too, I can't really remember the details once, but I remember seeing an article about high performance networking that explained why you wanted to avoid the linux kernel so that you could do x,y and z yourself, and dillon explained that dragonfly kernel just does all that stuff itself.

I wish it got more use because there's so much potential there, but it's quite a chicken and the egg problem, and honestly I feel like the BSDs are kind of doomed unless they add apis that support linux containers.

IIRC, Matt forked FreeBSD from v4 as he disagreed with the approach taken to SMP (ie multi processor support) in v5. He forked v4 and wrote his own patch set to deliver SMP support. That is a long time ago. I haven’t run Hammer / Hammer2 so cannot comment on why it is awesome. To me my file system needs to be properly battle tested and trusting my precious personal data to a one man band feels a bit too esoteric.

I have always wondered how Matt makes a living from this given the somewhat niche positioning of Dragonfly?

I think after Best Internet exited he likely did quite well, it’s possible he’s just doing DragonFly as a full time hobby. But I have no idea.
Looks like its goal is to provide a built-in support for implementing distributed systems (clustering, NUMA, etc.).
It started off when Dillon disagreed with the way FreeBSD was doing NUMA. He had his own ideas, so went off to ferment them.
SMP, not NUMA, but otherwise yes.
I vaguely recall this as well, do you remember what was better about his approach?
Hah, I wasn't around at that time. I believe FreeBSD 5 went ahead and did the same thing most other BSDs and Linux did initially, which was the so-called "Giant" lock scheme, where only one CPU could be in the kernel at a time. The plan being to gradually break things into smaller locks. That's more or less worked (for FreeBSD and maybe NetBSD — OpenBSD still has notoriously poor kernel concurrency in 2018), but didn't yield high concurrency up front, and there are still vestigial uses of Giant in FreeBSD.

I think Dillon had some sort of lock token thing? It looks like they're described here, under "LWKT Serializing Tokens:" https://www.dragonflybsd.org/docs/developer/Locking_and_Sync... . Looks somewhat easier to integrate but also some tradeoffs — proper restart when all your lock tokens get dropped seems like it might be fiddly.