qstokkink / TriblerExperimental

GNU General Public License v3.0
6 stars 2 forks source link

Swarm health is often heavily underestimated #79

Closed egbertbouman closed 4 weeks ago

egbertbouman commented 1 month ago

There are a number problems with our swarm-based health checks:

  1. We're only considering the connected number of seeders/leechers while getting the metainfo from a swarm. These numbers are obviously much lower than those for the complete swarm. Libtorrent has statistics for both, we're just picking the wrong ones.
  2. We're getting the seeders/leechers directly after getting the metainfo. If you request these twice in a row, there is often already a significant increase in the numbers. Given that a few ms already makes a difference, it's best to request the counts just before removing the download.
  3. When we join the swarm to estimate its size, the results are discarded. We're not storing them in the database nor are we sending events to the GUI. Tracker checks are processed correctly.