Live data from Hacker News

Global Kernel Locks in APFS

gregoryszorc.com

41–47 of 47 posts

Re: Global Kernel Locks in APFS

#41

I wonder if this is why recent versions of macOS performs so poorly on old HDD-based MacBooks. The difference between my work's 2012 MacBook (HDD) and my personal 2015 (SSD) MacBook is like night and day. Most apps open in a second on my SSD MacBook yet take up to a minute to open on my employer's HDD MacBook. It's not just this MacBook, I also see the same on a work iMac as well. Such a shame as these older machines…

APFS is still (afaik) only used on SSDs. So your HD boot volume is probably HFS even on Mojave.

Re: Global Kernel Locks in APFS

#42
post #20
post #7

Earlier quoted context omitted.

They do plan to document it fully later: > Is APFS open source? > An open source implementation is not available at this time. Apple plans to document and publish the APFS volume format specification. Source: https://developer.apple.com/library/archive/documentation/Fi... My theory is that Apple rushed APFS and its implementation isn't in a great shape for the public review. APFS doesn't feel any faster on my SSDs on…

> My theory is that Apple rushed APFS and its implementation isn't in a great shape for the public review. The rollout of APFS was _incredibly_ well done; I don't think there is even a remote comparison to how successful it was. A new file system was rolled out to millions of devices in an automated fashion with very few issues. I don't think anyone else has even considered such a thing. I highly doubt the code is th…

You mean besides the fact that the volume encryption password was stored in plain text in the disk?

https://thehackernews.com/2018/03/macos-apfs-password.html

Re: Global Kernel Locks in APFS

#44

I wonder if this is why recent versions of macOS performs so poorly on old HDD-based MacBooks. The difference between my work's 2012 MacBook (HDD) and my personal 2015 (SSD) MacBook is like night and day. Most apps open in a second on my SSD MacBook yet take up to a minute to open on my employer's HDD MacBook. It's not just this MacBook, I also see the same on a work iMac as well. Such a shame as these older machines…

2015 was the year that Apple moved to NVMe SSDs, so they are bound to feel much more snappy than spinning rust disks, regardless of the file system involved. https://www.anandtech.com/show/9136/the-2015-macbook-review/...

Except for their desktops models, the base models of even the 5K iMac still ship with a Fusion Drive, and we only just got support for APFS on those configurations with macOS 10.14. As the base models are typically all authorized Apple Resellers and pop up stores get they must sell a bunch of those especially in regions where there aren’t a lot of Apple Stores (and where people don’t want to pay full price for a year old system).

They are going to need to support and perform well on non-SSD systems for quite a while.

Re: Global Kernel Locks in APFS

#45
I'm too late to the thread, but wonder if locking might have to do with updating access times on the dirs on read--that would help justify a read-only workload taking some sort of exclusive lock. The "fix" there would be something like relatime to get atimes set infrequently.

There're def a ton of other possibilities. Some locking could be overbroad, like an exclusive lock where a reader lock would be enough. I don't see super-strong evidence that any locks involved are actually global, just that they're under contention here. And I can understand shipping a product with somewhat excessive locking because perf issues with specific workloads are a better problem to have with your shiny new FS rollout than data loss.

Anyway it's mostly shooting in the dark for us here (though cool some folks disassembled the functions), but there are some shots in the dark that look different from what I could find in the comments already here :)

Re: Global Kernel Locks in APFS

#46
post #17
post #7

Earlier quoted context omitted.

They do plan to document it fully later: > Is APFS open source? > An open source implementation is not available at this time. Apple plans to document and publish the APFS volume format specification. Source: https://developer.apple.com/library/archive/documentation/Fi... My theory is that Apple rushed APFS and its implementation isn't in a great shape for the public review. APFS doesn't feel any faster on my SSDs on…

What makes you think it’s a rush job? Perhaps it’s just the lawyer reviews holding it up.

Because on two separate occasions, APFS ate all of my free space resulting into me reinstalling macOS as the system was locking up. (Yes, I filed a radar, and yes they fixed it, only to regress 6-8 months later).

Re: Global Kernel Locks in APFS

#47
As someone who used to work on BitKeeper, I'm tickled to see a more popular SCM's test suite as a kind of de facto filesystem benchmark -- confirming what we had been observing ourselves forever.
Post reply on HN