simplified the algorithm based on testing
This commit is contained in:
parent
2087ab104e
commit
a0a71ff7f9
|
@ -444,10 +444,8 @@ ServerKnobs::ServerKnobs(bool randomize, ClientKnobs* clientKnobs, bool isSimula
|
|||
init( STORAGE_DURABILITY_LAG_SOFT_MAX, 200e6 ); if( smallStorageTarget ) STORAGE_DURABILITY_LAG_SOFT_MAX = 10e6;
|
||||
|
||||
//FIXME: Low priority reads are disabled by assigning very high knob values, reduce knobs for 7.0
|
||||
init( LOW_PRIORITY_STORAGE_QUEUE_BYTES_START, 775e8 ); if( smallStorageTarget ) LOW_PRIORITY_STORAGE_QUEUE_BYTES_START = 1750e3;
|
||||
init( LOW_PRIORITY_STORAGE_QUEUE_BYTES_END, 760e6 ); if( smallStorageTarget ) LOW_PRIORITY_STORAGE_QUEUE_BYTES_END = 1500e3;
|
||||
init( LOW_PRIORITY_DURABILITY_LAG_START, 275e8 ); if( smallStorageTarget ) LOW_PRIORITY_DURABILITY_LAG_START = 15e6;
|
||||
init( LOW_PRIORITY_DURABILITY_LAG_END, 260e6 ); if( smallStorageTarget ) LOW_PRIORITY_DURABILITY_LAG_END = 10e6;
|
||||
init( LOW_PRIORITY_STORAGE_QUEUE_BYTES, 775e8 ); if( smallStorageTarget ) LOW_PRIORITY_STORAGE_QUEUE_BYTES = 1750e3;
|
||||
init( LOW_PRIORITY_DURABILITY_LAG, 275e8 ); if( smallStorageTarget ) LOW_PRIORITY_DURABILITY_LAG = 15e6;
|
||||
|
||||
bool smallTlogTarget = randomize && BUGGIFY;
|
||||
init( TARGET_BYTES_PER_TLOG, 2400e6 ); if( smallTlogTarget ) TARGET_BYTES_PER_TLOG = 2000e3;
|
||||
|
|
|
@ -383,10 +383,8 @@ public:
|
|||
int64_t STORAGE_DURABILITY_LAG_HARD_MAX;
|
||||
int64_t STORAGE_DURABILITY_LAG_SOFT_MAX;
|
||||
|
||||
int64_t LOW_PRIORITY_STORAGE_QUEUE_BYTES_START;
|
||||
int64_t LOW_PRIORITY_STORAGE_QUEUE_BYTES_END;
|
||||
int64_t LOW_PRIORITY_DURABILITY_LAG_START;
|
||||
int64_t LOW_PRIORITY_DURABILITY_LAG_END;
|
||||
int64_t LOW_PRIORITY_STORAGE_QUEUE_BYTES;
|
||||
int64_t LOW_PRIORITY_DURABILITY_LAG;
|
||||
|
||||
int64_t TARGET_BYTES_PER_TLOG;
|
||||
int64_t SPRING_BYTES_TLOG;
|
||||
|
|
|
@ -96,16 +96,6 @@ private:
|
|||
bool isClear;
|
||||
};
|
||||
|
||||
ACTOR Future<Void> increasingPriorityDelay(Future<Void> change) {
|
||||
choose {
|
||||
when(wait(delay(0, TaskPriority::Low))){}
|
||||
when(wait(change)) {
|
||||
wait(delay(0, TaskPriority::DefaultEndpoint));
|
||||
}
|
||||
}
|
||||
return Void();
|
||||
}
|
||||
|
||||
struct AddingShard : NonCopyable {
|
||||
KeyRange keys;
|
||||
Future<Void> fetchClient; // holds FetchKeys() actor
|
||||
|
@ -518,7 +508,6 @@ public:
|
|||
|
||||
bool behind;
|
||||
bool versionBehind;
|
||||
AsyncVar<bool> durabilityBehind;
|
||||
|
||||
bool debug_inApplyUpdate;
|
||||
double debug_lastValidateTime;
|
||||
|
@ -614,7 +603,7 @@ public:
|
|||
counters(this), tag(invalidTag), maxQueryQueue(0), thisServerID(ssi.id()),
|
||||
readQueueSizeMetric(LiteralStringRef("StorageServer.ReadQueueSize")), behind(false), versionBehind(false),
|
||||
byteSampleClears(false, LiteralStringRef("\xff\xff\xff")), noRecentUpdates(false), lastUpdate(now()),
|
||||
poppedAllAfter(std::numeric_limits<Version>::max()), cpuUsage(0.0), diskUsage(0.0), durabilityBehind(false) {
|
||||
poppedAllAfter(std::numeric_limits<Version>::max()), cpuUsage(0.0), diskUsage(0.0) {
|
||||
version.initMetric(LiteralStringRef("StorageServer.Version"), counters.cc.id);
|
||||
oldestVersion.initMetric(LiteralStringRef("StorageServer.OldestVersion"), counters.cc.id);
|
||||
durableVersion.initMetric(LiteralStringRef("StorageServer.DurableVersion"), counters.cc.id);
|
||||
|
@ -695,27 +684,11 @@ public:
|
|||
(currentRate() < 1e-6 ? 1e6 : 1.0 / currentRate()));
|
||||
}
|
||||
|
||||
bool checkDurabilityBehind() {
|
||||
return version.get() - durableVersion.get() > SERVER_KNOBS->LOW_PRIORITY_DURABILITY_LAG_END;
|
||||
|
||||
/*
|
||||
if(durabilityBehind.get()) {
|
||||
durabilityBehind.set(
|
||||
version.get() - durableVersion.get() > SERVER_KNOBS->LOW_PRIORITY_DURABILITY_LAG_END ||
|
||||
queueSize() > SERVER_KNOBS->LOW_PRIORITY_STORAGE_QUEUE_BYTES_END);
|
||||
} else {
|
||||
durabilityBehind.set(
|
||||
version.get() - durableVersion.get() > SERVER_KNOBS->LOW_PRIORITY_DURABILITY_LAG_START ||
|
||||
queueSize() > SERVER_KNOBS->LOW_PRIORITY_STORAGE_QUEUE_BYTES_START );
|
||||
}
|
||||
return durabilityBehind.get();
|
||||
*/
|
||||
}
|
||||
|
||||
Future<Void> getQueryDelay() {
|
||||
if(checkDurabilityBehind()) {
|
||||
if((version.get() - durableVersion.get() > SERVER_KNOBS->LOW_PRIORITY_DURABILITY_LAG) ||
|
||||
(queueSize() > SERVER_KNOBS->LOW_PRIORITY_STORAGE_QUEUE_BYTES)) {
|
||||
++counters.lowPriorityQueries;
|
||||
return delay(0, TaskPriority::Low); //increasingPriorityDelay(durabilityBehind.onChange());
|
||||
return delay(0, TaskPriority::BehindReads);
|
||||
}
|
||||
return delay(0, TaskPriority::DefaultEndpoint);
|
||||
}
|
||||
|
|
|
@ -90,6 +90,7 @@ enum class TaskPriority {
|
|||
UpdateStorage = 3000,
|
||||
TLogSpilledPeekReply = 2800,
|
||||
FetchKeys = 2500,
|
||||
BehindReads = 2200,
|
||||
Low = 2000,
|
||||
|
||||
Min = 1000,
|
||||
|
|
Loading…
Reference in New Issue