-
Notifications
You must be signed in to change notification settings - Fork 185
Closed
Description
Hello,
mdtest has serious bugs when run in leaf-only mode (-L option)
- stat phase gives invalid results
- stat phase processes only small/limited amount of files
- wrong number of files is calculated and reported (with -F option) for -I option
Following condition in mdtest.c mdtest_stat function is wrong, so only small amount of files (one directory usually) is tested:
if( directory_loops != 1 || leaf_only ){
stop_items = items_per_dir;
}
But results are calculated using all items.
if (stat_only) {
summary_table[iteration].rate[5] = items*size/(t[2] - t[1]);
summary_table[iteration].time[5] = t[2] - t[1];
summary_table[iteration].items[5] = items*size;
summary_table[iteration].stonewall_last_item[5] = items;
}
Items calculations doesn't reflect leaf_only when run with -I option.
if (items_per_dir > 0) {
if(items == 0){
items = items_per_dir * num_dirs_in_tree;
}else{
num_dirs_in_tree_calc = num_dirs_in_tree;
}
} else {
if (leaf_only) {
if (branch_factor <= 1) {
items_per_dir = items;
} else {
items_per_dir = (uint64_t) (items / pow(branch_factor, depth));
items = items_per_dir * (uint64_t) pow(branch_factor, depth);
}
} else {
items_per_dir = items / num_dirs_in_tree;
items = items_per_dir * num_dirs_in_tree;
}
}
I suggest reverting commit ed421bc and fixing items calculations.
Metadata
Metadata
Assignees
Labels
No labels