Add an option to disable aggregating reads in the proxy
authorMichael Vrable <mvrable@cs.ucsd.edu>
Wed, 16 Mar 2011 02:50:36 +0000 (19:50 -0700)
committerMichael Vrable <mvrable@cs.ucsd.edu>
Wed, 16 Mar 2011 02:50:36 +0000 (19:50 -0700)
This is for benchmarking purposes.  It uses range requests but does not
delay submitting the reads (to wait for batching opportunities).

bluesky/bluesky.h
bluesky/cloudlog.c
bluesky/init.c

index 674fa8b..69f215a 100644 (file)
@@ -48,6 +48,9 @@ typedef struct {
 
     /* Disable cryptography.  This is for benchmarking purposes. */
     int disable_crypto;
+
+    /* Disable aggregation of read requests.  Fetch items individually. */
+    int disable_read_aggregation;
 } BlueSkyOptions;
 
 extern BlueSkyOptions bluesky_options;
index 628fc97..51e35c0 100644 (file)
@@ -294,7 +294,8 @@ void bluesky_cloudlog_prefetch(BlueSkyCloudLog *item)
 
     /* When operating in a non log-structured mode, simply start a background
      * fetch immediately when asked to prefetch. */
-    if (bluesky_options.disable_aggregation) {
+    if (bluesky_options.disable_aggregation
+        || bluesky_options.disable_read_aggregation) {
         bluesky_cloudlog_background_fetch(item);
         return;
     }
index 666f6e8..70d9dad 100644 (file)
@@ -54,6 +54,7 @@ static struct {
     {"BLUESKY_OPT_FULL_SEGMENTS", &bluesky_options.full_segment_fetches},
     {"BLUESKY_OPT_NO_AGGREGATION", &bluesky_options.disable_aggregation},
     {"BLUESKY_OPT_NO_CRYPTO", &bluesky_options.disable_crypto},
+    {"BLUESKY_OPT_NO_GROUP_READS", &bluesky_options.disable_read_aggregation},
     {NULL, NULL}
 };