A static per-torrent peer limit is quite wasteful.
If we're happy to have 100 peers globally, and we have only one active torrent, then that torrent should be able to have 100 peers. Instead, have a global peer limit, a limit of active torrents, and dynamically adjust per-torrent limits, possibly disconnecting peers from busy torrents when new torrents become active.
The same algorithm probably works for incoming and outgoing connections.
A static per-torrent peer limit is quite wasteful.
If we're happy to have 100 peers globally, and we have only one active torrent, then that torrent should be able to have 100 peers. Instead, have a global peer limit, a limit of active torrents, and dynamically adjust per-torrent limits, possibly disconnecting peers from busy torrents when new torrents become active.
The same algorithm probably works for incoming and outgoing connections.