reproductible benchmarks · let’s talk tooling not fancy crypto, but at least it is easy to...

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

Upload: others

Post on 18-Jul-2020

1 views

Category:

Documents


0 download

TRANSCRIPT

Page 1: Reproductible benchmarks · Let’s talk tooling Not fancy crypto, but at least it is easy to understand! ... • Lightning network implementers • Services relying on micro payments

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 · Let’s talk tooling Not fancy crypto, but at least it is easy to understand! ... • Lightning network implementers • Services relying on micro payments

• Tell you tell me about Lightning performance?

I was asked

Page 3: Reproductible benchmarks · Let’s talk tooling Not fancy crypto, but at least it is easy to understand! ... • Lightning network implementers • Services relying on micro payments

• 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 · Let’s talk tooling Not fancy crypto, but at least it is easy to understand! ... • Lightning network implementers • Services relying on micro payments

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

Bobs)

I responded c-lightning in may 2018

Page 5: Reproductible benchmarks · Let’s talk tooling Not fancy crypto, but at least it is easy to understand! ... • Lightning network implementers • Services relying on micro payments
Page 6: Reproductible benchmarks · Let’s talk tooling Not fancy crypto, but at least it is easy to understand! ... • Lightning network implementers • Services relying on micro payments

Does it matter?

Page 7: Reproductible benchmarks · Let’s talk tooling Not fancy crypto, but at least it is easy to understand! ... • Lightning network implementers • Services relying on micro payments

Does it matter?

No (interesting for developers)

Page 8: Reproductible benchmarks · Let’s talk tooling Not fancy crypto, but at least it is easy to understand! ... • Lightning network implementers • Services relying on micro payments

• Lightning network implementers• Services relying on micro

payments

Page 9: Reproductible benchmarks · Let’s talk tooling Not fancy crypto, but at least it is easy to understand! ... • Lightning network implementers • Services relying on micro payments

Framework Benchmarking and sharing results predictably easily

Reframing the objective

Page 10: Reproductible benchmarks · Let’s talk tooling Not fancy crypto, but at least it is easy to understand! ... • Lightning network implementers • Services relying on micro payments
Page 11: Reproductible benchmarks · Let’s talk tooling Not fancy crypto, but at least it is easy to understand! ... • Lightning network implementers • Services relying on micro payments
Page 12: Reproductible benchmarks · Let’s talk tooling Not fancy crypto, but at least it is easy to understand! ... • Lightning network implementers • Services relying on micro payments

In the trenches

Page 13: Reproductible benchmarks · Let’s talk tooling Not fancy crypto, but at least it is easy to understand! ... • Lightning network implementers • Services relying on micro payments

Run.sh

Page 14: Reproductible benchmarks · Let’s talk tooling Not fancy crypto, but at least it is easy to understand! ... • Lightning network implementers • Services relying on micro payments

Setup: Alice pays Bob

Page 15: Reproductible benchmarks · Let’s talk tooling Not fancy crypto, but at least it is easy to understand! ... • Lightning network implementers • Services relying on micro payments

Execution: Alice pays Bob

Page 16: Reproductible benchmarks · Let’s talk tooling Not fancy crypto, but at least it is easy to understand! ... • Lightning network implementers • Services relying on micro payments

Specify the concurrencyvalues to test

Page 17: Reproductible benchmarks · Let’s talk tooling Not fancy crypto, but at least it is easy to understand! ... • Lightning network implementers • Services relying on micro payments

Template used for actors

Page 18: Reproductible benchmarks · Let’s talk tooling Not fancy crypto, but at least it is easy to understand! ... • Lightning network implementers • Services relying on micro payments

Generated artifacts

Page 19: Reproductible benchmarks · Let’s talk tooling Not fancy crypto, but at least it is easy to understand! ... • Lightning network implementers • Services relying on micro payments

A bug

Page 20: Reproductible benchmarks · Let’s talk tooling Not fancy crypto, but at least it is easy to understand! ... • Lightning network implementers • Services relying on micro payments

No bug

Page 21: Reproductible benchmarks · Let’s talk tooling Not fancy crypto, but at least it is easy to understand! ... • Lightning network implementers • Services relying on micro payments
Page 22: Reproductible benchmarks · Let’s talk tooling Not fancy crypto, but at least it is easy to understand! ... • Lightning network implementers • Services relying on micro payments
Page 23: Reproductible benchmarks · Let’s talk tooling Not fancy crypto, but at least it is easy to understand! ... • Lightning network implementers • Services relying on micro payments

Setup: Alice pays Bob via Carol

Page 24: Reproductible benchmarks · Let’s talk tooling Not fancy crypto, but at least it is easy to understand! ... • Lightning network implementers • Services relying on micro payments

Execution: Alice pays Bobvia Carol

Page 25: Reproductible benchmarks · Let’s talk tooling Not fancy crypto, but at least it is easy to understand! ... • Lightning network implementers • Services relying on micro payments

Vary the number of Carols

Page 26: Reproductible benchmarks · Let’s talk tooling Not fancy crypto, but at least it is easy to understand! ... • Lightning network implementers • Services relying on micro payments
Page 27: Reproductible benchmarks · Let’s talk tooling Not fancy crypto, but at least it is easy to understand! ... • Lightning network implementers • Services relying on micro payments
Page 28: Reproductible benchmarks · Let’s talk tooling Not fancy crypto, but at least it is easy to understand! ... • Lightning network implementers • Services relying on micro payments

Setup: Alices pay Bob

Page 29: Reproductible benchmarks · Let’s talk tooling Not fancy crypto, but at least it is easy to understand! ... • Lightning network implementers • Services relying on micro payments

Execution: Alices pay Bob

Page 30: Reproductible benchmarks · Let’s talk tooling Not fancy crypto, but at least it is easy to understand! ... • Lightning network implementers • Services relying on micro payments

Vary the number of Alices

Page 31: Reproductible benchmarks · Let’s talk tooling Not fancy crypto, but at least it is easy to understand! ... • Lightning network implementers • Services relying on micro payments
Page 32: Reproductible benchmarks · Let’s talk tooling Not fancy crypto, but at least it is easy to understand! ... • Lightning network implementers • Services relying on micro payments

Instrumentation

Page 33: Reproductible benchmarks · Let’s talk tooling Not fancy crypto, but at least it is easy to understand! ... • Lightning network implementers • Services relying on micro payments

Revisiting the bug

Page 34: Reproductible benchmarks · Let’s talk tooling Not fancy crypto, but at least it is easy to understand! ... • Lightning network implementers • Services relying on micro payments
Page 35: Reproductible benchmarks · Let’s talk tooling Not fancy crypto, but at least it is easy to understand! ... • Lightning network implementers • Services relying on micro payments
Page 36: Reproductible benchmarks · Let’s talk tooling Not fancy crypto, but at least it is easy to understand! ... • Lightning network implementers • Services relying on micro payments
Page 37: Reproductible benchmarks · Let’s talk tooling Not fancy crypto, but at least it is easy to understand! ... • Lightning network implementers • Services relying on micro payments
Page 38: Reproductible benchmarks · Let’s talk tooling Not fancy crypto, but at least it is easy to understand! ... • Lightning network implementers • Services relying on micro payments

Alice Bob

Page 39: Reproductible benchmarks · Let’s talk tooling Not fancy crypto, but at least it is easy to understand! ... • Lightning network implementers • Services relying on micro payments
Page 40: Reproductible benchmarks · Let’s talk tooling Not fancy crypto, but at least it is easy to understand! ... • Lightning network implementers • Services relying on micro payments

Careful!

• Containers are running in priviledged mode

Page 41: Reproductible benchmarks · Let’s talk tooling Not fancy crypto, but at least it is easy to understand! ... • Lightning network implementers • Services relying on micro payments

TODO

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

• Making Lightning implementations parametrizable

Page 42: Reproductible benchmarks · Let’s talk tooling Not fancy crypto, but at least it is easy to understand! ... • Lightning network implementers • Services relying on micro payments

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