diff options
author | Chuck Lever <chuck.lever@oracle.com> | 2025-04-28 15:37:02 -0400 |
---|---|---|
committer | Chuck Lever <chuck.lever@oracle.com> | 2025-05-15 16:16:28 -0400 |
commit | 1e7dbad6d1fe4b35ccd2aa8fea9496d837af4430 (patch) | |
tree | 366c71fded43069e8ac87cd68236422bfd0d8a26 | |
parent | 8a81f16de64fc4e654a2a85ec46c57a8e43819b8 (diff) |
SUNRPC: Bump the maximum payload size for the server
Increase the maximum server-side RPC payload to 4MB. The default
remains at 1MB.
An API to adjust the operational maximum was added in 2006 by commit
596bbe53eb3a ("[PATCH] knfsd: Allow max size of NFSd payload to be
configured"). To adjust the operational maximum using this API, shut
down the NFS server. Then echo a new value into:
/proc/fs/nfsd/max_block_size
And restart the NFS server.
Reviewed-by: Jeff Layton <jlayton@kernel.org>
Reviewed-by: NeilBrown <neil@brown.name>
Signed-off-by: Chuck Lever <chuck.lever@oracle.com>
-rw-r--r-- | include/linux/sunrpc/svc.h | 14 |
1 files changed, 7 insertions, 7 deletions
diff --git a/include/linux/sunrpc/svc.h b/include/linux/sunrpc/svc.h index d57df042e24a..48666b83fe68 100644 --- a/include/linux/sunrpc/svc.h +++ b/include/linux/sunrpc/svc.h @@ -119,14 +119,14 @@ void svc_destroy(struct svc_serv **svcp); * Linux limit; someone who cares more about NFS/UDP performance * can test a larger number. * - * For TCP transports we have more freedom. A size of 1MB is - * chosen to match the client limit. Other OSes are known to - * have larger limits, but those numbers are probably beyond - * the point of diminishing returns. + * For non-UDP transports we have more freedom. A size of 4MB is + * chosen to accommodate clients that support larger I/O sizes. */ -#define RPCSVC_MAXPAYLOAD (1*1024*1024u) -#define RPCSVC_MAXPAYLOAD_TCP RPCSVC_MAXPAYLOAD -#define RPCSVC_MAXPAYLOAD_UDP (32*1024u) +enum { + RPCSVC_MAXPAYLOAD = 4 * 1024 * 1024, + RPCSVC_MAXPAYLOAD_TCP = RPCSVC_MAXPAYLOAD, + RPCSVC_MAXPAYLOAD_UDP = 32 * 1024, +}; extern u32 svc_max_payload(const struct svc_rqst *rqstp); |