42
Reproductible benchmarks Let’s talk tooling Not fancy crypto, but at least it is easy to understand! Nicolas DORIER Code monkey at DG Lab and Metaco Main maintainer of NBitcoin and BTCPay Server https://github.com/dgarage/LightningBenchmarks

Reproductible benchmarks - Scaling Bitcoin · Reproductible benchmarks Let’s talk tooling Not fancy crypto, but at least it is easy to understand! Nicolas DORIER Code monkey at

  • Upload
    others

  • View
    6

  • Download
    0

Embed Size (px)

Citation preview

Page 1: Reproductible benchmarks - Scaling Bitcoin · Reproductible benchmarks Let’s talk tooling Not fancy crypto, but at least it is easy to understand! Nicolas DORIER Code monkey at

Reproductible benchmarksLet’s talk tooling

Not fancy crypto, but at least it is easy to understand!

Nicolas DORIERCode monkey at DG Lab and Metaco

Main maintainer of NBitcoin and BTCPay Serverhttps://github.com/dgarage/LightningBenchmarks

Page 2: Reproductible benchmarks - Scaling Bitcoin · Reproductible benchmarks Let’s talk tooling Not fancy crypto, but at least it is easy to understand! Nicolas DORIER Code monkey at

• Tell you tell me about Lightning performance?

I was asked

Page 3: Reproductible benchmarks - Scaling Bitcoin · Reproductible benchmarks Let’s talk tooling Not fancy crypto, but at least it is easy to understand! Nicolas DORIER Code monkey at

• How fast can Alice pay Bob?• How fast can Alice pay Bob through

Carol?• How fast Alices can pay Bob?

I reformulated

Page 4: Reproductible benchmarks - Scaling Bitcoin · Reproductible benchmarks Let’s talk tooling Not fancy crypto, but at least it is easy to understand! Nicolas DORIER Code monkey at

• 34 payments / sec• 12 payments / sec• 20 payments / sec (with 4

Bobs)

I responded c-lightning in may 2018

Page 5: Reproductible benchmarks - Scaling Bitcoin · Reproductible benchmarks Let’s talk tooling Not fancy crypto, but at least it is easy to understand! Nicolas DORIER Code monkey at
Page 6: Reproductible benchmarks - Scaling Bitcoin · Reproductible benchmarks Let’s talk tooling Not fancy crypto, but at least it is easy to understand! Nicolas DORIER Code monkey at

Does it matter?

Page 7: Reproductible benchmarks - Scaling Bitcoin · Reproductible benchmarks Let’s talk tooling Not fancy crypto, but at least it is easy to understand! Nicolas DORIER Code monkey at

Does it matter?

No (interesting for developers)

Page 8: Reproductible benchmarks - Scaling Bitcoin · Reproductible benchmarks Let’s talk tooling Not fancy crypto, but at least it is easy to understand! Nicolas DORIER Code monkey at

• Lightning network implementers• Services relying on micro

payments

Page 9: Reproductible benchmarks - Scaling Bitcoin · Reproductible benchmarks Let’s talk tooling Not fancy crypto, but at least it is easy to understand! Nicolas DORIER Code monkey at

Framework Benchmarking and sharing results predictably easily

Reframing the objective

Page 10: Reproductible benchmarks - Scaling Bitcoin · Reproductible benchmarks Let’s talk tooling Not fancy crypto, but at least it is easy to understand! Nicolas DORIER Code monkey at
Page 11: Reproductible benchmarks - Scaling Bitcoin · Reproductible benchmarks Let’s talk tooling Not fancy crypto, but at least it is easy to understand! Nicolas DORIER Code monkey at
Page 12: Reproductible benchmarks - Scaling Bitcoin · Reproductible benchmarks Let’s talk tooling Not fancy crypto, but at least it is easy to understand! Nicolas DORIER Code monkey at

In the trenches

Page 13: Reproductible benchmarks - Scaling Bitcoin · Reproductible benchmarks Let’s talk tooling Not fancy crypto, but at least it is easy to understand! Nicolas DORIER Code monkey at

Run.sh

Page 14: Reproductible benchmarks - Scaling Bitcoin · Reproductible benchmarks Let’s talk tooling Not fancy crypto, but at least it is easy to understand! Nicolas DORIER Code monkey at

Setup: Alice pays Bob

Page 15: Reproductible benchmarks - Scaling Bitcoin · Reproductible benchmarks Let’s talk tooling Not fancy crypto, but at least it is easy to understand! Nicolas DORIER Code monkey at

Execution: Alice pays Bob

Page 16: Reproductible benchmarks - Scaling Bitcoin · Reproductible benchmarks Let’s talk tooling Not fancy crypto, but at least it is easy to understand! Nicolas DORIER Code monkey at

Specify the concurrencyvalues to test

Page 17: Reproductible benchmarks - Scaling Bitcoin · Reproductible benchmarks Let’s talk tooling Not fancy crypto, but at least it is easy to understand! Nicolas DORIER Code monkey at

Template used for actors

Page 18: Reproductible benchmarks - Scaling Bitcoin · Reproductible benchmarks Let’s talk tooling Not fancy crypto, but at least it is easy to understand! Nicolas DORIER Code monkey at

Generated artifacts

Page 19: Reproductible benchmarks - Scaling Bitcoin · Reproductible benchmarks Let’s talk tooling Not fancy crypto, but at least it is easy to understand! Nicolas DORIER Code monkey at

A bug

Page 20: Reproductible benchmarks - Scaling Bitcoin · Reproductible benchmarks Let’s talk tooling Not fancy crypto, but at least it is easy to understand! Nicolas DORIER Code monkey at

No bug

Page 21: Reproductible benchmarks - Scaling Bitcoin · Reproductible benchmarks Let’s talk tooling Not fancy crypto, but at least it is easy to understand! Nicolas DORIER Code monkey at
Page 22: Reproductible benchmarks - Scaling Bitcoin · Reproductible benchmarks Let’s talk tooling Not fancy crypto, but at least it is easy to understand! Nicolas DORIER Code monkey at
Page 23: Reproductible benchmarks - Scaling Bitcoin · Reproductible benchmarks Let’s talk tooling Not fancy crypto, but at least it is easy to understand! Nicolas DORIER Code monkey at

Setup: Alice pays Bob via Carol

Page 24: Reproductible benchmarks - Scaling Bitcoin · Reproductible benchmarks Let’s talk tooling Not fancy crypto, but at least it is easy to understand! Nicolas DORIER Code monkey at

Execution: Alice pays Bobvia Carol

Page 25: Reproductible benchmarks - Scaling Bitcoin · Reproductible benchmarks Let’s talk tooling Not fancy crypto, but at least it is easy to understand! Nicolas DORIER Code monkey at

Vary the number of Carols

Page 26: Reproductible benchmarks - Scaling Bitcoin · Reproductible benchmarks Let’s talk tooling Not fancy crypto, but at least it is easy to understand! Nicolas DORIER Code monkey at
Page 27: Reproductible benchmarks - Scaling Bitcoin · Reproductible benchmarks Let’s talk tooling Not fancy crypto, but at least it is easy to understand! Nicolas DORIER Code monkey at
Page 28: Reproductible benchmarks - Scaling Bitcoin · Reproductible benchmarks Let’s talk tooling Not fancy crypto, but at least it is easy to understand! Nicolas DORIER Code monkey at

Setup: Alices pay Bob

Page 29: Reproductible benchmarks - Scaling Bitcoin · Reproductible benchmarks Let’s talk tooling Not fancy crypto, but at least it is easy to understand! Nicolas DORIER Code monkey at

Execution: Alices pay Bob

Page 30: Reproductible benchmarks - Scaling Bitcoin · Reproductible benchmarks Let’s talk tooling Not fancy crypto, but at least it is easy to understand! Nicolas DORIER Code monkey at

Vary the number of Alices

Page 31: Reproductible benchmarks - Scaling Bitcoin · Reproductible benchmarks Let’s talk tooling Not fancy crypto, but at least it is easy to understand! Nicolas DORIER Code monkey at
Page 32: Reproductible benchmarks - Scaling Bitcoin · Reproductible benchmarks Let’s talk tooling Not fancy crypto, but at least it is easy to understand! Nicolas DORIER Code monkey at

Instrumentation

Page 33: Reproductible benchmarks - Scaling Bitcoin · Reproductible benchmarks Let’s talk tooling Not fancy crypto, but at least it is easy to understand! Nicolas DORIER Code monkey at

Revisiting the bug

Page 34: Reproductible benchmarks - Scaling Bitcoin · Reproductible benchmarks Let’s talk tooling Not fancy crypto, but at least it is easy to understand! Nicolas DORIER Code monkey at
Page 35: Reproductible benchmarks - Scaling Bitcoin · Reproductible benchmarks Let’s talk tooling Not fancy crypto, but at least it is easy to understand! Nicolas DORIER Code monkey at
Page 36: Reproductible benchmarks - Scaling Bitcoin · Reproductible benchmarks Let’s talk tooling Not fancy crypto, but at least it is easy to understand! Nicolas DORIER Code monkey at
Page 37: Reproductible benchmarks - Scaling Bitcoin · Reproductible benchmarks Let’s talk tooling Not fancy crypto, but at least it is easy to understand! Nicolas DORIER Code monkey at
Page 38: Reproductible benchmarks - Scaling Bitcoin · Reproductible benchmarks Let’s talk tooling Not fancy crypto, but at least it is easy to understand! Nicolas DORIER Code monkey at

Alice Bob

Page 39: Reproductible benchmarks - Scaling Bitcoin · Reproductible benchmarks Let’s talk tooling Not fancy crypto, but at least it is easy to understand! Nicolas DORIER Code monkey at
Page 40: Reproductible benchmarks - Scaling Bitcoin · Reproductible benchmarks Let’s talk tooling Not fancy crypto, but at least it is easy to understand! Nicolas DORIER Code monkey at

Careful!

• Containers are running in priviledged mode

Page 41: Reproductible benchmarks - Scaling Bitcoin · Reproductible benchmarks Let’s talk tooling Not fancy crypto, but at least it is easy to understand! Nicolas DORIER Code monkey at

TODO

• Depending on a common abstraction to clightning, LND and charge.

• Making Lightning implementations parametrizable

Page 42: Reproductible benchmarks - Scaling Bitcoin · Reproductible benchmarks Let’s talk tooling Not fancy crypto, but at least it is easy to understand! Nicolas DORIER Code monkey at

Thank youhttps://github.com/dgarage/LightningBenchmarks