From: Michael Vrable Date: Wed, 16 Mar 2011 02:50:36 +0000 (-0700) Subject: Add an option to disable aggregating reads in the proxy X-Git-Url: https://git.vrable.net/?a=commitdiff_plain;h=4d0f19140e01c9119d9e73ba24f8ef04e0434a5a;p=bluesky.git 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). --- 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} };