Open ckcr4lyf opened 1 year ago
From cleaning all torrents:
Total -> 160/460 = ~38%!!!
On first (seeder) cleanup, I killed metrics so there is a gap. But the leecher clean shows no noticeable change in announce per min, latency during the cleaning
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)
Current cleanup has a 0.1% chance per announce: https://github.com/ckcr4lyf/kiryuu/blob/9d45a1187962f20351410cb9bb81c08be76106ef/src/main.rs#L171-L176
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)