Reduce resource usage of MUC stats collection

Description

When collecting statistics (like the ones used by the Monitoring plugin), some of the MUC statistics are derived from cache content. This adds a lot of inter-node serialization of data in a cluster, which is inefficient.

In a profiling session that was taken on a cluster node when 50 users were exchanging 15,000 messages in a MUC room, roughly 60-80% of the CPU usage originated in sampling. The screenshot attached in this issue was taken from an idle system, but highlights the same hotspots.

Where possible, statistics should use minimal amount of data serialization.

Environment

None

Activity

Show:
Fixed

Details

Assignee

Reporter

Components

Fix versions

Priority

Created September 8, 2022 at 11:25 AM
Updated September 10, 2022 at 6:40 AM
Resolved September 10, 2022 at 6:40 AM