Check in some minor changes to microbenchmark runs.
authorMichael Vrable <mvrable@cs.ucsd.edu>
Wed, 23 Feb 2011 23:36:28 +0000 (15:36 -0800)
committerMichael Vrable <mvrable@cs.ucsd.edu>
Wed, 23 Feb 2011 23:36:28 +0000 (15:36 -0800)
microbench/parse-results.py
microbench/run2.sh

index 64a17d3..f1da56c 100755 (executable)
@@ -31,6 +31,11 @@ def load_results(prefix):
     return (settings, results)
 
 def extract(data, params={}, ty='read', index=0):
+    if ty == 'mixed':
+        ty = ('read', 'write')
+    else:
+        ty = (ty,)
+
     results = {}
     for (s, r) in data:
         match = True
@@ -40,10 +45,13 @@ def extract(data, params={}, ty='read', index=0):
 
         ops = int(s['BENCH_OPS'])
 
-        vals = [x[ty][index] for x in r]
-        vals = vals[5:]
+        vs = 0.0
+        for t in ty:
+            vals = [x[t][index] for x in r]
+            vals = vals[5:]
+            vs += sum(vals) / len(vals)
+        results[ops] = vs
 
-        results[ops] = sum(vals) / len(vals)
     return results
 
 data = []
@@ -52,14 +60,20 @@ if __name__ == '__main__':
         if f.endswith('.settings'):
             data.append(load_results('results/' + f[:-len('.settings')]))
 
+ratios = {'read': '0.0', 'write': '1.0', 'mixed': '0.5'}
+
 for size in [128, 512, 1024, 2048]:
-    params = {'BLUESKY_TARGET': 'native', 'BENCH_WRITERATIO': '1.0',
-              'BENCH_FILECOUNT': str(size / 4)}
+    for blocksize in [4096, 32768]:
+        for ratio in ratios:
+            params = {'BLUESKY_TARGET': 's3',
+                      'BENCH_WRITERATIO': ratios[ratio],
+                      'BENCH_FILECOUNT': str(size),
+                      'BENCH_BLOCKSIZE': str(blocksize)}
 
-    d0 = extract(data, params, ty='write', index=0)
-    d1 = extract(data, params, ty='write', index=1)
+            d0 = extract(data, params, ty=ratio, index=0)
+            d1 = extract(data, params, ty=ratio, index=1)
 
-    fp = open('%s-%d-write.data' % (params['BLUESKY_TARGET'], size), 'w')
-    for k in sorted(d0.keys()):
-        fp.write("%d\t%f\t%f\n" % (k, d0[k], d1[k]))
-    fp.close()
+            fp = open('%s-%d-%s-%dk.data' % (params['BLUESKY_TARGET'], size, ratio, blocksize / 1024), 'w')
+            for k in sorted(d0.keys()):
+                fp.write("%d\t%f\t%f\n" % (k, d0[k], d1[k]))
+            fp.close()
index d424294..506110b 100755 (executable)
@@ -23,7 +23,7 @@ run_cmd() {
 }
 
 BLUESKY_CACHE_SIZE=$((512 * 1024))
-BENCH_FILESIZE=$((1 << 20))
+BENCH_FILESIZE=$((1024 << 10))
 BENCH_BLOCKSIZE=0
 BENCH_FILECOUNT=$((62))
 BENCH_WRITERATIO=0.5