Performance testing

Hi @francescobenintende,

welcome to the forum!

Let’s get straight to your questions:

Performance numbers depend on many factors (commands you send / DAML model, hardware, network, …) and therefore we do not share numbers in public at the moment. But let me point you to a few utilities that are helpful when doing performance tests:

  1. The myParticipant.ledger_api.transactions.start_measuring command will subscribe to the transaction stream and register a metric that tracks the rate at which a participant outputs new transactions:
    Canton Console — Canton 1.0.0-SNAPSHOT documentation
    The command also takes a call-back that gets invoked on every transaction; that would allow you to implement your own measurements, if you want to bypass metrics.

  2. This section of our documentation explains how you configure Canton to report metrics to a File, via JMX, to Graphite or to Prometheus:
    Monitoring — Canton 1.0.0-SNAPSHOT documentation
    To get started with metrics, I would probably go for JMX. This allows you to connect to your node using VisualVM and view all the available metrics. Once you have a rough idea which metrics are relevant to you, you can still setup Graphite or Prometheus.

  3. If you want to see where a command spends how much time, you should look into tracing: Monitoring — Canton 1.0.0-SNAPSHOT documentation

  4. Now to your very important question of how to actually load the system. As a starting point, I would use a very simple DAML model. If you don’t have one, you can use the built-in ping workflow: Canton Console — Canton 1.0.0-SNAPSHOT documentation
    The bong workflow has specifically been designed to create high load and contention:
    Canton Console — Canton 1.0.0-SNAPSHOT documentation
    From that you can move into various directions:

    1. Create your own - more realistic - DAML model and workflow.
    2. Tweak the configuration
    3. Group multiple DAML commands into a single command (batching) to get higher throughput.
    4. Increase the number of participants (and, perhaps, domains) to get higher throughput.
  5. Last but not least, if you observe that the system gets overloaded (timeouts), look at this post: Canton - Sequencer time [..] Exceeding max-sequencing-time / Response message for request X timed out - #2 by MatthiasSchmalz

That’s a lot of information and I hope it is helpful to you. Please don’t hesitate to follow-up on any of these points, if you need more help!
Regards,
Matthias

1 Like