Skip to content

Instantly share code, notes, and snippets.

@danielkec
Last active June 9, 2020 07:58
Show Gist options
  • Select an option

  • Save danielkec/1692ff04fd0aba56008d81d022373292 to your computer and use it in GitHub Desktop.

Select an option

Save danielkec/1692ff04fd0aba56008d81d022373292 to your computer and use it in GitHub Desktop.

https://github.com/danielkec/helidon-jmh/tree/emitter-lock-comparison/src/main/java/io/helidon

Single thread test

  • WIN 10
  • AMD Ryzen 7 3700X 8-Core Processor, 3593 Mhz
  • JMH version: 1.19
  • VM version: JDK 14.0.1, VM 14.0.1+7
Benchmark                                Mode  Cnt   Score   Error  Units
EPTest.testEmitterReentrantReqMillion   thrpt   20  29.530 ± 0.327  ops/s
EPTest.testEmitterReentrantReqOneByOne  thrpt   20  14.951 ± 0.309  ops/s
EPTest.testEmitterReentrantUnbounded    thrpt   20  43.676 ± 0.202  ops/s
EPTest.testEmitterSyncReqMillion        thrpt   20  39.386 ± 1.514  ops/s
EPTest.testEmitterSyncReqOneByOne       thrpt   20  18.065 ± 0.382  ops/s
EPTest.testEmitterSyncUnbounded         thrpt   20  63.701 ± 0.432  ops/s
EPTest.testEmitterTTASReqMillion        thrpt   20  29.608 ± 1.082  ops/s
EPTest.testEmitterTTASReqOneByOne       thrpt   20  14.720 ± 0.299  ops/s
EPTest.testEmitterTTASUnbounded         thrpt   20  47.196 ± 0.247  ops/s
EPTest.testOTPReqMillion                thrpt   20  23.365 ± 0.297  ops/s
EPTest.testOTPReqOneByOne               thrpt   20  13.184 ± 0.321  ops/s
EPTest.testOTPUnbounded                 thrpt   20  26.072 ± 0.058  ops/s
  • Ubuntu 18.04.4 LTS
  • Intel® Core™ i5-8350U CPU @ 1.70GHz × 8
  • JMH version: 1.19
  • VM version: JDK 11.0.4, VM 11.0.4+10-LTS
Benchmark                                Mode  Cnt   Score   Error  Units
EPTest.testEmitterReentrantReqMillion   thrpt   20  11.316 ± 1.445  ops/s
EPTest.testEmitterReentrantReqOneByOne  thrpt   20   7.233 ± 0.818  ops/s
EPTest.testEmitterReentrantUnbounded    thrpt   20  19.832 ± 0.959  ops/s
EPTest.testEmitterSyncReqMillion        thrpt   20  18.976 ± 2.039  ops/s
EPTest.testEmitterSyncReqOneByOne       thrpt   20   8.953 ± 0.598  ops/s
EPTest.testEmitterSyncUnbounded         thrpt   20  33.694 ± 1.253  ops/s
EPTest.testEmitterTTASReqMillion        thrpt   20  13.662 ± 1.614  ops/s
EPTest.testEmitterTTASReqOneByOne       thrpt   20   7.089 ± 0.582  ops/s
EPTest.testEmitterTTASUnbounded         thrpt   20  20.104 ± 1.695  ops/s
EPTest.testOTPReqMillion                thrpt   20  10.116 ± 0.706  ops/s
EPTest.testOTPReqOneByOne               thrpt   20   5.934 ± 0.336  ops/s
EPTest.testOTPUnbounded                 thrpt   20   9.999 ± 0.842  ops/s
  • Darwin 18.7.0 Darwin Kernel Version 18.7.0
  • Intel Core i9 3,6 GHz × 8
  • java version “11.0.7” 2020-04-14 LTS
Benchmark                                Mode  Cnt   Score   Error  Units
EPTest.testEmitterReentrantReqMillion   thrpt   20  22.377 ± 0.182  ops/s
EPTest.testEmitterReentrantReqOneByOne  thrpt   20  11.904 ± 0.215  ops/s
EPTest.testEmitterReentrantUnbounded    thrpt   20  38.595 ± 0.138  ops/s
EPTest.testEmitterSyncReqMillion        thrpt   20  40.160 ± 0.981  ops/s
EPTest.testEmitterSyncReqOneByOne       thrpt   20  14.710 ± 0.691  ops/s
EPTest.testEmitterSyncUnbounded         thrpt   20  62.574 ± 0.459  ops/s
EPTest.testEmitterTTASReqMillion        thrpt   20  23.355 ± 0.787  ops/s
EPTest.testEmitterTTASReqOneByOne       thrpt   20  12.120 ± 0.365  ops/s
EPTest.testEmitterTTASUnbounded         thrpt   20  47.959 ± 0.384  ops/s
EPTest.testOTPReqMillion                thrpt   20  18.312 ± 0.315  ops/s
EPTest.testOTPReqOneByOne               thrpt   20  10.011 ± 0.072  ops/s
EPTest.testOTPUnbounded                 thrpt   20  19.632 ± 0.098  ops/s
  • Darwin 18.7.0 Darwin Kernel Version 18.7.0
  • Intel Core i9 3,6 GHz × 8
  • java 14
Benchmark                                Mode  Cnt   Score   Error  Units
EPTest.testEmitterReentrantReqMillion   thrpt   20  25.694 ± 0.136  ops/s
EPTest.testEmitterReentrantReqOneByOne  thrpt   20  12.637 ± 0.081  ops/s
EPTest.testEmitterReentrantUnbounded    thrpt   20  39.006 ± 0.411  ops/s
EPTest.testEmitterSyncReqMillion        thrpt   20  54.813 ± 0.644  ops/s
EPTest.testEmitterSyncReqOneByOne       thrpt   20  16.433 ± 0.062  ops/s
EPTest.testEmitterSyncUnbounded         thrpt   20  69.040 ± 0.389  ops/s
EPTest.testEmitterTTASReqMillion        thrpt   20  30.316 ± 0.191  ops/s
EPTest.testEmitterTTASReqOneByOne       thrpt   20  13.198 ± 0.041  ops/s
EPTest.testEmitterTTASUnbounded         thrpt   20  42.645 ± 0.120  ops/s
EPTest.testOTPReqMillion                thrpt   20  20.954 ± 0.055  ops/s
EPTest.testOTPReqOneByOne               thrpt   20  10.129 ± 0.053  ops/s
EPTest.testOTPUnbounded                 thrpt   20  20.530 ± 0.118  ops/s

Higher lock contention

  • WIN 10
  • AMD Ryzen 7 3700X 8-Core Processor, 3593 Mhz
  • JMH version: 1.19
  • VM version: JDK 14.0.1, VM 14.0.1+7
Benchmark                                          Mode  Cnt   Score   Error  Units
EPConcurrentTest.testEmitterReentrantReqMillion   thrpt   20  13.130 ± 0.106  ops/s
EPConcurrentTest.testEmitterReentrantReqOneByOne  thrpt   20   7.006 ± 0.213  ops/s
EPConcurrentTest.testEmitterReentrantUnbounded    thrpt   20  28.984 ± 0.144  ops/s
EPConcurrentTest.testEmitterSyncReqMillion        thrpt   20   8.171 ± 0.134  ops/s
EPConcurrentTest.testEmitterSyncReqOneByOne       thrpt   20   6.485 ± 0.164  ops/s
EPConcurrentTest.testEmitterSyncUnbounded         thrpt   20  14.916 ± 0.134  ops/s
EPConcurrentTest.testEmitterTTASReqMillion        thrpt   20  22.131 ± 0.967  ops/s
EPConcurrentTest.testEmitterTTASReqOneByOne       thrpt   20  12.032 ± 0.130  ops/s
EPConcurrentTest.testEmitterTTASUnbounded         thrpt   20  30.404 ± 0.150  ops/s
EPConcurrentTest.testOTPReqMillion                thrpt   20  10.586 ± 0.124  ops/s
EPConcurrentTest.testOTPReqOneByOne               thrpt   20   5.134 ± 0.098  ops/s
EPConcurrentTest.testOTPUnbounded                 thrpt   20  11.543 ± 0.065  ops/s
  • Ubuntu 18.04.4 LTS
  • Intel® Core™ i5-8350U CPU @ 1.70GHz × 8
  • JMH version: 1.19
  • VM version: JDK 11.0.4, VM 11.0.4+10-LTS
Benchmark                                          Mode  Cnt   Score   Error  Units
EPConcurrentTest.testEmitterReentrantReqMillion   thrpt   20   7.230 ± 0.245  ops/s
EPConcurrentTest.testEmitterReentrantReqOneByOne  thrpt   20   3.528 ± 0.093  ops/s
EPConcurrentTest.testEmitterReentrantUnbounded    thrpt   20  15.834 ± 0.291  ops/s
EPConcurrentTest.testEmitterSyncReqMillion        thrpt   20   8.862 ± 0.168  ops/s
EPConcurrentTest.testEmitterSyncReqOneByOne       thrpt   20   3.073 ± 0.102  ops/s
EPConcurrentTest.testEmitterSyncUnbounded         thrpt   20   9.907 ± 1.723  ops/s
EPConcurrentTest.testEmitterTTASReqMillion        thrpt   20  17.525 ± 0.410  ops/s
EPConcurrentTest.testEmitterTTASReqOneByOne       thrpt   20   7.392 ± 0.852  ops/s
EPConcurrentTest.testEmitterTTASUnbounded         thrpt   20  27.923 ± 0.314  ops/s
EPConcurrentTest.testOTPReqMillion                thrpt   20   4.921 ± 0.201  ops/s
EPConcurrentTest.testOTPReqOneByOne               thrpt   20   2.550 ± 0.102  ops/s
EPConcurrentTest.testOTPUnbounded                 thrpt   20   5.149 ± 0.183  ops/s
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment