Skip to content

Reduce nfs max_session_lots from 64 to 4 #93

Merged
merged 1 commit into from
May 24, 2019
Merged

Commits on May 24, 2019

  1. 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.
    donald committed May 24, 2019
    Configuration menu
    Copy the full SHA
    caadb40 View commit details
    Browse the repository at this point in the history