Skip to content

Instantly share code, notes, and snippets.

@jperkin
Created November 14, 2025 15:12
Show Gist options
  • Select an option

  • Save jperkin/a1065caaf09a4b31dea61f35005e389d to your computer and use it in GitHub Desktop.

Select an option

Save jperkin/a1065caaf09a4b31dea61f35005e389d to your computer and use it in GitHub Desktop.

While testing latest bindfs I wanted to see if there were any differences, so:

  • Create macos-trunk-arm64 sandbox
  • Build sysutils/coreutils
  • Time 'bmake' after depends has done.

Results:

original bindfs 1.17.7 --multithreaded

real    1m41.541s
user    1m15.336s
sys     1m16.597s

bindfs-1.18.3 --multithreaded

real    1m46.467s
user    1m16.200s
sys     1m23.400s

bindfs-1.18.3 not multithreaded

real    1m45.581s
user    1m15.562s
sys     1m21.857s

I was also curious to remember why I needed bindfs instead of using NFS mounts. To get /System mounted (which is the hot path due to lookups), I needed to also mount Preboot and Data, but after that was done the perf (despite nfsd being lower in top(1) while I was measuring compared to bindfs) was worse:

real    1m49.257s
user    1m12.550s
sys     1m39.673s
@jperkin

jperkin commented Oct 26, 2026

Copy link
Copy Markdown
Author

"upgrading" to macOS 27 made things a lot slower, so I had to do a bunch more tweaking.

first I did a bunch of testing where bindfs was being traced to see number of calls etc, this obviously had some probe effect.

baseline:
real    2m39.313s
user    1m41.577s
sys     1m35.221s

no fair_locking
real    2m38.513s
user    1m41.324s
sys     1m33.450s

multithreaded
real    2m39.885s
user    1m43.623s
sys     1m47.013s

auto_cache
real    2m39.423s
user    1m40.791s
sys     1m35.754s

iosize=65536
real    2m40.510s
user    1m42.166s
sys     1m36.439s

this indicated that a lot of time was spent doing readlink() calls for xcode due to /Applications vs /System/Volumes/Data/Applications, and also even the MacOSX15.5.sdk -> MacOSX.sdk symlink. I tweaked the configs to use the full paths, and also set CLANGBASE:

'time bmake' after clean, using iosize=64k test.
real    2m10.390s
user    1m36.257s
sys     1m27.020s

time bmake CLANGBASE=/Applications/Xcode-16.4.0.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr
real    1m52.161s
user    1m28.606s
sys     1m13.556s

time bmake (mk.conf setting everything to /System/....)
real    1m41.818s
user    1m27.684s
sys     1m2.211s

time bmake (vfsstatcache)
real    1m41.992s
user    1m27.724s
sys     1m2.328s

remove DEVELOPER_DIR and vfsstatcache
real    1m41.826s
user    1m27.444s
sys     1m2.461s

add back vfsstatcache but with full path to sdk
real    1m41.516s
user    1m28.144s
sys     1m2.348s

avoid /Applications symlink (from scratch)
real    1m51.050s
user    1m28.173s
sys     1m2.238s

same from warm and after depends
real    1m40.759s
user    1m27.336s
sys     1m0.083s

4MB multithreaded - very slightly faster but doesn't seem to be worth the squeeze
real    1m40.276s
user    1m29.547s
sys     1m5.147s

4MB local
real    1m38.425s
user    1m26.422s
sys     0m57.571s

32MB local
real    1m38.634s
user    1m27.557s
sys     0m57.753s

back to default + local?
real    1m38.876s
user    1m26.277s
sys     0m57.792s

summary

we're now at:

local bind_ro = "-o rdonly,nobrowse,noappledouble,noapplexattr,local"
local bind_rw = "-o auto_cache,nobrowse,noappledouble,noapplexattr,local"

in bob's mount options, with:

-            ln -s /System/Volumes/Data/Applications /Applications
-            ln -s /Applications/Xcode-16.4.0.app/Contents/Developer /var/select/developer_dir
+            xcode-select -s /System/Volumes/Data/Applications/Xcode-16.4.0.app

in the sandbox setup, and

CLANGBASE=             /System/Volumes/Data/Applications/Xcode-16.4.0.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr
OSX_SDK_PATH=          /System/Volumes/Data/Applications/Xcode-16.4.0.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX.sdk

etc in mk.conf

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment