-
Notifications
You must be signed in to change notification settings - Fork 18
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
64 MiB piece size suggestion #8
Comments
Thank you for reaching out. I'll definitely lower the maximum piece size.
What do you suggest? 32 MiB?
|
In the end I didn't manage to establish what the maximum commonly supported piece size is, but I started to limit it to 4 MiB and so far received no complaints. That might be a bit too extreme, though. |
https://wiki.theory.org/index.php/BitTorrentSpecification says:
After reading these guidelines, I think I might decrease it even further down to 1 MiB. But yeah that article is just a recommendation, whereas my original report was about software that downright refuses to download the torrents of certain sizes. Unfortunately I cannot comment precisely on what is safe and what is not. |
OK, I rewrote how piece size is calculated. It is now maxed out at 16 MiB for
torrents of 80 GiB or larger. A piece size of 8 MiB means 10k pieces if the
torrent is 80 GiB.
AFAIK, having too many pieces has drawbacks besides larger torrent files, e.g.
communicating with peers and trackers needs more bandwidth and hardware
resources.
But I also made it easier to implement your own piece size calculating algorithm
if you really need it.
Does that resolve the issue for you?
|
Yes, thank you, definitely, I was good even before with the manual override of piece size exceeding 4 MiB in my scripts. I only wanted to bring to your attention that there were users who would have troubles with torrents created by the prior implementation. Closing the issue :) |
It appears that for large torrents, 64 MiB is the maximum piece size that can be chosen.
While I realize this can be overridden by hand, I'd suggest to lower this bound by default, as uTorrent, one of the most popular clients, seems to be unable to handle such large piece sizes. Naturally, that's their problem and not this library's, but in the end it's the users (the ones who download the torrent) who are hurt the most and I discovered it the hard way ^^
The text was updated successfully, but these errors were encountered: