On newer systems, some block drivers allow max_hw_sector_kb to
be up to 65536KB (64MB) to the underlying storage. To maximize
driver efficiency, Lustre should also have bump up maximum I/O
RPC size to 64MB.
Clamp max_read_ahead_whold_mb not to exceed
max_read_ahead_per_file_mb
Signed-off-by: Qian Yingjin <qian@ddn.com>
Change-Id: Icbf78742f8210d82dc310af7d05b7c32b93af34f
Reviewed-on: https://review.whamcloud.com/34042
Reviewed-by: Andreas Dilger <adilger@whamcloud.com>
Reviewed-by: Patrick Farrell <pfarrell@whamcloud.com>
Tested-by: Jenkins
Tested-by: Maloo <maloo@whamcloud.com>
Reviewed-by: Oleg Drokin <green@whamcloud.com>
* value. The client is free to limit the actual RPC size for any bulk
* transfer via cl_max_pages_per_rpc to some non-power-of-two value.
* NOTE: This is limited to 16 (=64GB RPCs) by IOOBJ_MAX_BRW_BITS. */
* value. The client is free to limit the actual RPC size for any bulk
* transfer via cl_max_pages_per_rpc to some non-power-of-two value.
* NOTE: This is limited to 16 (=64GB RPCs) by IOOBJ_MAX_BRW_BITS. */
-#define PTLRPC_BULK_OPS_BITS 4
+#define PTLRPC_BULK_OPS_BITS 6
#if PTLRPC_BULK_OPS_BITS > 16
#error "More than 65536 BRW RPCs not allowed by IOOBJ_MAX_BRW_BITS."
#endif
#if PTLRPC_BULK_OPS_BITS > 16
#error "More than 65536 BRW RPCs not allowed by IOOBJ_MAX_BRW_BITS."
#endif
sbi->ll_dt_exp->exp_connect_data = *data;
/* Don't change value if it was specified in the config log */
sbi->ll_dt_exp->exp_connect_data = *data;
/* Don't change value if it was specified in the config log */
- if (sbi->ll_ra_info.ra_max_read_ahead_whole_pages == -1)
+ if (sbi->ll_ra_info.ra_max_read_ahead_whole_pages == -1) {
sbi->ll_ra_info.ra_max_read_ahead_whole_pages =
max_t(unsigned long, SBI_DEFAULT_READAHEAD_WHOLE_MAX,
(data->ocd_brw_size >> PAGE_SHIFT));
sbi->ll_ra_info.ra_max_read_ahead_whole_pages =
max_t(unsigned long, SBI_DEFAULT_READAHEAD_WHOLE_MAX,
(data->ocd_brw_size >> PAGE_SHIFT));
+ if (sbi->ll_ra_info.ra_max_read_ahead_whole_pages >
+ sbi->ll_ra_info.ra_max_pages_per_file)
+ sbi->ll_ra_info.ra_max_read_ahead_whole_pages =
+ sbi->ll_ra_info.ra_max_pages_per_file;
+ }
err = obd_fid_init(sbi->ll_dt_exp->exp_obd, sbi->ll_dt_exp,
LUSTRE_SEQ_METADATA);
err = obd_fid_init(sbi->ll_dt_exp->exp_obd, sbi->ll_dt_exp,
LUSTRE_SEQ_METADATA);
*/
param->ddp_inodespace = PER_OBJ_USAGE;
/*
*/
param->ddp_inodespace = PER_OBJ_USAGE;
/*
- * EXT_INIT_MAX_LEN is the theoretical maximum extent size (32k blocks
- * = 128MB) which is unlikely to be hit in real life. Report a smaller
- * maximum length to not under count the actual number of extents
- * needed for writing a file.
+ * EXT_INIT_MAX_LEN is the theoretical maximum extent size (32k blocks
+ * is 128MB) which is unlikely to be hit in real life. Report a smaller
+ * maximum length to not under-count the actual number of extents
+ * needed for writing a file if there are sub-optimal block allocations.
- param->ddp_max_extent_blks = EXT_INIT_MAX_LEN >> 2;
+ param->ddp_max_extent_blks = EXT_INIT_MAX_LEN >> 1;
/* worst-case extent insertion metadata overhead */
param->ddp_extent_tax = 6 * LDISKFS_BLOCK_SIZE(sb);
param->ddp_mntopts = 0;
/* worst-case extent insertion metadata overhead */
param->ddp_extent_tax = 6 * LDISKFS_BLOCK_SIZE(sb);
param->ddp_mntopts = 0;
test_28A() { # was test_28
setup_noconfig
test_28A() { # was test_28
setup_noconfig
- TEST="llite.$FSNAME-*.max_read_ahead_whole_mb"
- PARAM="$FSNAME.llite.max_read_ahead_whole_mb"
- ORIG=$($LCTL get_param -n $TEST)
- FINAL=$(($ORIG + 1))
- set_persistent_param_and_check client "$TEST" "$PARAM" $FINAL
- FINAL=$(($FINAL + 1))
- set_persistent_param_and_check client "$TEST" "$PARAM" $FINAL
+
+ local TEST="llite.$FSNAME-*.max_read_ahead_whole_mb"
+ local PARAM="$FSNAME.llite.max_read_ahead_whole_mb"
+ local orig=$($LCTL get_param -n $TEST)
+ local max=$($LCTL get_param -n \
+ llite.$FSNAME-*.max_read_ahead_per_file_mb)
+
+ orig=${orig%%.[0-9]*}
+ max=${max%%.[0-9]*}
+ echo "ORIG:$orig MAX:$max"
+ [[ $max -le $orig ]] && orig=$((max - 3))
+ echo "ORIG:$orig MAX:$max"
+
+ local final=$((orig + 1))
+
+ set_persistent_param_and_check client "$TEST" "$PARAM" $final
+ final=$((final + 1))
+ set_persistent_param_and_check client "$TEST" "$PARAM" $final
umount_client $MOUNT || error "umount_client $MOUNT failed"
mount_client $MOUNT || error "mount_client $MOUNT failed"
umount_client $MOUNT || error "umount_client $MOUNT failed"
mount_client $MOUNT || error "mount_client $MOUNT failed"
- RESULT=$($LCTL get_param -n $TEST)
- if [ $RESULT -ne $FINAL ]; then
- error "New config not seen: wanted $FINAL got $RESULT"
+
+ local result=$($LCTL get_param -n $TEST)
+
+ if [ $result -ne $final ]; then
+ error "New config not seen: wanted $final got $result"
- echo "New config success: got $RESULT"
+ echo "New config success: got $result"
- set_persistent_param_and_check client "$TEST" "$PARAM" $ORIG
+ set_persistent_param_and_check client "$TEST" "$PARAM" $orig
cleanup || error "cleanup failed with rc $?"
}
run_test 28A "permanent parameter setting"
cleanup || error "cleanup failed with rc $?"
}
run_test 28A "permanent parameter setting"
mount_client $MOUNT || error "mount_client $MOUNT failed"
FINAL=$($LCTL get_param -n $TEST)
echo "deleted (default) value=$FINAL, orig=$ORIG"
mount_client $MOUNT || error "mount_client $MOUNT failed"
FINAL=$($LCTL get_param -n $TEST)
echo "deleted (default) value=$FINAL, orig=$ORIG"
+ ORIG=${ORIG%%.[0-9]*}
+ FINAL=${FINAL%%.[0-9]*}
# assumes this parameter started at the default value
[ "$FINAL" -eq "$ORIG" ] || fail "Deleted value=$FINAL, orig=$ORIG"
# assumes this parameter started at the default value
[ "$FINAL" -eq "$ORIG" ] || fail "Deleted value=$FINAL, orig=$ORIG"