Skip to content

Commit 1e7dbad

Browse files
committed
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 596bbe5 ("[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>
1 parent 8a81f16 commit 1e7dbad

File tree

1 file changed

+7
-7
lines changed
  • include/linux/sunrpc

1 file changed

+7
-7
lines changed

include/linux/sunrpc/svc.h

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -119,14 +119,14 @@ void svc_destroy(struct svc_serv **svcp);
119119
* Linux limit; someone who cares more about NFS/UDP performance
120120
* can test a larger number.
121121
*
122-
* For TCP transports we have more freedom. A size of 1MB is
123-
* chosen to match the client limit. Other OSes are known to
124-
* have larger limits, but those numbers are probably beyond
125-
* the point of diminishing returns.
122+
* For non-UDP transports we have more freedom. A size of 4MB is
123+
* chosen to accommodate clients that support larger I/O sizes.
126124
*/
127-
#define RPCSVC_MAXPAYLOAD (1*1024*1024u)
128-
#define RPCSVC_MAXPAYLOAD_TCP RPCSVC_MAXPAYLOAD
129-
#define RPCSVC_MAXPAYLOAD_UDP (32*1024u)
125+
enum {
126+
RPCSVC_MAXPAYLOAD = 4 * 1024 * 1024,
127+
RPCSVC_MAXPAYLOAD_TCP = RPCSVC_MAXPAYLOAD,
128+
RPCSVC_MAXPAYLOAD_UDP = 32 * 1024,
129+
};
130130

131131
extern u32 svc_max_payload(const struct svc_rqst *rqstp);
132132

0 commit comments

Comments
 (0)