camunda-community-hub / zeebe-simple-monitor

A monitoring application to show insides of Zeebe for developers
Apache License 2.0
169 stars 105 forks source link

The processing speed of messages is relatively slow #626

Closed aisong closed 9 months ago

aisong commented 11 months ago

zeebe: 8.3.3 hazelcast exporter: 1.4.1 zeebe-simple-monitor: 2.2.0

We found that the receiver's data processing speed is relatively slow. I used a simple process。

In the engine, the execution time for the simple process is very short, less than 1 second. You can check the trace logs of the Hazelcast Exporter:

2023-11-24 09:45:33.350 [Broker-0] [zb-fs-workers-1] [Exporter-1] TRACE io.camunda.zeebe.broker.exporter.hazelcast - Added a record to the ring-buffer [record-position: 1007, ring-buffer sequence-number: 256] 2023-11-24 09:45:33.388 [Broker-0] [zb-fs-workers-1] [Exporter-1] TRACE io.camunda.zeebe.broker.exporter.hazelcast - Added a record to the ring-buffer [record-position: 1008, ring-buffer sequence-number: 257] ...... 2023-11-24 09:45:33.432 [Broker-0] [zb-fs-workers-3] [Exporter-1] TRACE io.camunda.zeebe.broker.exporter.hazelcast - Added a record to the ring-buffer [record-position: 1037, ring-buffer sequence-number: 286] 2023-11-24 09:45:33.432 [Broker-0] [zb-fs-workers-3] [Exporter-1] TRACE io.camunda.zeebe.broker.exporter.hazelcast - Added a record to the ring-buffer [record-position: 1038, ring-buffer sequence-number: 287]

And,I printed each message in the ifEvent method of Zeebe Simple Monitor, including the timestamp for processing each message and the relative time difference:

2023-11-24 09:45:36.196 INFO 7766 --- [ Thread-7] c.e.e.a.m.zeebe.ZeebeImportService : Event Record: meta.timestamp=2023-11-24 09:45:33.405, now.timestamp=2023-11-24 09:45:36.196, diff=2791 2023-11-24 09:45:37.014 INFO 7766 --- [ Thread-8] c.e.e.a.m.zeebe.ZeebeImportService : Event Record: meta.timestamp=2023-11-24 09:45:33.405, now.timestamp=2023-11-24 09:45:37.013, diff=3608 2023-11-24 09:45:37.489 INFO 7766 --- [ Thread-9] c.e.e.a.m.zeebe.ZeebeImportService : Event Record: meta.timestamp=2023-11-24 09:45:33.405, now.timestamp=2023-11-24 09:45:37.489, diff=4084 2023-11-24 09:45:37.948 INFO 7766 --- [ Thread-10] c.e.e.a.m.zeebe.ZeebeImportService : Event Record: ...... 2023-11-24 09:45:51.792 INFO 7766 --- [ Thread-30] c.e.e.a.m.zeebe.ZeebeImportService : Event Record: meta.timestamp=2023-11-24 09:45:33.405, now.timestamp=2023-11-24 09:45:51.791, diff=18386 2023-11-24 09:45:52.536 INFO 7766 --- [ Thread-31] c.e.e.a.m.zeebe.ZeebeImportService : Event Record: meta.timestamp=2023-11-24 09:45:33.405, now.timestamp=2023-11-24 09:45:52.535, diff=19130 2023-11-24 09:45:52.891 INFO 7766 --- [ Thread-32] c.e.e.a.m.zeebe.ZeebeImportService : Event Record: meta.timestamp=2023-11-24 09:45:33.405, now.timestamp=2023-11-24 09:45:52.891, diff=19486 2023-11-24 09:45:53.543 INFO 7766 --- [ Thread-33] c.e.e.a.m.zeebe.ZeebeImportService : Event Record: meta.timestamp=2023-11-24 09:45:33.405, now.timestamp=2023-11-24 09:45:53.542, diff=20137

You will notice that the timestamp for the last processed event message is already 20 seconds apart.

How can I minimize the processing latency of event messages, aiming to achieve near-real-time processing?

nitram509 commented 11 months ago

@aisong

The performance of the Zeebe Simple Monitor is influenced by multiple things.

Overall I would recommend you to upgrade to the latest release, because of the indecies we added to the database. Hint: if you upgrade an existing database, please ensure SPRING_JPA_HIBERNATE_DDL_AUTO: "update" is set in the application.yaml, because by default, no database structures are updated. Also, keep in mind the first time the monitor starts after upgrading, the database will be busy, creating new indexes.

I hope that helps.

aisong commented 11 months ago

nitram509

Okay, thank you for your reply and suggestions. We will give it a try.

nitram509 commented 9 months ago

No response for some time. Closing now. Please feel free to re-open.