Skip to content

Conversation

@djeebus
Copy link
Contributor

@djeebus djeebus commented Oct 31, 2025

This should reduce network round trips, increase thread count

removed added effect
noac actimeo=600 increase the attribute cache to 1 minute, fewer metadata operations
(default=cto) nocto disables close-to-open cache consistency, which slows down writes
rsize=524288 rsize=1048576 doubling the receive size means fewer tcp round trips, currently negotiated back down to 512 KB
(default=1) nconnect=7 more connections increases parallel requests
lookupcache=none lookupcache=pos cache successful lookups of directory entries
(default=resvport) noresvport do not use a privileged port when making connections. increases maximum nfs mount points. unlikely to help, but recommended by google

Note

Optimizes nfs_mount_opts in iac/provider-gcp/nomad-cluster/main.tf to improve NFS throughput and reduce latency.

  • IaC (GCP Nomad cluster):
    • Update locals.nfs_mount_opts in iac/provider-gcp/nomad-cluster/main.tf to optimize NFS behavior:
      • Add: actimeo=600, async, hard, lookupcache=positive, nconnect=7, nocto, noresvport, retrans=2, rsize=1048576, wsize=1048576, timeo=600, sec=sys.
      • Remove/replace: lookupcache=none, noac, tcp.
      • Keep: dynamic nfsvers, noacl, nolock.

Written by Cursor Bugbot for commit 2942fde. This will update automatically on new commits. Configure here.

cursor[bot]

This comment was marked as outdated.

"noresvport", // use a non-privileged source port
"resvport", // use a privileged source port when communicating with the NFS server
"retrans=3", // retry three times before performing recovery actions
"rsize=524288", // receive 512 KB per read request
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Is tweaking this to be in sync with our cca 4MiB reads make sense?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Turns out that either our OS or the remote server is forcing us back down to 512 KB, so any increase gets ignored.

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Interesting, any idea why?

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@tomassrnka Any quick ideas?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The documents say that the servers define a maximum. Different linux distros and NFS implementations use different values, this just happens to be Google Filestore's max.

@djeebus djeebus marked this pull request as ready for review October 31, 2025 21:18
@ValentaTomas
Copy link
Member

ValentaTomas commented Oct 31, 2025

Can

nconnect=7

have any negatives if we have a lot of client nodes?

Copy link
Member

@ValentaTomas ValentaTomas left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Approving, would just like to resolve why the read/write sizes are being modified to the lower value.

@djeebus
Copy link
Contributor Author

djeebus commented Nov 5, 2025

Can

nconnect=7

have any negatives if we have a lot of client nodes?

Google gives us 8,000 connections per TB, which is far more than we're currently thinking of using. Given that, I suspect there's not much of a down side here. Worth keeping in mind if we deploy this and we start seeing latency go up.

@djeebus djeebus merged commit c54080f into main Nov 5, 2025
28 checks passed
@djeebus djeebus deleted the nfs-mount-options branch November 5, 2025 00:24
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