Tool to measure 32kb read latencies via the kernel
authorMichael Vrable <mvrable@cs.ucsd.edu>
Fri, 18 Mar 2011 23:49:37 +0000 (16:49 -0700)
committerMichael Vrable <mvrable@cs.ucsd.edu>
Fri, 18 Mar 2011 23:49:37 +0000 (16:49 -0700)
microbench/32kreadbench.py [new file with mode: 0755]
results/figures/specsfs.gnuplot

diff --git a/microbench/32kreadbench.py b/microbench/32kreadbench.py
new file mode 100755 (executable)
index 0000000..1c07cd6
--- /dev/null
@@ -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)
index 223c52f..a085ade 100644 (file)
@@ -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