How Can I Speed Up NFS-Based Home Directories on Linux?
Asked by
CuriousCoder77
I'm experiencing some lag and unresponsiveness on machines that use NFS for user home directories in an Active Directory/LDAP setup. We have autofs in place to auto-mount the NFS shares when users log in, but the performance leaves a lot to be desired. Specifically, applications like Google Chrome take a while to load initially, causing slow web connections for about 30 seconds. Is there a way to optimize NFS settings or configurations to reduce this lag and improve overall performance?
Answers
One of the biggest performance boosts for us came from switching to TCP instead of UDP for our NFS connections. We were experiencing these strange packet storms with UDP that made auto mounts take foreverโup to 10 seconds! After switching to TCP, the mount times dropped to just about 100 milliseconds. We also cut down the number of shared directories, opting to share /home instead of /home/*, and increased the autofs timeouts to lower the maintenance chatter. Plus, weโre still using NFSv3, which has been great for our needs.
Reply to this answer
What NFS version are you using?
Reply to this answer
Have you checked your network bandwidth? It's worth looking into your network's architecture to see if that's a factor.
Reply to this answer
Generally, itโs advised not to share the entire /home directory over NFS. Do you have any alternative setups in mind?
Reply to this answer
Add your answer
Answers are reviewed before publication.
Related Discussions