From 5a120ff89ded112b2255619a26946dccae8ce539 Mon Sep 17 00:00:00 2001 From: Michael Vrable Date: Fri, 18 Mar 2011 16:49:37 -0700 Subject: [PATCH] Tool to measure 32kb read latencies via the kernel --- microbench/32kreadbench.py | 24 ++++++++++++++++++++++++ results/figures/specsfs.gnuplot | 12 +++--------- 2 files changed, 27 insertions(+), 9 deletions(-) create mode 100755 microbench/32kreadbench.py diff --git a/microbench/32kreadbench.py b/microbench/32kreadbench.py new file mode 100755 index 0000000..1c07cd6 --- /dev/null +++ b/microbench/32kreadbench.py @@ -0,0 +1,24 @@ +#!/usr/bin/python + +import os, random, sys, time + +def read_files(files, rate=1.0): + while True: + f = random.sample(files, 1)[0] + + start = time.time() + fp = open(f, 'r') + blocks = (16 << 20) / 32768 + offset = random.randrange(blocks) * 32768 + fp.seek(offset) + fp.read(32768) + print time.time() - start + fp.close() + +if __name__ == '__main__': + all_files = [] + for (path, dirs, files) in iter(os.walk(".")): + for f in files: + all_files.append(os.path.join(path, f)) + print len(all_files), "files total" + read_files(all_files) diff --git a/results/figures/specsfs.gnuplot b/results/figures/specsfs.gnuplot index 223c52f..a085ade 100644 --- a/results/figures/specsfs.gnuplot +++ b/results/figures/specsfs.gnuplot @@ -13,29 +13,23 @@ set xtics nomirror set x2tics auto set grid -set key top left +set key top right set output "spec1.eps" set ylabel "Achieved Operations per Second" -plot "../20110311/sfssum.20110312-native" with linespoints title "Local NFS Server", \ - "../20110307/sfssum.20110307-ec2-west2" with linespoints title "EC2 NFS Server", \ +plot "../20110311/sfssum.20110312-native" with linespoints title "Local NFS", \ "../20110311/sfssum.20110311-s3-west" with linespoints title "BlueSky", \ "../20110311/sfssum.20110311-s3-west-4kfs" with linespoints title "BlueSky (4K blocks)", \ "../20110311/sfssum.20110312-s3-west-fullseg" with linespoints title "BlueSky (full fetches)", \ - "../20110311/sfssum.20110312-s3-west-noseg" with linespoints title "BlueSky (no segments)", \ - "../20110311/sfssum.20110315-s3-west-noagg" with linespoints title "BlueSky (no read aggregation)", \ "../20110311/sfssum.20110313-azure" with linespoints title "Azure" set output "spec2.eps" set ylabel "Operation Latency (ms)" set yrange [0:50] -plot "../20110311/sfssum.20110312-native" using 1:3 with linespoints title "Local NFS Server", \ - "../20110307/sfssum.20110307-ec2-west2" using 1:3 with linespoints title "EC2 NFS Server", \ +plot "../20110311/sfssum.20110312-native" using 1:3 with linespoints title "Local NFS", \ "../20110311/sfssum.20110311-s3-west" using 1:3 with linespoints title "BlueSky", \ "../20110311/sfssum.20110311-s3-west-4kfs" using 1:3 with linespoints title "BlueSky (4K blocks)", \ "../20110311/sfssum.20110312-s3-west-fullseg" using 1:3 with linespoints title "BlueSky (full fetches)", \ - "../20110311/sfssum.20110312-s3-west-noseg" using 1:3 with linespoints title "BlueSky (no segments)", \ - "../20110311/sfssum.20110315-s3-west-noagg" using 1:3 with linespoints title "BlueSky (no read aggregation)", \ "../20110311/sfssum.20110313-azure" using 1:3 with linespoints title "Azure" XMAX=1600 -- 2.20.1