Error Triage Hub (9)
Postgres state_groups_state Table Disk & IOPS Bloat
Uncompressed state_groups_state rows duplicate room membership snapshots on every state transition, inflating Postgres tables to 20-90 GB.
Table Share: 65-82% of Postgres DB | Fix: rust-synapse-compress-state
How Unlinked State Groups Multiply Postgres Disk Footprint
Matrix tracks room state at every event via state_groups and state_groups_state. Without periodic tree compression, Synapse appends repetitive state snapshots across hundreds of federated rooms, consuming 70% or more of total NVMe capacity and thrashing Postgres shared_buffers.
Measuring Table Size via pg_total_relation_size
Run SELECT pg_size_pretty(pg_total_relation_size('state_groups_state')) inside psql to confirm bloat. When a 50-user server crosses 15 GB in state_groups_state alone, running rust-synapse-compress-state and purging stale remote rooms recovers 60-80% of disk space.
Measured Thresholds & Configuration
| Joined Federated Rooms | Uncompressed 12m DB Size | Post-Compression Size |
|---|---|---|
| 20 Rooms (Small Team) | 3.2 - 6.5 GB | 0.9 - 1.8 GB |
| 100 Rooms (Active Tech) | 18 - 42 GB | 4.5 - 11 GB |
| 250+ Rooms (Open Server) | 55 - 130 GB | 14 - 32 GB |