bug: Sliding sync traffic is unholy when a list range shrinks and grows #2220
Labels
No labels
Abandoned
Blocked
Bug
Changelog
Added
Changelog
Missing
Changelog
None
Cherry-picking
Database
Dependencies
Dependencies/Renovate
Difficulty
Easy
Difficulty
Hard
Difficulty
Medium
Documentation
Enhancement
Good first issue
Help wanted
Inherited
Matrix/Administration
Matrix/Appservices
Matrix/Auth
Matrix/Client
Matrix/Core
Matrix/E2EE
Matrix/Federation
Matrix/Hydra
Matrix/MSC
Matrix/Media
Matrix/T&S
Merge
Merge/Manual
Merge/Squash
Meta
Meta/CI
Meta/Packaging
Priority
Blocking
Priority
High
Priority
Low
Security
Status
Confirmed
Status
Duplicate
Status
Invalid
Status
Needs Investigation
Support
bob the builder
No milestone
No project
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set.
Reference
continuwuation/continuwuity#2220
Loading…
Add table
Add a link
Reference in a new issue
No description provided.
Delete branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
What is the bug?
Yesterday i found out, my Element X on Android is responsible for ~30gb+ of traffic per month which is WAY to much.
The SDK debug logs (of 50 min, 47 pushes) show the room-list connection receiving 210 MB in 333 responses, 37 of them 1-11 MB, while
posstays continuous the whole time. After every push the server sends almost every joined room again withinitial: true, fullrequired_stateand timeline.On every sync restart the SDK first requests the list with range
[0, 19], then grows it to[0, 99]on the same connection. Continuwuity resets the stored position of every room outside the current ranges to 0 and treats them as never sent.Its expected when a range grows, only rooms not sent before or with updates since are returned. The stored position should be kept (per connection!). This behaviour is explained in the MSC itself as a Common pattern: https://github.com/matrix-org/matrix-spec-proposals/blob/erikj/sss/proposals/4186-simplified-sliding-sync.md#paginating-room-list
Here is some data from the debug logs - look at the sync restarts and the room-list response size:
By endpoint:
POST /sync[200]POST /sync[200]POST /v3/keys/query[200]GET /v1/media/download/matrix.org/iJluFBsmAZTbyJjxXZjGtxeZ[200]POST /sync[200]GET /v1/auth_metadata[200]Steps to reproduce
Server name and version
v26.8.1
Additional context
This is the first and biggest issue i found while digging the Element X debug logs. There will probably be more. Element X and Continuwuity are responsible for eating a big chunk of my mobile data traffic :c