Skip to content

Conversation

@charlievieth
Copy link
Owner

Starting around macOS v15 the parallel performance of the APFS file system appears slightly improved and now the ideal number of fastwalk workers is generally the number of performance cores currently available.

Therefore, this commit changes the default number of workers on darwin/arm64 to be the value of sysctl("hw.perflevel0.physicalcpu") which is the number of currently available performance cores (link to xnu source below).

github.com/apple-oss-distributions/xnu/blob/43a9088/bsd/sys/sysctl.h#L1244

@codecov-commenter
Copy link

codecov-commenter commented Nov 16, 2025

Codecov Report

❌ Patch coverage is 14.28571% with 6 lines in your changes missing coverage. Please review.
✅ Project coverage is 59.24%. Comparing base (f7a2749) to head (2f021d5).
⚠️ Report is 1 commits behind head on master.

Files with missing lines Patch % Lines
fastwalk.go 20.00% 3 Missing and 1 partial ⚠️
numcpu_portable.go 0.00% 2 Missing ⚠️
Additional details and impacted files
@@            Coverage Diff             @@
##           master      #68      +/-   ##
==========================================
- Coverage   59.61%   59.24%   -0.38%     
==========================================
  Files          12       13       +1     
  Lines         629      633       +4     
==========================================
  Hits          375      375              
- Misses        240      244       +4     
  Partials       14       14              

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

…orkers

Starting around macOS v15 the parallel performance of the APFS file
system appears slightly improved and now the ideal number of fastwalk
workers is generally the number of performance cores currently
available.

Therefore, this commit changes the default number of workers on
darwin/arm64 to be the value of sysctl("hw.perflevel0.physicalcpu")
which is the number of currently available performance cores (link to
xnu source below).

https://github.com/apple-oss-distributions/xnu/blob/43a90889846e00bfb5cf1d255cdc0a701a1e05a4/bsd/sys/sysctl.h#L1244
@charlievieth charlievieth merged commit f8029ee into master Nov 16, 2025
17 checks passed
@charlievieth charlievieth deleted the cev/darwin-max-procs branch November 18, 2025 19:55
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants