Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Reduce nfs max_session_lots from 64 to 4
The default number of session slots (nfs/max_session_lots) is 64. This is the maximum number of parallel requests a nfs client can have outstanding to a nfs server (per mount). Because we have 64 nfsd threads on our servers, a single client is able to dominate all nsfd threads of a server. There seems to be a bad interaction between nfs and readahead. The readahead size is set to max_session_lots-1 and is doubled when posix_fadvice(..,POSIX_FADV_SEQUENTIAL) is used, which "cp" and "cat" do. Although the exact mechanism is not yet fully understood, the readahead io-requests seem to be handled by multiple nfsd thread in parallel, which are blocking each other while compeeting for the same block device. Because all nfsd threads are used up (by a single client doing a single copy) other nfs clients stall and we've even seen them being pushed over their lease timeouts and losing their state. Reduce this value via modprobe.d to avoid overload situations. This parameter can also be read and written on a running system via /sys/module/nfs/parameters/max_session_slots if nfs is loaded. Changes apply to future mounts only.
- Loading branch information