nfscl: Make vfs.nfs.maxcopyrange larger by default
As of commit 103b207536
, the NFSv4.2 server will limit the size
of a Copy operation based upon a 1 second timeout. The Linux 5.2
kernel server also limits Copy operation size to 4Mbytes.
As such, the NFSv4.2 client can attempt a large Copy without
resulting in a long RPC RTT for these servers.
This patch changes vfs.nfs.maxcopyrange to 64bits and sets
the default to the maximum possible size of SSIZE_MAX, since
a larger size makes the Copy operation more efficient and
allows for copying to complete with fewer RPCs.
The sysctl may be need to be made smaller for other non-FreeBSD
NFSv4.2 servers.
MFC after: 2 weeks
This commit is contained in:
parent
b9485d76e3
commit
55089ef4f8
@ -95,10 +95,6 @@ int nfsrv_maxpnfsmirror = 1;
|
||||
SYSCTL_INT(_vfs_nfs, OID_AUTO, pnfsmirror, CTLFLAG_RD,
|
||||
&nfsrv_maxpnfsmirror, 0, "Mirror level for pNFS service");
|
||||
|
||||
int nfs_maxcopyrange = 10 * 1024 * 1024;
|
||||
SYSCTL_INT(_vfs_nfs, OID_AUTO, maxcopyrange, CTLFLAG_RW,
|
||||
&nfs_maxcopyrange, 0, "Max size of a Copy so RPC times reasonable");
|
||||
|
||||
/*
|
||||
* This array of structures indicates, for V4:
|
||||
* retfh - which of 3 types of calling args are used
|
||||
|
@ -62,6 +62,10 @@ static int nfscl_dssameconn = 0;
|
||||
SYSCTL_INT(_vfs_nfs, OID_AUTO, dssameconn, CTLFLAG_RW,
|
||||
&nfscl_dssameconn, 0, "Use same TCP connection to multiple DSs");
|
||||
|
||||
static uint64_t nfs_maxcopyrange = SSIZE_MAX;
|
||||
SYSCTL_U64(_vfs_nfs, OID_AUTO, maxcopyrange, CTLFLAG_RW,
|
||||
&nfs_maxcopyrange, 0, "Max size of a Copy so RPC times reasonable");
|
||||
|
||||
/*
|
||||
* Global variables
|
||||
*/
|
||||
@ -75,7 +79,6 @@ extern char nfsv4_callbackaddr[INET6_ADDRSTRLEN];
|
||||
extern int nfscl_debuglevel;
|
||||
extern int nfs_pnfsiothreads;
|
||||
extern u_long sb_max_adj;
|
||||
extern int nfs_maxcopyrange;
|
||||
NFSCLSTATEMUTEX;
|
||||
int nfstest_outofseq = 0;
|
||||
int nfscl_assumeposixlocks = 1;
|
||||
|
Loading…
Reference in New Issue
Block a user