Whamcloud - gitweb
LU-2816 llite: Set RAS_INCREASE_STEP correctly
authorJinshan Xiong <jinshan.xiong@intel.com>
Tue, 12 Mar 2013 22:52:55 +0000 (15:52 -0700)
committerOleg Drokin <oleg.drokin@intel.com>
Wed, 13 Mar 2013 19:21:54 +0000 (15:21 -0400)
RAS_INCREASE_STEP is by pages instead of by bytes.

However, I found it caused performance loss by setting it to be 4MB so
I set it back to 1MB. After 4MB RPC is enabled by default, more work
should be done to pick up a right value of max_read_ahead_mb to
maximize performance gain of 4MB RPC.

Signed-off-by: Jinshan Xiong <jinshan.xiong@intel.com>
Change-Id: Ic000f266cfefc827e112e03f76cf467c73ba88ad
Reviewed-on: http://review.whamcloud.com/5691
Tested-by: Hudson
Reviewed-by: Andreas Dilger <andreas.dilger@intel.com>
Tested-by: Maloo <whamcloud.maloo@gmail.com>
Reviewed-by: Oleg Drokin <oleg.drokin@intel.com>
lustre/llite/rw.c

index cbd1c91..c8b0626 100644 (file)
@@ -576,7 +576,13 @@ static int ll_read_ahead_page(const struct lu_env *env, struct cl_io *io,
  * know what the actual RPC size is.  If this needs to change, it makes more
  * sense to tune the i_blkbits value for the file based on the OSTs it is
  * striped over, rather than having a constant value for all files here. */
  * know what the actual RPC size is.  If this needs to change, it makes more
  * sense to tune the i_blkbits value for the file based on the OSTs it is
  * striped over, rather than having a constant value for all files here. */
-#define RAS_INCREASE_STEP(inode) (1UL << inode->i_blkbits)
+
+/* RAS_INCREASE_STEP should be (1UL << (inode->i_blkbits - CFS_PAGE_SHIFT)).
+ * Temprarily set RAS_INCREASE_STEP to 1MB. After 4MB RPC is enabled
+ * by default, this should be adjusted corresponding with max_read_ahead_mb
+ * and max_read_ahead_per_file_mb otherwise the readahead budget can be used
+ * up quickly which will affect read performance siginificantly. See LU-2816 */
+#define RAS_INCREASE_STEP(inode) (ONE_MB_BRW_SIZE >> CFS_PAGE_SHIFT)
 
 static inline int stride_io_mode(struct ll_readahead_state *ras)
 {
 
 static inline int stride_io_mode(struct ll_readahead_state *ras)
 {