How can I improve NFS performance for remote home directories in Linux?

June 29, 2025 1 answer
Asked by CuriousCat42
I'm experiencing some lag and unresponsiveness on my Linux machine when using a remote home directory on an NFS share. We have a setup with Active Directory/LDAP for user authentication and NFS for home directories, which automatically mount using autofs. While the performance is adequate, it's not as smooth as I would like. The lag primarily happens when launching applications, like Google Chrome, which faces delays during the first few seconds after startup. Are there any specific settings or parameters I can adjust to enhance the performance and reduce the lag, especially for NFS users as opposed to local ones?

Answers

Techie442
One major improvement we noticed was switching from UDP to TCP for NFS connections. Before that, we encountered these odd UDP packet storms that caused auto mounts to take around 10 seconds. Once we switched to TCP, our mount times dropped to about 100ms. Also, consider reducing the number of shared directories; for instance, sharing just '/home' instead of all subdirectories can help. Additionally, increasing autofs timeouts might reduce the overhead caused by frequent mount maintenance.
Reply to this answer

Add your answer

Answers are reviewed before publication.

Related Discussions