aurora-reviews mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Maxim Khutornenko <ma...@apache.org>
Subject Re: Review Request 42882: Improving job update query performance.
Date Thu, 28 Jan 2016 00:25:22 GMT

-----------------------------------------------------------
This is an automatically generated e-mail. To reply, visit:
https://reviews.apache.org/r/42882/
-----------------------------------------------------------

(Updated Jan. 28, 2016, 12:25 a.m.)


Review request for Aurora, Bill Farner and Zameer Manji.


Changes
-------

+ticket


Bugs: AURORA-1600
    https://issues.apache.org/jira/browse/AURORA-1600


Repository: aurora


Description
-------

The solution is to do sub-selects instead of relying on a large join. For a given update this
approach reduced the overall number of rows returned by h2 to mybatis from 531441 to just
81.


Diffs
-----

  src/jmh/java/org/apache/aurora/benchmark/JobUpdates.java 0c9dbaee81d27bacee1b6bf51b33b51509e28a63

  src/jmh/java/org/apache/aurora/benchmark/UpdateStoreBenchmarks.java 1d8986ba117f32288510c299ea5634f90a9311e7

  src/main/resources/org/apache/aurora/scheduler/storage/db/JobUpdateDetailsMapper.xml fba7d4f39dffb0f431e957993b9ae7c03eba2c60


Diff: https://reviews.apache.org/r/42882/diff/


Testing
-------

Before this change:
```
Benchmark                                           (instanceOverrides)   Mode  Cnt   Score
   Error  Units
UpdateStoreBenchmarks.JobInstructionsBenchmark.run                    1  thrpt    5  39.907
±  4.694  ops/s
UpdateStoreBenchmarks.JobInstructionsBenchmark.run                   10  thrpt    5  24.641
±  4.187  ops/s
UpdateStoreBenchmarks.JobInstructionsBenchmark.run                  100  thrpt    5   0.654
±  0.080  ops/s
UpdateStoreBenchmarks.JobInstructionsBenchmark.run                 1000  thrpt    5   0.007
±  0.001  ops/s
```

After this change:
```
Benchmark                                           (instanceOverrides)   Mode  Cnt   Score
   Error  Units
UpdateStoreBenchmarks.JobInstructionsBenchmark.run                    1  thrpt    5   41.838
±  3.060  ops/s
UpdateStoreBenchmarks.JobInstructionsBenchmark.run                   10  thrpt    5   41.812
±  2.373  ops/s
UpdateStoreBenchmarks.JobInstructionsBenchmark.run                  100  thrpt    5   38.281
±  2.034  ops/s
UpdateStoreBenchmarks.JobInstructionsBenchmark.run                 1000  thrpt    5   20.459
±  2.886  ops/s
```


Thanks,

Maxim Khutornenko


Mime
  • Unnamed multipart/alternative (inline, None, 0 bytes)
View raw message