aboutsummaryrefslogtreecommitdiffstats
path: root/cmd/zpios/zpios_util.c
diff options
context:
space:
mode:
authorDon Brady <[email protected]>2015-09-17 17:55:22 -0600
committerBrian Behlendorf <[email protected]>2015-09-22 09:13:20 -0700
commit56b3986316365d997cb381d3295b99612e18ab6e (patch)
tree8a822457f008582ae54adb6bff198da6c5811db5 /cmd/zpios/zpios_util.c
parente7a05183c49fc897fe56e060fcbfbc20a41bf9f0 (diff)
Add large block support to zpios(1) benchmark
As part of the large block support effort, it makes sense to add support for large blocks to **zpios(1)**. The specifying of a zfs block size for zpios is optional and will default to 128K if the block size is not specified. `zpios ... -S size | --blocksize size ...` This will use *size* ZFS blocks for each test, specified as a comma delimited list with an optional unit suffix. The supported range is powers of two from 128K through 16M. A range of block sizes can be tested as follows: `-S 128K,256K,512K,1M` Example run below (non realistic results from a VM and output abbreviated for space) ``` --regioncount=750 --regionsize=8M --chunksize=1M --offset=4K --threaddelay=0 --cleanup --human-readable --verbose --cleanup --blocksize=128K,256K,512K,1M th-cnt rg-cnt rg-sz ch-sz blksz wr-data wr-bw rd-data rd-bw --------------------------------------------------------------------- 4 750 8m 1m 128k 5g 90.06m 5g 93.37m 4 750 8m 1m 256k 5g 79.71m 5g 99.81m 4 750 8m 1m 512k 5g 42.20m 5g 93.14m 4 750 8m 1m 1m 5g 35.51m 5g 89.36m 8 750 8m 1m 128k 5g 85.49m 5g 90.81m 8 750 8m 1m 256k 5g 61.42m 5g 99.24m 8 750 8m 1m 512k 5g 49.09m 5g 108.78m 16 750 8m 1m 128k 5g 86.28m 5g 88.73m 16 750 8m 1m 256k 5g 64.34m 5g 93.47m 16 750 8m 1m 512k 5g 68.84m 5g 124.47m 16 750 8m 1m 1m 5g 53.97m 5g 97.20m --------------------------------------------------------------------- ``` Signed-off-by: Don Brady <[email protected]> Signed-off-by: Brian Behlendorf <[email protected]> Closes #3795 Closes #2071
Diffstat (limited to 'cmd/zpios/zpios_util.c')
-rw-r--r--cmd/zpios/zpios_util.c19
1 files changed, 14 insertions, 5 deletions
diff --git a/cmd/zpios/zpios_util.c b/cmd/zpios/zpios_util.c
index b226322b0..2d248ed9a 100644
--- a/cmd/zpios/zpios_util.c
+++ b/cmd/zpios/zpios_util.c
@@ -29,6 +29,8 @@
*
* You should have received a copy of the GNU General Public License along
* with ZPIOS. If not, see <http://www.gnu.org/licenses/>.
+ *
+ * Copyright (c) 2015, Intel Corporation.
*/
#include <stdlib.h>
@@ -185,6 +187,8 @@ int
set_count(char *pattern1, char *pattern2, range_repeat_t *range,
char *optarg, uint32_t *flags, char *arg)
{
+ uint64_t count = range->val_count;
+
if (flags)
*flags |= FLAG_SET;
@@ -197,6 +201,9 @@ set_count(char *pattern1, char *pattern2, range_repeat_t *range,
fprintf(stderr, "Error: Incorrect pattern for %s, '%s'\n",
arg, optarg);
return (EINVAL);
+ } else if (count == range->val_count) {
+ fprintf(stderr, "Error: input ignored for %s, '%s'\n",
+ arg, optarg);
}
return (0);
@@ -314,14 +321,14 @@ print_stats_header(cmd_args_t *args)
if (args->verbose) {
printf(
"status name id\tth-cnt\trg-cnt\trg-sz\t"
- "ch-sz\toffset\trg-no\tch-no\tth-dly\tflags\ttime\t"
+ "ch-sz\toffset\trg-no\tch-no\tth-dly\tflags\tblksz\ttime\t"
"cr-time\trm-time\twr-time\trd-time\twr-data\twr-ch\t"
"wr-bw\trd-data\trd-ch\trd-bw\n");
printf(
- "------------------------------------------------"
- "------------------------------------------------"
- "------------------------------------------------"
- "----------------------------------------------\n");
+ "-------------------------------------------------"
+ "-------------------------------------------------"
+ "-------------------------------------------------"
+ "--------------------------------------------------\n");
} else {
printf(
"status name id\t"
@@ -358,6 +365,7 @@ print_stats_human_readable(cmd_args_t *args, zpios_cmd_t *cmd)
printf("%s\t", uint64_to_kmgt(str, cmd->cmd_chunk_noise));
printf("%s\t", uint64_to_kmgt(str, cmd->cmd_thread_delay));
printf("%s\t", print_flags(str, cmd->cmd_flags));
+ printf("%s\t", uint64_to_kmgt(str, cmd->cmd_block_size));
}
if (args->rc) {
@@ -414,6 +422,7 @@ print_stats_table(cmd_args_t *args, zpios_cmd_t *cmd)
printf("%u\t", cmd->cmd_chunk_noise);
printf("%u\t", cmd->cmd_thread_delay);
printf("0x%x\t", cmd->cmd_flags);
+ printf("%u\t", cmd->cmd_block_size);
}
if (args->rc) {