From 536ee826da04acfe2a97f622d8564eec2c6cb4f7 Mon Sep 17 00:00:00 2001 From: Evan Tschannen Date: Sun, 11 Nov 2018 23:42:45 -0800 Subject: [PATCH] tuned resolver balancing to keep the resolvers within 5MB per second of each other --- fdbserver/Knobs.cpp | 3 ++- fdbserver/Knobs.h | 1 + fdbserver/Resolver.actor.cpp | 2 +- 3 files changed, 4 insertions(+), 2 deletions(-) diff --git a/fdbserver/Knobs.cpp b/fdbserver/Knobs.cpp index 398c07dafd..7bba35dae5 100644 --- a/fdbserver/Knobs.cpp +++ b/fdbserver/Knobs.cpp @@ -261,8 +261,9 @@ ServerKnobs::ServerKnobs(bool randomize, ClientKnobs* clientKnobs) { // masterCommitter() in the master server will allow lower priority tasks (e.g. DataDistibution) // by delay()ing for this amount of time between accepted batches of TransactionRequests. init( COMMIT_SLEEP_TIME, 0.0001 ); if( randomize && BUGGIFY ) COMMIT_SLEEP_TIME = 0; + init( KEY_BYTES_PER_SAMPLE, 5e4 ); init( MIN_BALANCE_TIME, 0.2 ); - init( MIN_BALANCE_DIFFERENCE, 10000 ); + init( MIN_BALANCE_DIFFERENCE, 5e6 ); init( SECONDS_BEFORE_NO_FAILURE_DELAY, 8 * 3600 ); init( MAX_TXS_SEND_MEMORY, 1e7 ); if( randomize && BUGGIFY ) MAX_TXS_SEND_MEMORY = 1e5; init( MAX_RECOVERY_VERSIONS, 200 * VERSIONS_PER_SECOND ); diff --git a/fdbserver/Knobs.h b/fdbserver/Knobs.h index 89ed8051e8..8bfa47ddb2 100644 --- a/fdbserver/Knobs.h +++ b/fdbserver/Knobs.h @@ -211,6 +211,7 @@ public: double MAX_RECOVERY_TIME; // Resolver + int64_t KEY_BYTES_PER_SAMPLE; int64_t SAMPLE_OFFSET_PER_KEY; double SAMPLE_EXPIRATION_TIME; double SAMPLE_POLL_TIME; diff --git a/fdbserver/Resolver.actor.cpp b/fdbserver/Resolver.actor.cpp index 6875c57ab8..bd099d7c59 100644 --- a/fdbserver/Resolver.actor.cpp +++ b/fdbserver/Resolver.actor.cpp @@ -44,7 +44,7 @@ struct ProxyRequestsInfo { namespace{ struct Resolver : ReferenceCounted { Resolver( UID dbgid, int proxyCount, int resolverCount ) - : dbgid(dbgid), proxyCount(proxyCount), resolverCount(resolverCount), version(-1), conflictSet( newConflictSet() ), iopsSample( SERVER_KNOBS->IOPS_UNITS_PER_SAMPLE ), debugMinRecentStateVersion(0) + : dbgid(dbgid), proxyCount(proxyCount), resolverCount(resolverCount), version(-1), conflictSet( newConflictSet() ), iopsSample( SERVER_KNOBS->KEY_BYTES_PER_SAMPLE ), debugMinRecentStateVersion(0) { } ~Resolver() {