NFSv4.1 nconnect effective slot bottleneck equation

// How to tune NFSv4.1 for maximum concurrency with nconnect

Overview

When using nconnect with NFSv4.1, four independent limits compete. The effective maximum in-flight NFS operations is:

\text{effective\_slots} = \min\!\bigl( \underbrace{\texttt{v4.x-session-num-slots}}_{\text{ONTAP server per-session limit}},\; \underbrace{128 \times N_{\text{nconnect}}}_{\text{ONTAP per-connection cap}},\; \underbrace{\texttt{sunrpc.tcp\_max\_slot\_table\_entries} \times N_{\text{nconnect}}}_{\text{Client SunRPC TCP slot table}},\; \underbrace{\texttt{max\_session\_slots}}_{\text{Linux client NFS module limit}} \bigr)

FactorKnobDefaultWhere to set
ONTAP server per-session capnfs server modify -v4.x-session-num-slots180ONTAP CLI
ONTAP per-TCP-connection cap— (hardcoded at 128 per connection)128N/A
Client SunRPC TCP slot tablesunrpc.tcp_max_slot_table_entries (sysctl)65,536/etc/sysctl.d/*.conf
Linux NFS client session limitmax_session_slots (nfs module param)64/etc/modprobe.d/*.conf → reboot

Bottleneck identification

With stock defaults and nconnect=8:

  • max_session_slots = 64bottleneck (client advertises only 64 regardless of nconnect)
  • 128 × 8 = 1,024 (ONTAP cap, not limiting)
  • 65,536 × 8 = 524,288 (SunRPC table, not limiting)
  • v4.x-session-num-slots = 180 (not limiting)

Raising max_session_slots to nconnect × 64 (e.g. 512 for nconnect=8) unlocks the other factors.

See Also

TERMINAL comments.log
# opening comments.log…