Skip to content

Commit c31d293

Browse files
MichaelCuevasmeta-codesync[bot]
authored andcommitted
nfs: Enable JUKEBOX backpressure threshold on macOS
Summary: Change the `fschannel:max-inflight-requests` default from 0 (disabled) to `10 * CPU count` on macOS, keeping it disabled on other platforms. This enables NFS3ERR_JUKEBOX backpressure by default on macOS, where NFS is the mount protocol. The threshold of 10× CPU count provides 24× headroom over steady-state concurrency (~4.3) and 2.4× over ODS p99 estimates (~42), while keeping drain time trivial (13.6ms at 100 requests vs 20s kernel timeout). False positives are expensive (1s retry penalty from MUTEJUKEBOX backoff vs 139µs avg service time), so the threshold errs on the generous side. The threshold scales naturally across Mac hardware: 80 on M1, 100 on M1 Pro, 120 on M2 Pro, 160 on M3 Max. Reviewed By: giorgidze Differential Revision: D100398611 fbshipit-source-id: c4d12ce644be8a10080193c5cb5e8ec98fa613f4
1 parent 0abf63a commit c31d293

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

eden/fs/config/EdenConfig.h

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1138,10 +1138,12 @@ class EdenConfig : private ConfigSettingManager {
11381138
* available, NFS returns NFS3ERR_JUKEBOX causing the client to retry.
11391139
* This value is also used as the threshold for logging high request counts.
11401140
* When set to 0, no limit is enforced and no logging will occur.
1141+
* Defaults to 10× CPU count on macOS (~100 on typical Macs), 0 (disabled)
1142+
* on other platforms.
11411143
*/
11421144
ConfigSetting<uint64_t> maxFsChannelInflightRequests{
11431145
"fschannel:max-inflight-requests",
1144-
0,
1146+
folly::kIsApple ? folly::available_concurrency() * 10 : 0,
11451147
this};
11461148

11471149
ConfigSetting<std::chrono::nanoseconds> highFsRequestsLogInterval{

0 commit comments

Comments
 (0)