This repository has been archived by the owner on Apr 26, 2024. It is now read-only.
device_lists_changes_in_room
is inefficient.
#14037
Labels
A-Device-List-Tracking
Telling clients about other devices. Often related to E2EE.
A-Performance
Performance, both client-facing and admin-facing
O-Frequent
Affects or can be seen by most users regularly or impacts most users' first experience
S-Minor
Blocks non-critical functionality, workarounds exist.
T-Enhancement
New features, changes in functionality, improvements in performance, or user-facing enhancements.
We see a lot of disk IO on the matrix.org DB go on reading from the
device_lists_changes_in_room
table.I think this is due to the fact that we have a background process that processes each row, and then flips a boolean flag on the row (which is in an index). The causes the row to effectively get deleted/reinserted, meaning that a lot of the recent (ish) rows get shuffled around causing many more pages to have to be loaded from disk to service queries.
My proposal is to do one of:
device_lists_changes_in_room
table even though we may not need to handle them (i.e. we only need to process local device changes).The text was updated successfully, but these errors were encountered: