[sheepdog] [PATCH v2 6/6] vditest: flush based on write counts
MORITA Kazutaka
morita.kazutaka at lab.ntt.co.jp
Mon Feb 4 10:54:13 CET 2013
It doesn't make sense to flush after read requests.
Signed-off-by: MORITA Kazutaka <morita.kazutaka at lab.ntt.co.jp>
---
script/vditest | 6 +-----
1 files changed, 1 insertions(+), 5 deletions(-)
diff --git a/script/vditest b/script/vditest
index c24f8e0..4300ea1 100755
--- a/script/vditest
+++ b/script/vditest
@@ -312,7 +312,6 @@ sub parse {
sub vdi_main {
my $roffset = $offset;
my $woffset = $offset;
- my $i = 1;
my ($cur_time, $start_time, $end_time, $hbeat_time);
$start_time = $cur_time = get_current_time();
@@ -328,8 +327,6 @@ sub vdi_main {
wait_aio_requests();
}
- print "$i: " if $verbose;
-
if (rand($rrate + $wrate) < $rrate) {
# read
$length = $eblk - $roffset if $roffset + $length > $eblk;
@@ -356,7 +353,7 @@ sub vdi_main {
}
}
- vdi_flush() if $flush_interval > 0 && $i % $flush_interval == 0;
+ vdi_flush() if $flush_interval > 0 && $wr_ops % $flush_interval == 0;
$cur_time = get_current_time();
if ($hbeat > 0 && $hbeat_time <= $cur_time) {
@@ -368,7 +365,6 @@ sub vdi_main {
$hbeat_time += $hbeat * 1000000;
}
- $i++;
}
print_result('Total read', $total_rd_bytes, $total_rd_ops, $runtime) if $rrate;
--
1.7.2.5
More information about the sheepdog
mailing list