From 4d0f19140e01c9119d9e73ba24f8ef04e0434a5a Mon Sep 17 00:00:00 2001 From: Michael Vrable Date: Tue, 15 Mar 2011 19:50:36 -0700 Subject: [PATCH] Add an option to disable aggregating reads in the proxy This is for benchmarking purposes. It uses range requests but does not delay submitting the reads (to wait for batching opportunities). --- bluesky/bluesky.h | 3 +++ bluesky/cloudlog.c | 3 ++- bluesky/init.c | 1 + 3 files changed, 6 insertions(+), 1 deletion(-) diff --git a/bluesky/bluesky.h b/bluesky/bluesky.h index 674fa8b..69f215a 100644 --- a/bluesky/bluesky.h +++ b/bluesky/bluesky.h @@ -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; diff --git a/bluesky/cloudlog.c b/bluesky/cloudlog.c index 628fc97..51e35c0 100644 --- a/bluesky/cloudlog.c +++ b/bluesky/cloudlog.c @@ -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; } diff --git a/bluesky/init.c b/bluesky/init.c index 666f6e8..70d9dad 100644 --- a/bluesky/init.c +++ b/bluesky/init.c @@ -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} }; -- 2.20.1