Empirically I've been able to mount about 800 file systems concurrently when using udp.
With TCP, you can mount the same number, but it will take you longer. The reason for this is that for each mount attempt you make, the client uses up multiple reserved ports. After the mount command has finished, all but one of these ports are released. However, since you're using TCP, the socket must now go through the TIME_WAIT state, to keep other stray packets in the network from arriving and mucking up any new connections. This state typically lasts 2 * MSL, which is about 2 minutes. After this timeout, these reserved ports are free for use once again.
So, the practical upshot of this is that you can't mount more than about 100 TCP NFS mounts at a time (again, empirical evidence suggests this number given a RHEL 3 client).
The next question you may have is, "What can be done to address this problem?" There are a couple of things.
First, Steve Dickson has proposed patches to both RHEL 3 and RHEL 4 which will allow NFS to draw reserved ports from the full range of available ports (i.e. 1-1023). This will likely get us to about 1000 mounts.
Another method of increasing the number of available mounts is multiplexing connections. This would allow multiple nfs mounts to share one connection, thus reducing the pressure on reserved port space, and boosting the maximum number of NFS mounts as a result. Note, however, that this is a per server connection. So, if you are mounting from 1024 different servers, connection multiplexing doesn't buy you anything.
jmoyer@redhat.com Last modified: Fri Jul 15 15:24:12 EDT 2005