sprintf(pre, "\t");
else
sprintf(pre, "\t\t");
- printf("%s:%s%8.2f MB/sec\n", t[i].name, pre, mb_sec);
+ printf("%s:%s%8.2f MiB/sec\n", t[i].name, pre, mb_sec);
} else
- printf("%s:inf MB/sec\n", t[i].name);
+ printf("%s:inf MiB/sec\n", t[i].name);
first = 0;
}
},
{
.name = "read-req-num-512-blocks",
- .lname = "Number of 512b blocks to read",
+ .lname = "Number of 512B blocks to read",
.type = FIO_OPT_INT,
.off1 = offsetof(struct act_options, num_read_blocks),
- .help = "Number of 512b blocks to read at the time",
+ .help = "Number of 512B blocks to read at the time",
.def = "3",
.category = FIO_OPT_C_PROFILE,
.group = FIO_OPT_G_ACT,
},
{
.name = "large-block-op-kbytes",
- .lname = "Size of large block ops (writes)",
+ .lname = "Size of large block ops in KiB (writes)",
.type = FIO_OPT_INT,
.off1 = offsetof(struct act_options, write_size),
- .help = "Size of large block ops (writes)",
+ .help = "Size of large block ops in KiB (writes)",
.def = "131072",
.category = FIO_OPT_C_PROFILE,
.group = FIO_OPT_G_ACT,
.lname = "Tiobench size",
.type = FIO_OPT_STR_VAL,
.off1 = offsetof(struct tiobench_options, size),
- .help = "Size in MB",
+ .help = "Size in MiB",
.category = FIO_OPT_C_PROFILE,
.group = FIO_OPT_G_TIOBENCH,
},
static int tb_prep_cmdline(void)
{
/*
- * tiobench uses size as MB, so multiply up
+ * tiobench uses size as MiB, so multiply up
*/
size *= 1024 * 1024ULL;
if (size)
uint64_t first_ttime[DDIR_RWDIR_CNT];
uint64_t last_ttime[DDIR_RWDIR_CNT];
- uint64_t kb[DDIR_RWDIR_CNT];
+ uint64_t kib[DDIR_RWDIR_CNT];
uint64_t start_delay;
};
i = inflight_find(t->sector + (t->bytes >> 9));
if (i) {
- i->p->o.kb[t_to_rwdir(t)] += (t->bytes >> 10);
+ i->p->o.kib[t_to_rwdir(t)] += (t->bytes >> 10);
i->p->o.complete_seen = 1;
inflight_remove(i);
}
return bsb->nr - bsa->nr;
}
-static unsigned long o_to_kb_rate(struct btrace_out *o, int rw)
+static unsigned long o_to_kib_rate(struct btrace_out *o, int rw)
{
uint64_t usec = (o->last_ttime[rw] - o->first_ttime[rw]) / 1000ULL;
uint64_t val;
if (!usec)
return 0;
- val = o->kb[rw] * 1000ULL;
+ val = o->kib[rw] * 1000ULL;
return val / usec;
}
printf("\tmerges: %lu (perc=%3.2f%%)\n", o->merges[i], perc);
perc = ((float) o->seq[i] * 100.0) / (float) o->ios[i];
printf("\tseq: %lu (perc=%3.2f%%)\n", (unsigned long) o->seq[i], perc);
- printf("\trate: %lu KB/sec\n", o_to_kb_rate(o, i));
+ printf("\trate: %lu KiB/sec\n", o_to_kib_rate(o, i));
for (j = 0; j < o->nr_bs[i]; j++) {
struct bs *bs = &o->bs[i][j];
for (i = 0; i < DDIR_RWDIR_CNT; i++) {
unsigned long rate;
- rate = o_to_kb_rate(o, i);
+ rate = o_to_kib_rate(o, i);
if (i)
printf(",");
if (rate)
for (i = 0; i < DDIR_RWDIR_CNT; i++) {
unsigned long this_rate;
- this_rate = o_to_kb_rate(o, i);
+ this_rate = o_to_kib_rate(o, i);
if (this_rate < rate_threshold) {
remove_ddir(o, i);
this_rate = 0;
oa->ios[i] += ob->ios[i];
oa->merges[i] += ob->merges[i];
oa->seq[i] += ob->seq[i];
- oa->kb[i] += ob->kb[i];
+ oa->kib[i] += ob->kib[i];
oa->first_ttime[i] = min(oa->first_ttime[i], ob->first_ttime[i]);
oa->last_ttime[i] = max(oa->last_ttime[i], ob->last_ttime[i]);
merge_bs(&oa->bs[i], &oa->nr_bs[i], ob->bs[i], ob->nr_bs[i]);
log_err("\t-n\tNumber IOS threshold to ignore task\n");
log_err("\t-f\tFio job file output\n");
log_err("\t-d\tUse this file/device for replay\n");
- log_err("\t-r\tIgnore jobs with less than this KB/sec rate\n");
+ log_err("\t-r\tIgnore jobs with less than this KiB/sec rate\n");
log_err("\t-R\tSet rate in fio job (def=%u)\n", set_rate);
log_err("\t-D\tCap queue depth at this value (def=%u)\n", max_depth);
log_err("\t-c\tCollapse \"identical\" jobs (def=%u)\n", collapse_entries);
tdiff = mtime_since_now(&last_tv);
if (tdiff) {
this_items = (this_items * 1000) / (tdiff * 1024);
- printf("%3.2f%% done (%luKB/sec)\r", perc, this_items);
+ printf("%3.2f%% done (%luKiB/sec)\r", perc, this_items);
last_nitems = nitems;
fio_gettime(&last_tv, NULL);
} else
* what an access pattern would look like.
*
* For instance, the following would generate a zipf distribution
- * with theta 1.2, using 262144 (1 GB / 4096) values and split the reporting into
- * 20 buckets:
+ * with theta 1.2, using 262144 (1 GiB / 4096) values and split the
+ * reporting into 20 buckets:
*
* ./t/fio-genzipf -t zipf -i 1.2 -g 1 -b 4096 -o 20
*
};
static int dist_type = TYPE_ZIPF;
-static unsigned long gb_size = 500;
+static unsigned long gib_size = 500;
static unsigned long block_size = 4096;
static unsigned long output_nranges = DEF_NR_OUTPUT;
static double percentage;
}
break;
case 'g':
- gb_size = strtoul(optarg, NULL, 10);
+ gib_size = strtoul(optarg, NULL, 10);
break;
case 'i':
dist_val = atof(optarg);
return 1;
if (output_type != OUTPUT_CSV)
- printf("Generating %s distribution with %f input and %lu GB size and %lu block_size.\n", dist_types[dist_type], dist_val, gb_size, block_size);
+ printf("Generating %s distribution with %f input and %lu GiB size and %lu block_size.\n",
+ dist_types[dist_type], dist_val, gib_size, block_size);
- nranges = gb_size * 1024 * 1024 * 1024ULL;
+ nranges = gib_size * 1024 * 1024 * 1024ULL;
nranges /= block_size;
if (dist_type == TYPE_ZIPF)
v_size = numbers * sizeof(uint8_t);
v = malloc(v_size);
memset(v, 0, v_size);
- printf("\nVerification table is %lf KBs\n", (double)(v_size) / 1024);
+ printf("\nVerification table is %lf KiB\n", (double)(v_size) / 1024);
}
v_start = v;
#include <pthread.h>
static struct thread_data {
- unsigned long mb;
+ unsigned long mib;
} td;
static void *worker(void *data)
char *buf;
int i, first = 1;
- size = td->mb * 1024UL * 1024UL;
+ size = td->mib * 1024UL * 1024UL;
buf = malloc(size);
for (i = 0; i < 100000; i++) {
for (index = 0; index + 4096 < size; index += 4096)
memset(&buf[index+512], 0x89, 512);
if (first) {
- printf("loop%d: did %lu MB\n", i+1, size/(1024UL*1024UL));
+ printf("loop%d: did %lu MiB\n", i+1, size/(1024UL*1024UL));
first = 0;
}
}
int main(int argc, char *argv[])
{
- unsigned long mb, threads;
+ unsigned long mib, threads;
pthread_t *pthreads;
int i;
if (argc < 3) {
- printf("%s: <mb per thread> <threads>\n", argv[0]);
+ printf("%s: <MiB per thread> <threads>\n", argv[0]);
return 1;
}
- mb = strtoul(argv[1], NULL, 10);
+ mib = strtoul(argv[1], NULL, 10);
threads = strtoul(argv[2], NULL, 10);
pthreads = calloc(threads, sizeof(pthread_t));
- td.mb = mb;
+ td.mib = mib;
for (i = 0; i < threads; i++)
pthread_create(&pthreads[i], NULL, worker, &td);
bytes /= 1024;
rate = (bytes * 1000UL * 1000UL) / utime_since(&s, &re);
- fprintf(stderr, "Read rate (KB/sec) : %lu\n", rate);
+ fprintf(stderr, "Read rate (KiB/sec) : %lu\n", rate);
rate = (bytes * 1000UL * 1000UL) / utime_since(&s, &we);
- fprintf(stderr, "Write rate (KB/sec): %lu\n", rate);
+ fprintf(stderr, "Write rate (KiB/sec): %lu\n", rate);
close(fd);
return 0;