From 0162933589d025ca1812e159368d107cfc355e8e Mon Sep 17 00:00:00 2001 From: Santosh Kumar Pradhan Date: Thu, 17 Oct 2013 16:17:54 +0530 Subject: gNFS: Make NFS I/O size to 1MB by default For better NFS performance, make the default I/O size to 1MB, same as kernel NFS. Also refactor the description for read-size, write-size and readdir-size (i.e. it must be a multiple of 1KB but min value is 4KB and max supported value is 1MB). On slower network, rsize/wsize can be adjusted to 16/32/64-KB through nfs.read-size or nfs.write-size respectively. Change-Id: I142cff1c3644bb9f93188e4e890478177c9465e3 BUG: 1009223 Signed-off-by: Santosh Kumar Pradhan Reviewed-on: http://review.gluster.org/6103 Tested-by: Gluster Build System Reviewed-by: Shyamsundar Ranganathan Reviewed-by: Anand Avati --- xlators/nfs/server/src/nfs3.h | 18 +++++++++--------- 1 file changed, 9 insertions(+), 9 deletions(-) (limited to 'xlators/nfs/server/src/nfs3.h') diff --git a/xlators/nfs/server/src/nfs3.h b/xlators/nfs/server/src/nfs3.h index 315cae943..054429c82 100644 --- a/xlators/nfs/server/src/nfs3.h +++ b/xlators/nfs/server/src/nfs3.h @@ -39,19 +39,19 @@ /* Static values used for FSINFO - * To change the maximum rsize and wsize supported by the NFS client, - * adjust GF_NFS3_FILE_IO_SIZE_MAX. The Gluster NFS server defaults to - * 64KB(65536) which is reasonable for 1GE and 10GE. But for better - * performance on 10GE, rsize/wsize can be raised to 1MB(1048576). - * rsize and wsize can be tuned through nfs.read-size and + * To change the maximum rsize and wsize supported by the NFS client, adjust + * GF_NFS3_FILE_IO_SIZE_MAX. The Gluster NFS server defaults to 1MB(1048576) + * (same as kernel NFS server). For slower network, rsize/wsize can be trimmed + * to 16/32/64-KB. rsize and wsize can be tuned through nfs.read-size and * nfs.write-size respectively. * * NB: For Kernel-NFS, NFS_MAX_FILE_IO_SIZE is 1048576U (1MB). */ #define GF_NFS3_FILE_IO_SIZE_MAX (1 * GF_UNIT_MB) /* 1048576 */ -#define GF_NFS3_FILE_IO_SIZE_DEF (64 * GF_UNIT_KB) /* 65536 */ #define GF_NFS3_FILE_IO_SIZE_MIN (4 * GF_UNIT_KB) /* 4096 */ +#define GF_NFS3_FILE_IO_SIZE_DEF GF_NFS3_FILE_IO_SIZE_MAX + #define GF_NFS3_RTMAX GF_NFS3_FILE_IO_SIZE_MAX #define GF_NFS3_RTMIN GF_NFS3_FILE_IO_SIZE_MIN #define GF_NFS3_RTPREF GF_NFS3_FILE_IO_SIZE_DEF @@ -69,6 +69,9 @@ #define GF_NFS3_MAXFILESIZE (1 * GF_UNIT_PB) +#define GF_NFS3_IO_SIZE 4096 /* 4-KB */ +#define GF_NFS3_IO_SHIFT 12 /* 2^12 = 4KB */ + /* FIXME: Handle time resolutions */ #define GF_NFS3_TIMEDELTA_SECS {1,0} #define GF_NFS3_TIMEDELTA_NSECS {0,1} @@ -274,9 +277,6 @@ struct inode_op_queue { pthread_mutex_t qlock; }; - - - extern rpcsvc_program_t * nfs3svc_init (xlator_t *nfsx); #endif -- cgit