Skip to content

mv tuning8

Matthew Von-Maszewski edited this page Nov 1, 2016 · 4 revisions

Status

  • merged to master - November 1, 2016
  • code complete - October 29, 2016
  • development started - October 22, 2016

History / Context

Branch description

db/penalty_test.cc

Unit test program that verifies the boundary conditions for when penalty applies or does not apply. The test does not yet test the penalty values assigned. The expectation is that the current values are "good enough". Recent tests logged sufficient data to create a mathematical model to better calculate penalty values. Penalty value tests will come as code changes due to the model.

db/version_set.cc & .h

VersionSet::Finalized() had one line modified to clear a signed versus unsigned comparison warning.

VersionSet::UpdatePenalty() updated to use new virtual accessors relating to statistics about each "level". The accessors allow penalty_test.cc to override the underlying functions for easier test construction. The accessors could be applied elsewhere in this source file and others as unit tests expand. Newly virtualized accessors are NumFiles() and GetFileList().

Previous size based penalties used either the max file size for that level or the "desired" total size for the level as denominator for backlog calculation. Testing demonstrated that write buffer size was a better denominator. The denominator is expected to change again after logged data analysis (outside scope of this branch).

The new functions VersionSet::DesiredBytesForLevel() and MaxBytesForLevel() are simple accessors for unit tests.

Three critical Logging statements for data analysis are intentionally remaining in the code though commented out. This is in anticipation of future modeling runs.

util/throttle.cc

A recent change to the throttle calculation adjusted the "new_throttle" by the number of compaction threads. This was inappropriate. The number of compaction threads present is implied by "tot_compact" value. tot_compact contains the number of compactions that completed, by all threads, during the measurement period.

One critical Logging statement for data analysis is intentionally remaining in the code though commented out. This is in anticipation of future modeling runs.

Clone this wiki locally