KUDU-115 Part 3. Reduced CPU usage for compaction selection.
KUDU-115 Part 3. Reduced CPU usage for compaction selection.

In this commit in order to speed up operation, the heap used in calculating the
fractional knapsack solution was changed to use pointers to RowSetInfo
instances rather than copies. This provided an average 0.1s speedup because
for heap operations a pointer swap is significantly faster than a RowSetInfo copy, which is a moderately large structure. Perf data shows that the many mov instructions required during heap swaps take up a moderate chunk of time, about 5%. Finally, using pointers will allow for RowSetInfo to contain more information without ill effects.

Note in data below the MaintenanceManager accumulates time spent on opterations
and a slightly larger tablet, at 88GB, was used, which differs from prior commits.

Before:
Flame Graph: http://a1228.halxg.cloudera.com/~vlad17/divopt-88.svg
I0627 22:08:43.450865   867 maintenance_manager.cc:302] MaintenanceManager ran Compact
RowSetsOp(04751e0d98f3452d90a0a806dc093ade) in 0.72089s
I0627 22:08:44.170770   865 maintenance_manager.cc:302] MaintenanceManager ran Compact
RowSetsOp(04751e0d98f3452d90a0a806dc093ade) in 1.1903s
I0627 22:08:44.890032   866 maintenance_manager.cc:302] MaintenanceManager ran Compact
RowSetsOp(04751e0d98f3452d90a0a806dc093ade) in 1.6598s

After:
Flame Graph: http://a1228.halxg.cloudera.com/~vlad17/ptrheapopt.svg
I0627 22:44:33.591236  7133 maintenance_manager.cc:302] MaintenanceManager ran
CompactRowSetsOp(04751e0d98f3452d90a0a806dc093ade) in 0.62243s
I0627 22:44:34.212749  7130 maintenance_manager.cc:302] MaintenanceManager ran
CompactRowSetsOp(04751e0d98f3452d90a0a806dc093ade) in 0.99346
I0627 22:44:34.836072  7131 maintenance_manager.cc:302] MaintenanceManager ran
CompactRowSetsOp(04751e0d98f3452d90a0a806dc093ade) in 1.367s

Change-Id: I11ac189ea29daf87e5748126c3e4aca3d272abc4
Reviewed-on: http://gerrit.ent.cloudera.com:8080/3332
Tested-by: jenkins
Reviewed-by: Todd Lipcon <2c763d726a8c2f6afda9be7e0e56a2caa6bb5e6b@cloudera.com>

InspurUSA/kudu,andrwng/kudu,andrwng/kudu,cloudera/kudu,andrwng/kudu,InspurUSA/kudu,EvilMcJerkface/kudu,andrwng/kudu,andrwng/kudu,EvilMcJerkface/kudu,EvilMcJerkface/kudu,EvilMcJerkface/kudu,InspurUSA/kudu,EvilMcJerkface/kudu,InspurUSA/kudu,cloudera/kudu,EvilMcJerkface/kudu,cloudera/kudu,cloudera/kudu,helifu/kudu,helifu/kudu,InspurUSA/kudu,helifu/kudu,helifu/kudu,cloudera/kudu,andrwng/kudu,InspurUSA/kudu,InspurUSA/kudu,cloudera/kudu,helifu/kudu,cloudera/kudu,andrwng/kudu,cloudera/kudu,EvilMcJerkface/kudu,andrwng/kudu,EvilMcJerkface/kudu,helifu/kudu,helifu/kudu,andrwng/kudu,InspurUSA/kudu,cloudera/kudu,EvilMcJerkface/kudu,helifu/kudu,InspurUSA/kudu,helifu/kudu