easyice commented on PR #12841:
URL: https://github.com/apache/lucene/pull/12841#issuecomment-1838867648
I ran the benchmark using `wikimediumall`, we can got a minor speed up on
java21 with `MMapDirectory`, but no significant improvement with
`NIOFSDirectory`(java17), because the `NIOFSDirectory` has some additional
cost.
For task `prefix3`, the baseline of `Lucene99PostingsReader.readVIntBlock`
calls percentage in the flame graph:
* `NIOFSDirectory` 2.8%
* `MMapDirectory` 9.9%
Here is the benchmark output with java 21, baseline(main), candidate(PR):
<details>
<summary>round 1</summary>
```
TaskQPS baseline StdDevQPS
my_modified_version StdDev Pct diff p-value
LowTerm 164.44 (11.4%) 161.36
(10.5%) -1.9% ( -21% - 22%) 0.589
AndHighHigh 30.63 (4.5%) 30.13
(4.7%) -1.6% ( -10% - 7%) 0.260
IntNRQ 15.46 (6.5%) 15.25
(4.1%) -1.3% ( -11% - 9%) 0.437
AndHighMed 53.37 (7.9%) 52.67
(7.9%) -1.3% ( -15% - 15%) 0.598
OrHighMed 41.16 (7.6%) 40.62
(6.5%) -1.3% ( -14% - 13%) 0.556
TermDTSort 63.95 (9.3%) 63.25
(8.5%) -1.1% ( -17% - 18%) 0.702
LowPhrase 34.09 (4.0%) 33.79
(4.6%) -0.9% ( -9% - 8%) 0.514
Fuzzy2 33.43 (2.8%) 33.14
(3.7%) -0.9% ( -7% - 5%) 0.399
MedPhrase 63.94 (4.0%) 63.47
(4.2%) -0.7% ( -8% - 7%) 0.565
AndHighLow 347.49 (2.3%) 344.95
(3.5%) -0.7% ( -6% - 5%) 0.435
MedTerm 300.87 (7.2%) 298.76
(5.7%) -0.7% ( -12% - 13%) 0.731
OrNotHighLow 209.67 (3.5%) 208.27
(3.3%) -0.7% ( -7% - 6%) 0.536
MedIntervalsOrdered 15.79 (2.4%) 15.69
(2.6%) -0.6% ( -5% - 4%) 0.450
HighTerm 228.97 (5.8%) 227.71
(4.5%) -0.6% ( -10% - 10%) 0.737
HighSpanNear 4.51 (1.6%) 4.48
(1.8%) -0.5% ( -3% - 2%) 0.314
MedSloppyPhrase 15.24 (3.1%) 15.17
(3.4%) -0.5% ( -6% - 6%) 0.625
MedSpanNear 6.97 (2.1%) 6.95
(2.1%) -0.3% ( -4% - 4%) 0.668
HighPhrase 19.21 (3.1%) 19.17
(3.4%) -0.2% ( -6% - 6%) 0.841
HighTermTitleSort 46.25 (3.2%) 46.16
(4.7%) -0.2% ( -7% - 7%) 0.886
LowIntervalsOrdered 9.01 (2.0%) 8.99
(1.9%) -0.2% ( -4% - 3%) 0.794
LowSloppyPhrase 40.24 (3.4%) 40.18
(3.9%) -0.2% ( -7% - 7%) 0.890
HighTermDayOfYearSort 160.70 (2.9%) 160.45
(2.8%) -0.2% ( -5% - 5%) 0.861
HighTermTitleBDVSort 3.52 (4.0%) 3.51
(4.9%) -0.1% ( -8% - 9%) 0.920
HighSloppyPhrase 10.64 (3.8%) 10.63
(4.0%) -0.1% ( -7% - 8%) 0.950
OrHighLow 286.00 (3.6%) 285.99
(3.4%) -0.0% ( -6% - 7%) 0.997
HighIntervalsOrdered 1.92 (3.2%) 1.92
(3.4%) -0.0% ( -6% - 6%) 0.997
Respell 21.95 (2.1%) 21.95
(2.4%) -0.0% ( -4% - 4%) 0.998
LowSpanNear 3.20 (1.6%) 3.20
(1.1%) 0.0% ( -2% - 2%) 0.977
Fuzzy1 45.64 (3.5%) 45.69
(3.7%) 0.1% ( -6% - 7%) 0.932
OrNotHighHigh 138.92 (3.8%) 139.06
(3.8%) 0.1% ( -7% - 7%) 0.935
OrNotHighMed 106.41 (6.1%) 106.55
(5.9%) 0.1% ( -11% - 12%) 0.946
PKLookup 94.25 (3.5%) 94.44
(3.2%) 0.2% ( -6% - 7%) 0.850
OrHighNotLow 190.58 (4.1%) 191.10
(3.3%) 0.3% ( -6% - 7%) 0.816
HighTermMonthSort 1081.10 (4.7%) 1089.58
(7.1%) 0.8% ( -10% - 13%) 0.680
OrHighHigh 14.63 (5.1%) 14.76
(5.2%) 0.8% ( -9% - 11%) 0.603
OrHighNotMed 125.32 (3.6%) 126.40
(3.9%) 0.9% ( -6% - 8%) 0.463
OrHighNotHigh 187.08 (2.9%) 189.14
(3.4%) 1.1% ( -5% - 7%) 0.273
Wildcard 52.68 (3.2%) 53.31
(3.5%) 1.2% ( -5% - 8%) 0.265
Prefix3 15.10 (2.9%) 16.62
(3.1%) 10.0% ( 3% - 16%) 0.000
```
</details>
<details>
<summary>round 2</summary>
```
TaskQPS baseline StdDevQPS
my_modified_version StdDev Pct diff p-value
OrNotHighMed 131.92 (6.5%) 127.91
(6.2%) -3.0% ( -14% - 10%) 0.131
HighTermMonthSort 1150.34 (4.7%) 1117.43
(5.3%) -2.9% ( -12% - 7%) 0.071
TermDTSort 71.29 (6.2%) 69.81
(6.8%) -2.1% ( -14% - 11%) 0.310
AndHighMed 55.29 (5.5%) 54.16
(5.8%) -2.0% ( -12% - 9%) 0.252
OrHighMed 30.76 (5.7%) 30.18
(5.7%) -1.9% ( -12% - 10%) 0.295
OrNotHighHigh 143.93 (4.5%) 141.50
(5.2%) -1.7% ( -10% - 8%) 0.274
OrHighNotHigh 172.51 (4.4%) 169.68
(5.0%) -1.6% ( -10% - 8%) 0.272
LowTerm 227.14 (10.1%) 223.62
(10.2%) -1.6% ( -19% - 20%) 0.629
OrNotHighLow 317.49 (4.1%) 313.04
(5.0%) -1.4% ( -10% - 8%) 0.331
MedPhrase 76.90 (5.5%) 75.84
(5.6%) -1.4% ( -11% - 10%) 0.429
OrHighNotMed 201.60 (4.7%) 199.02
(4.7%) -1.3% ( -10% - 8%) 0.391
LowSloppyPhrase 22.26 (4.6%) 22.00
(4.2%) -1.2% ( -9% - 7%) 0.400
OrHighNotLow 151.23 (5.5%) 149.47
(4.9%) -1.2% ( -10% - 9%) 0.481
AndHighHigh 19.39 (2.7%) 19.18
(2.6%) -1.1% ( -6% - 4%) 0.196
Fuzzy1 35.55 (4.1%) 35.20
(5.0%) -1.0% ( -9% - 8%) 0.495
OrHighLow 204.03 (4.3%) 202.34
(3.3%) -0.8% ( -8% - 7%) 0.493
HighTermTitleSort 71.31 (3.8%) 70.77
(4.4%) -0.7% ( -8% - 7%) 0.566
HighSloppyPhrase 3.55 (4.1%) 3.53
(4.1%) -0.6% ( -8% - 7%) 0.632
MedSloppyPhrase 6.40 (3.6%) 6.37
(3.2%) -0.6% ( -7% - 6%) 0.582
LowSpanNear 9.38 (1.6%) 9.33
(1.7%) -0.6% ( -3% - 2%) 0.287
OrHighHigh 14.17 (2.1%) 14.10
(2.6%) -0.5% ( -5% - 4%) 0.479
Fuzzy2 33.09 (2.7%) 32.94
(4.1%) -0.5% ( -7% - 6%) 0.677
HighPhrase 19.05 (2.9%) 18.97
(2.8%) -0.4% ( -5% - 5%) 0.616
LowPhrase 63.67 (3.9%) 63.39
(4.2%) -0.4% ( -8% - 7%) 0.732
MedTerm 314.53 (5.9%) 313.31
(6.9%) -0.4% ( -12% - 13%) 0.849
HighTermTitleBDVSort 3.43 (3.9%) 3.42
(4.4%) -0.4% ( -8% - 8%) 0.789
MedSpanNear 2.87 (1.7%) 2.86
(2.0%) -0.3% ( -3% - 3%) 0.573
LowIntervalsOrdered 11.62 (2.3%) 11.60
(2.2%) -0.2% ( -4% - 4%) 0.801
HighTerm 312.37 (4.7%) 311.95
(5.4%) -0.1% ( -9% - 10%) 0.933
HighSpanNear 5.53 (2.7%) 5.52
(2.8%) -0.1% ( -5% - 5%) 0.890
HighIntervalsOrdered 2.47 (3.7%) 2.47
(3.4%) -0.0% ( -6% - 7%) 0.987
PKLookup 93.79 (2.4%) 93.90
(3.9%) 0.1% ( -6% - 6%) 0.912
Respell 45.96 (3.0%) 46.04
(3.3%) 0.2% ( -5% - 6%) 0.853
AndHighLow 438.18 (4.3%) 439.42
(3.9%) 0.3% ( -7% - 8%) 0.825
IntNRQ 15.31 (2.9%) 15.36
(3.5%) 0.3% ( -5% - 6%) 0.741
MedIntervalsOrdered 9.29 (2.7%) 9.33
(2.3%) 0.4% ( -4% - 5%) 0.590
HighTermDayOfYearSort 143.87 (3.9%) 144.55
(5.4%) 0.5% ( -8% - 10%) 0.752
Wildcard 20.15 (2.8%) 20.64
(3.9%) 2.5% ( -4% - 9%) 0.024
Prefix3 36.20 (4.0%) 39.46
(5.4%) 9.0% ( 0% - 19%) 0.000
```
</details>
<details>
<summary>round 2</summary>
```
AndHighMed 42.96 (10.2%) 41.58
(8.4%) -3.2% ( -19% - 17%) 0.275
OrHighMed 30.44 (6.6%) 29.73
(5.9%) -2.3% ( -13% - 10%) 0.242
OrHighLow 194.81 (2.8%) 191.87
(2.7%) -1.5% ( -6% - 4%) 0.085
PKLookup 93.67 (2.7%) 92.27
(2.8%) -1.5% ( -6% - 4%) 0.081
OrHighHigh 13.05 (3.0%) 12.86
(2.5%) -1.5% ( -6% - 4%) 0.093
TermDTSort 71.42 (6.9%) 70.50
(6.8%) -1.3% ( -14% - 13%) 0.551
MedPhrase 53.41 (6.1%) 52.75
(5.0%) -1.2% ( -11% - 10%) 0.481
Fuzzy2 18.30 (4.3%) 18.09
(4.1%) -1.2% ( -9% - 7%) 0.383
MedSloppyPhrase 10.14 (4.7%) 10.03
(5.4%) -1.1% ( -10% - 9%) 0.483
LowSpanNear 8.77 (3.7%) 8.68
(3.7%) -1.1% ( -8% - 6%) 0.352
IntNRQ 39.70 (4.8%) 39.35
(4.6%) -0.9% ( -9% - 8%) 0.554
LowSloppyPhrase 8.50 (2.5%) 8.42
(2.6%) -0.9% ( -5% - 4%) 0.281
HighSloppyPhrase 3.75 (3.3%) 3.71
(3.5%) -0.9% ( -7% - 6%) 0.420
MedSpanNear 6.93 (2.6%) 6.88
(2.4%) -0.8% ( -5% - 4%) 0.326
HighPhrase 19.24 (3.8%) 19.10
(2.9%) -0.7% ( -7% - 6%) 0.492
AndHighHigh 21.88 (4.0%) 21.73
(2.9%) -0.7% ( -7% - 6%) 0.548
Fuzzy1 38.02 (3.8%) 37.79
(2.6%) -0.6% ( -6% - 6%) 0.558
LowPhrase 34.81 (4.1%) 34.62
(3.8%) -0.6% ( -8% - 7%) 0.654
HighTermMonthSort 1032.28 (4.5%) 1026.71
(4.9%) -0.5% ( -9% - 9%) 0.717
AndHighLow 340.34 (3.3%) 338.68
(3.5%) -0.5% ( -7% - 6%) 0.651
OrNotHighMed 162.50 (6.2%) 161.78
(6.9%) -0.4% ( -12% - 13%) 0.830
HighSpanNear 0.59 (1.5%) 0.59
(1.3%) -0.4% ( -3% - 2%) 0.317
OrHighNotMed 133.32 (4.1%) 132.99
(5.8%) -0.3% ( -9% - 10%) 0.875
OrHighNotHigh 141.95 (3.9%) 141.76
(4.7%) -0.1% ( -8% - 8%) 0.924
Respell 31.05 (2.0%) 31.03
(1.7%) -0.1% ( -3% - 3%) 0.894
MedTerm 241.09 (7.8%) 241.01
(10.9%) -0.0% ( -17% - 20%) 0.991
HighIntervalsOrdered 3.94 (3.9%) 3.94
(3.7%) 0.0% ( -7% - 7%) 0.995
MedIntervalsOrdered 6.29 (2.8%) 6.30
(2.7%) 0.2% ( -5% - 5%) 0.861
HighTermTitleSort 83.62 (4.2%) 83.78
(2.5%) 0.2% ( -6% - 7%) 0.862
HighTerm 378.46 (4.5%) 379.20
(6.3%) 0.2% ( -10% - 11%) 0.910
LowIntervalsOrdered 4.42 (2.1%) 4.43
(2.0%) 0.2% ( -3% - 4%) 0.711
OrNotHighHigh 105.70 (3.5%) 106.02
(5.1%) 0.3% ( -8% - 9%) 0.831
HighTermTitleBDVSort 2.20 (4.1%) 2.21
(3.6%) 0.5% ( -6% - 8%) 0.671
OrNotHighLow 324.11 (3.0%) 326.31
(2.8%) 0.7% ( -4% - 6%) 0.457
LowTerm 234.84 (10.9%) 236.73
(15.2%) 0.8% ( -22% - 30%) 0.848
OrHighNotLow 208.94 (4.4%) 211.13
(6.0%) 1.0% ( -8% - 11%) 0.527
HighTermDayOfYearSort 159.96 (3.6%) 161.77
(3.9%) 1.1% ( -6% - 9%) 0.343
Wildcard 33.42 (2.2%) 34.03
(2.9%) 1.8% ( -3% - 7%) 0.023
Prefix3 204.96 (3.5%) 219.65
(3.3%) 7.2% ( 0% - 14%) 0.000
```
</details>
If there are other approach of benchmark suggestions, i can also do it :)
[flamegraph_prefix3.zip](https://github.com/apache/lucene/files/13547942/flamegraph_prefix3.zip)
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]