Alexey Serbin has uploaded this change for review. (
http://gerrit.cloudera.org:8080/16938
Change subject: [util] logging on slow execution in FindBestOp()
......................................................................
[util] logging on slow execution in FindBestOp()
This patch adds SCOPED_LOG_SLOW_EXECUTION with the threshold
of 3 seconds into the MaintenanceManager::FindBestOp() method.
The motivation for this change is a finding that FindBestOp()'s
computational complexity is O(n^2) of the number of replicas per tablet
server (each tablet replica registers about 8 maintenance operations).
Also, BudgetedCompactionPolicy::RunApproximation()'s computational
complexity is O(n^2) of the number of rowset in max and min keys.
In the wild, there was an instance of a Kudu cluster with high data
ingest ratio with the following stack showing in every snapshot in the
diagnostic logs for many hours in a row:
0xa11735 kudu::tablet::BudgetedCompactionPolicy::RunApproximation()
0xa129c9 kudu::tablet::BudgetedCompactionPolicy::PickRowSets()
0x9c8d80 kudu::tablet::Tablet::UpdateCompactionStats()
0x9ec848 kudu::tablet::CompactRowSetsOp::UpdateStats()
0x1b3de5c kudu::MaintenanceManager::FindBestOp()
0x1b3f3c5 kudu::MaintenanceManager::RunSchedulerThread()
0x1b86014 kudu::Thread::SuperviseThread()
Change-Id: If5420afd605f9bd22207af142b49e73336907486
---
M src/kudu/util/maintenance_manager.cc
1 file changed, 1 insertion(+), 0 deletions(-)
git pull ssh://gerrit.cloudera.org:29418/kudu refs/changes/38/16938/1
--
To view, visit http://gerrit.cloudera.org:8080/16938
To unsubscribe, visit http://gerrit.cloudera.org:8080/settings
Gerrit-Project: kudu
Gerrit-Branch: master
Gerrit-MessageType: newchange
Gerrit-Change-Id: If5420afd605f9bd22207af142b49e73336907486
Gerrit-Change-Number: 16938
Gerrit-PatchSet: 1
Gerrit-Owner: Alexey Serbin <[email protected]>