From 536ee826da04acfe2a97f622d8564eec2c6cb4f7 Mon Sep 17 00:00:00 2001 From: Evan Tschannen Date: Sun, 11 Nov 2018 23:42:45 -0800 Subject: [PATCH 1/3] 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() { From 3f390246404945ad186f127eea56cb39f9f0da83 Mon Sep 17 00:00:00 2001 From: Evan Tschannen Date: Mon, 12 Nov 2018 00:03:07 -0800 Subject: [PATCH 2/3] buggify resolution balancing so that it still happens in simulation --- fdbserver/Knobs.cpp | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/fdbserver/Knobs.cpp b/fdbserver/Knobs.cpp index 7bba35dae5..729bfd2584 100644 --- a/fdbserver/Knobs.cpp +++ b/fdbserver/Knobs.cpp @@ -260,10 +260,11 @@ ServerKnobs::ServerKnobs(bool randomize, ClientKnobs* clientKnobs) { // Master Server // 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. + bool fastBalancing = randomize && BUGGIFY; init( COMMIT_SLEEP_TIME, 0.0001 ); if( randomize && BUGGIFY ) COMMIT_SLEEP_TIME = 0; - init( KEY_BYTES_PER_SAMPLE, 5e4 ); + init( KEY_BYTES_PER_SAMPLE, 5e4 ); if( fastBalancing ) KEY_BYTES_PER_SAMPLE = 1e4; init( MIN_BALANCE_TIME, 0.2 ); - init( MIN_BALANCE_DIFFERENCE, 5e6 ); + init( MIN_BALANCE_DIFFERENCE, 5e6 ); if( fastBalancing ) MIN_BALANCE_DIFFERENCE = 5e4; 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 ); From 3f3a562f75a55b812bc2ec3236bbc59bd094213d Mon Sep 17 00:00:00 2001 From: Evan Tschannen Date: Mon, 12 Nov 2018 19:11:28 -0800 Subject: [PATCH 3/3] updated resolution balancing knobs to be a little more aggressive --- fdbserver/Knobs.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/fdbserver/Knobs.cpp b/fdbserver/Knobs.cpp index 729bfd2584..e0fa6538b5 100644 --- a/fdbserver/Knobs.cpp +++ b/fdbserver/Knobs.cpp @@ -262,9 +262,9 @@ ServerKnobs::ServerKnobs(bool randomize, ClientKnobs* clientKnobs) { // by delay()ing for this amount of time between accepted batches of TransactionRequests. bool fastBalancing = randomize && BUGGIFY; init( COMMIT_SLEEP_TIME, 0.0001 ); if( randomize && BUGGIFY ) COMMIT_SLEEP_TIME = 0; - init( KEY_BYTES_PER_SAMPLE, 5e4 ); if( fastBalancing ) KEY_BYTES_PER_SAMPLE = 1e4; + init( KEY_BYTES_PER_SAMPLE, 2e4 ); if( fastBalancing ) KEY_BYTES_PER_SAMPLE = 1e3; init( MIN_BALANCE_TIME, 0.2 ); - init( MIN_BALANCE_DIFFERENCE, 5e6 ); if( fastBalancing ) MIN_BALANCE_DIFFERENCE = 5e4; + init( MIN_BALANCE_DIFFERENCE, 1e6 ); if( fastBalancing ) MIN_BALANCE_DIFFERENCE = 1e4; 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 );