-
Notifications
You must be signed in to change notification settings - Fork 3
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Improve cleanup #15
Comments
Cleanup is added to kouko, would be better if it can be within kiryuu (kouko is in TS/JS so even SCAN + loops are heavy on CPU) |
We've added some cleanup to kiryuu in the postgres branch: Lines 47 to 48 in 88388cf
However, this does not delete old peers from active torrents! E.g., running postgres version on
But if we get the members, then we see there are some that last announced 10 days ago!
If we ZCOUNT all vs. last 30 min:
~97.6% space is wasted!
In this particular example it turns out to be ~827kB wasted. |
Current cleanup has a 0.1% chance per announce:
kiryuu/src/main.rs
Lines 171 to 176 in 9d45a11
This affects non popular torrents where the swarm dies of, e.g. in this one, the total (including stale) count in redis is 345, whereas the active (last 30 min) is just 8!
This introduces additional CPU strain per 8 announces per 30 min, vs. a more regular cleanup might be better (for less popular torrents)
The text was updated successfully, but these errors were encountered: