Skip to content
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

Question: Upper limit to number of tracked files? #235

Closed
wezell opened this issue Jan 5, 2019 · 3 comments
Closed

Question: Upper limit to number of tracked files? #235

wezell opened this issue Jan 5, 2019 · 3 comments

Comments

@wezell
Copy link

wezell commented Jan 5, 2019

I've been playing with the ttorrent code and as wondering the applicability to serve/share large numbers of files. Specifically, the tracker/seeder code - is there an upper limit to the number of files that it could both seed and track? I haven't dug into the code but was it designed with the intent to track large amounts of files, by which I am talking 1m files or more? Or was it not designed with targets like that in mind?

@Dead-off
Copy link
Collaborator

Dead-off commented Jan 5, 2019

memory/perfomance usage on tracker side must be low. So i think tracker can track 1m files.

about seeder-side:
In 1.5 version (v1,6 branch in repo) seeding many files is not possible. There was many problems, for example:

  1. seeding one torrent holds .torrent file in memory. So it can spend about 20kb memory for each torrent always (even if nobody downloads the torrent)
  2. library binds separate server socket for each torrent (java.io.IOException: No available port for the BitTorrent client! #132)
  3. Also library creates instance of java.lang.Thread for each torrent

So in 2.0 version many of these problems were fixed. Torrents will be lazy-inited. So seeding of one file takes about 400 bytes (if nobody currently downloads the torrent). Also all incoming connections are listened on one port. In case when many peers download from the seeder different files i think bottleneck is networking.
Finally we didn't test 1m files but our internal server seeds 10k files without performance problems. Also same server tracks these 10k torrents

@Dead-off
Copy link
Collaborator

Dead-off commented Jan 5, 2019

if you don't have more questions you can close issue:)

@wezell
Copy link
Author

wezell commented Jan 6, 2019

Thanks for the quick and complete reply! Looks like there are a lot of nice improvements coming in 2.0.

@wezell wezell closed this as completed Jan 6, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants