Repository: aurora
Updated Branches:
  refs/heads/master e4c9c73f5 -> f064dc106


Enable H2 query statistics collection.

With this enabled operators can visit the H2 console at /h2console and run
queries like `SELECT * FROM INFORMATION_SCHEMA.QUERY_STATISTICS ORDER BY
MAX_EXECUTION_TIME DESC;` to diagnose slow schedulers.

Testing Done:
Ran `SELECT * FROM INFORMATION_SCHEMA.QUERY_STATISTICS ORDER BY
MAX_EXECUTION_TIME DESC;` within vagrant and saw query statistics.

Benchmarks

Master (c595228):
Benchmark                                                                     
(numPendingTasks)   Mode  Cnt      Score      Error  Units
SchedulingBenchmarks.ClusterFullUtilizationBenchmark.runBenchmark               
            N/A  thrpt   10  64138.084 ± 6732.130  ops/s
SchedulingBenchmarks.InsufficientResourcesSchedulingBenchmark.runBenchmark      
            N/A  thrpt   10  23863.861 ± 2101.622  ops/s
SchedulingBenchmarks.LimitConstraintMismatchSchedulingBenchmark.runBenchmark    
            N/A  thrpt   10   2228.883 ±  311.434  ops/s
SchedulingBenchmarks.PreemptorSlotSearchBenchmark.runBenchmark                  
              1  thrpt   10     50.914 ±    2.488  ops/s
SchedulingBenchmarks.PreemptorSlotSearchBenchmark.runBenchmark                  
             10  thrpt   10     43.729 ±    3.038  ops/s
SchedulingBenchmarks.PreemptorSlotSearchBenchmark.runBenchmark                  
            100  thrpt   10     44.409 ±    4.426  ops/s
SchedulingBenchmarks.PreemptorSlotSearchBenchmark.runBenchmark                  
           1000  thrpt   10     40.429 ±    7.526  ops/s
SchedulingBenchmarks.ValueConstraintMismatchSchedulingBenchmark.runBenchmark    
            N/A  thrpt   10  22942.538 ± 1281.331  ops/s

This change:
Benchmark                                                                     
(numPendingTasks)   Mode  Cnt      Score      Error  Units
SchedulingBenchmarks.ClusterFullUtilizationBenchmark.runBenchmark               
            N/A  thrpt   10  65285.628 ± 2422.816  ops/s
SchedulingBenchmarks.InsufficientResourcesSchedulingBenchmark.runBenchmark      
            N/A  thrpt   10  24573.332 ± 1332.474  ops/s
SchedulingBenchmarks.LimitConstraintMismatchSchedulingBenchmark.runBenchmark    
            N/A  thrpt   10   2430.402 ±  258.860  ops/s
SchedulingBenchmarks.PreemptorSlotSearchBenchmark.runBenchmark                  
              1  thrpt   10     43.810 ±    2.669  ops/s
SchedulingBenchmarks.PreemptorSlotSearchBenchmark.runBenchmark                  
             10  thrpt   10     37.378 ±   14.637  ops/s
SchedulingBenchmarks.PreemptorSlotSearchBenchmark.runBenchmark                  
            100  thrpt   10     40.180 ±    9.738  ops/s
SchedulingBenchmarks.PreemptorSlotSearchBenchmark.runBenchmark                  
           1000  thrpt   10     24.130 ±   15.746  ops/s
SchedulingBenchmarks.ValueConstraintMismatchSchedulingBenchmark.runBenchmark    
            N/A  thrpt   10  18429.830 ± 3077.426  ops/s

Reviewed at https://reviews.apache.org/r/42041/


Project: http://git-wip-us.apache.org/repos/asf/aurora/repo
Commit: http://git-wip-us.apache.org/repos/asf/aurora/commit/f064dc10
Tree: http://git-wip-us.apache.org/repos/asf/aurora/tree/f064dc10
Diff: http://git-wip-us.apache.org/repos/asf/aurora/diff/f064dc10

Branch: refs/heads/master
Commit: f064dc10654b6e39543624b8bdf7009d441d8494
Parents: e4c9c73
Author: Zameer Manji <[email protected]>
Authored: Mon Jan 11 10:23:06 2016 -0800
Committer: Zameer Manji <[email protected]>
Committed: Mon Jan 11 10:23:06 2016 -0800

----------------------------------------------------------------------
 src/main/java/org/apache/aurora/scheduler/storage/db/DbModule.java | 2 ++
 1 file changed, 2 insertions(+)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/aurora/blob/f064dc10/src/main/java/org/apache/aurora/scheduler/storage/db/DbModule.java
----------------------------------------------------------------------
diff --git a/src/main/java/org/apache/aurora/scheduler/storage/db/DbModule.java 
b/src/main/java/org/apache/aurora/scheduler/storage/db/DbModule.java
index e3efbdb..2b3ee7b 100644
--- a/src/main/java/org/apache/aurora/scheduler/storage/db/DbModule.java
+++ b/src/main/java/org/apache/aurora/scheduler/storage/db/DbModule.java
@@ -123,6 +123,8 @@ public final class DbModule extends PrivateModule {
         // TODO(wfarner): H2 can ship these to slf4j, but is too noisy at our 
default level (info).
         // Use this logging and reduce the default level for h2's logger.
         .put("TRACE_LEVEL_SYSTEM_OUT", "1")
+        // Enable Query Statistics
+        .put("QUERY_STATISTICS", "TRUE")
         .build();
     this.jdbcSchema = dbName + ";" + 
Joiner.on(";").withKeyValueSeparator("=").join(args);
   }

Reply via email to