Possible bug when running 1500+ torrents?

Linux specific questions, problems.
gnuhope

Possible bug when running 1500+ torrents?

Post by gnuhope »

I'm currently running Linux Mint 15 "olivia" Cinnamon 64-bit with qBittorrent v3.1.5. I seem to be having a problem at a small number of private trackers. I am running 1500+ torrents and most private trackers have a hit and run rule where you have to seed for X amount of time after you download a torrent. I seed pretty much everything forever or until I want to get rid of the files. Anyways, lately I have been getting one or two torrents at a time  where the site will say that they are not seeding and because of this I am getting a hit and run, even tho I am indeed seeding these torrents. Is there a bug in qBittorrent that doesn't report to the tracker when to many torrents are running? Is there a setting I can change to try to fix things? Does anyone have any insight?
Thank you for your time in advance.
sledgehammer_999
Administrator
Administrator
Posts: 2443
Joined: Sun Jan 23, 2011 1:17 pm

Re: Possible bug when running 1500+ torrents?

Post by sledgehammer_999 »

Did you set the Maximum active uploads in Options->Bittorrent to something big enough or unlimited?
Have you disabled "do not count slow torrents in these limits"?
gnuhope

Re: Possible bug when running 1500+ torrents?

Post by gnuhope »

I have the check mark next to Torrent Queuing unchecked, this should disable torrent Queuing all together and that should make my maximum upload to unlimited am I right?
The torrents that are getting marked as not being seeded by the tracker is being shown as seeding on the client. And it's rather odd because it always the same torrent. Meaning I can download say 10 torrents right now and one of those ten might show up as not seeding (when it is) and if I pause the torrent and restart it a few times and manually(force) announce to the  tracker then it will leave the hit and run list for a few hours and then later on that same torrent will be back on the hit and run list.
sledgehammer_999
Administrator
Administrator
Posts: 2443
Joined: Sun Jan 23, 2011 1:17 pm

Re: Possible bug when running 1500+ torrents?

Post by sledgehammer_999 »

How many torrents are you seeding at specific tracker? The max number. The only relevant thing I could find in the libtorrent API docs is this:
active_tracker_limit is the max number of torrents to announce to their trackers. By default this is 360, which is no more than one announce every 5 seconds.
**a few line below***
You can have more torrents active, even though they are not announced to the DHT, lsd or their tracker. If some peer knows about you for any reason and tries to connect, it will still be accepted, unless the torrent is paused, which means it won't accept any connections.
Which isn't configurable in the gui.
Also are your upload slots set high enough? (configurable in the gui)
gnuhope

Re: Possible bug when running 1500+ torrents?

Post by gnuhope »

To help with questions I'm going to post my qBittorrent.conf file I'm going to remove a few things that I don't feel like sharing tho for privacy reasons. I am having two trackers that I am having a problem with hit and runs. One of them is at or very near the 360 torrent limit but the other tracker is closer to 120. How do I change the active_tracker_limit? Do I just add that line to the end of my .conf limit followed by -1?

Here's my config.

[General]
ported_to_new_savepath_system=true
MainWindowLastDir=/removed
SearchResultsColsWidth=588 100 100 100 1216 0 0

[LegalNotice]
Accepted=true

[Preferences]
ExecutionLog\enabled=false
General\Locale=removed
General\AlternatingRowColors=true
General\SystrayEnabled=true
Advanced\TrayIconStyle=0
General\CloseToTray=true
General\MinimizeToTray=true
General\StartMinimized=false
General\NoSplashScreen=true
General\ExitConfirm=false
General\PreventFromSuspend=false
Downloads\SavePath=/removed
Downloads\TempPathEnabled=false
Downloads\TempPath=/removed
Downloads\AppendLabel=false
Downloads\UseIncompleteExtension=false
Downloads\PreAllocation=false
Downloads\AdditionDialog=true
Downloads\StartInPause=false
Downloads\ScanDirs=@Invalid()
Downloads\DownloadInScanDirs=@Invalid()
Downloads\TorrentExport=
MailNotification\enabled=false
MailNotification\email=
MailNotification\smtp_server=smtp.changeme.com
MailNotification\req_ssl=false
MailNotification\req_auth=false
MailNotification\username=
MailNotification\password=
Downloads\DblClOnTorDl=0
Downloads\DblClOnTorFn=1
Connection\PortRangeMin=48000 range (changed)
Connection\UPnP=false
Connection\GlobalDLLimit=-1
Connection\GlobalUPLimit=886
Bittorrent\uTP=true
Bittorrent\uTP_rate_limiting=false
Advanced\IncludeOverhead=false
Connection\GlobalDLLimitAlt=10
Connection\GlobalUPLimitAlt=10
Scheduler\Enabled=false
Scheduler\start_time=@Variant(\0\0\0\xf\x1\xb7t\0)
Scheduler\end_time=@Variant(\0\0\0\xf\x4J\xa2\0)
Scheduler\days=0
Connection\ProxyType=-1
Connection\Proxy\IP=0.0.0.0
Connection\Proxy\Port=8080
Connection\ProxyPeerConnections=false
Connection\Proxy\Authentication=false
Connection\Proxy\Username=
Connection\Proxy\Password=
Bittorrent\MaxConnecs=-1
Bittorrent\MaxConnecsPerTorrent=-1
Bittorrent\MaxUploadsPerTorrent=-1
Bittorrent\DHT=false
Bittorrent\PeX=false
Bittorrent\sameDHTPortAsBT=true
Bittorrent\DHTPort=6881
Bittorrent\LSD=false
Bittorrent\Encryption=0
Bittorrent\MaxRatio=-1
Bittorrent\MaxRatioAction=0
IPFilter\Enabled=false
Queueing\QueueingEnabled=false
Queueing\MaxActiveDownloads=7
Queueing\MaxActiveUploads=999
Queueing\MaxActiveTorrents=999
Queueing\IgnoreSlowTorrents=true
WebUI\Enabled=false
Downloads\DiskCache=16
Advanced\OutgoingPortsMin=0
Advanced\OutgoingPortsMax=0
Advanced\IgnoreLimitsLAN=true
Advanced\RecheckOnCompletion=false
General\RefreshInterval=1500
Connection\ResolvePeerCountries=true
Connection\ResolvePeerHostNames=false
Connection\MaxHalfOpenConnec=50
Advanced\SuperSeeding=false
Connection\Interface=
Connection\InetAddress=
General\ProgramNotification=true
Advanced\trackerEnabled=false
Advanced\trackerPort=9000
Advanced\useSystemIconTheme=true
Advanced\confirmTorrentDeletion=true
Advanced\LtTrackerExchange=false
Advanced\AnnounceToAllTrackers=true
State\size=@Size(1201 660)
State\pos=@Point(569 367)
State\hSplitterSizes=199, 974
Downloads\NewAdditionDialog=true
Downloads\NewAdditionDialogFront=true
Downloads\TorrentExportDir=
Downloads\FinishedTorrentExportDir=
General\UseRandomPort=false
Bittorrent\uTP_rate_limited=true
Bittorrent\MaxUploads=-1
Advanced\AnonymousMode=false
Downloads\DiskWriteCacheSize=0
Downloads\DiskWriteCacheTTL=60
Connection\InterfaceName=

[AutoRun]
enabled=false
program=

[CreateTorrent]
dimensions=removed
TrackerList=removed
last_save_path=/removed
IgnoreRatio=false

[TorrentAdditionDlg]
save_path_history=removed
geometryFull=removed
ContentHeaderState=removed
geometryShort=removed

[MainWindow]
geometry=removed
vsplitterState=removed

[TorrentProperties]
Visible=true
SplitterSizes="356,652"
FilesListState=removed
CurrentTab=1
Trackers\TrackerListState=removed
Peers\PeerListState=removed

[TransferList]
HeaderState=removed

[Search]
searchHistory=removed

[TransferListFilters]
selectedFilterIndex=3
customLabels=removed

[Locking]
password=removed
locked=removed

[AddNewTorrentDialog]
treeHeaderState=removed
y=173
width=800
expanded=true
gnuhope

Re: Possible bug when running 1500+ torrents?

Post by gnuhope »

So after doing some more research I'm pretty sure that the "active_tracker_limit" option is my problem. I have found some other people with the same problem as me, having hit and runs and such and when they pause some of their older torrents that no longer have hit and run rules applied to them then their newer torrents that do have hit and run rules start to report properly to the tracker. I believe that the newest version of Libtorrent changes the default to 1600 instead but I am running more torrents then that. All of this being said does anyone know how I can change this limit? I have been searching this for the last two days or so. I believe some versions of Libtorrent creates a usr/include/libtorrent/session_settings.hpp settings file where this option can be changed manually but right now Qbittorrent uses the "libtorrent-rasterbar7" package in linux and this package only creates the following files:
/usr/lib/libtorrent-rasterbar.so.7
/usr/lib/libtorrent-rasterbar.so.7.0.0
/usr/share/doc/libtorrent-rasterbar7/AUTHORS
/usr/share/doc/libtorrent-rasterbar7/README.Debian
/usr/share/doc/libtorrent-rasterbar7/changelog.Debian.gz
/usr/share/doc/libtorrent-rasterbar7/copyright
So nothing here appears to be a place where I can change settings.
Please anyone help if you can. Thank you for your time.
sledgehammer_999
Administrator
Administrator
Posts: 2443
Joined: Sun Jan 23, 2011 1:17 pm

Re: Possible bug when running 1500+ torrents?

Post by sledgehammer_999 »

Long story short: There isn't a way to configure this via a config file. We don't expose this setting. If you can build qbt locally then I can provide a 2-line patch to test.
NOTE: The build should be easy enough. Just download the debian source package, apply the patch and then invoke the debian tools to build a .deb package out of it.
gnuhope

Re: Possible bug when running 1500+ torrents?

Post by gnuhope »

I really want to do this but I'm afraid I'm going to need something close to step by step instructions. If you would be willing then you would save my day, because with out something like this I'm going to have to switch torrent clients and I'm going to have to reload all 1600+ torrents by hand. I just want this setting to be unlimmited. So if you could give me instructions you would be a life safer. Pretty Please?
gnuhope

Re: Possible bug when running 1500+ torrents?

Post by gnuhope »

Looks like I'm going to have to load 1600 torrents into RuTorrent. Not something I want to do at all but I'm at a stand still here.
sledgehammer_999
Administrator
Administrator
Posts: 2443
Joined: Sun Jan 23, 2011 1:17 pm

Re: Possible bug when running 1500+ torrents?

Post by sledgehammer_999 »

I forgot about this.... I really want to help you.
In a couple of hours I'll be back to my linux machine. I'll try to document a way of patching qbittorrent yourself. (I hope I'll not forget).
sledgehammer_999
Administrator
Administrator
Posts: 2443
Joined: Sun Jan 23, 2011 1:17 pm

Re: Possible bug when running 1500+ torrents?

Post by sledgehammer_999 »

1. Make sure you have enabled the src repos. Open Synaptic. Settins->Repositories->Debian Software->Source code. Then hit the reload button.
2. Then create a folder named qbt-source in your home dir
3. Open a terminal
4. cd ~/qbt-source
5. apt-get source qbittorrent
6. sudo apt-get build-dep qbittorrent
7. cd qbittorrent-3.1.8 (or whaterver the auto-created folder it is named)
8. Open src/qtlibtorrent/qbtsession.cpp in an editor. Locate these strings:

Code: Select all

else
    sessionSettings.mixed_mode_algorithm = session_settings::peer_proportional;
  sessionSettings.connection_speed = 20; //default is 10
#endif
  qDebug() << "Settings SessionSettings";
  setSessionSettings(sessionSettings);
Change to look like this:

Code: Select all

else
    sessionSettings.mixed_mode_algorithm = session_settings::peer_proportional;
  sessionSettings.connection_speed = 20; //default is 10
#endif
  qDebug() << "Settings SessionSettings";
  sessionSettings.active_tracker_limit = 1000000;
  setSessionSettings(sessionSettings);
These lines are at ~496 line number.
Save the file.
9. Optional: You might want to delete the qbittorrent-nox rules/package from debian/rules and debian/control. This will speed up a little the compilation process. If you don't know what to do then leave them as they are. You'll just have to wait a bit longer.
10. dpkg-buildpackage -us -uc -nc

Now you should have .deb packages inside qbt-source install the appropriate one and test qbittorrent if the problem was fixed.

NOTE: The instructions are based on Debian sid but should work with Mint since it is debian-based.
sledgehammer_999
Administrator
Administrator
Posts: 2443
Joined: Sun Jan 23, 2011 1:17 pm

Re: Possible bug when running 1500+ torrents?

Post by sledgehammer_999 »

You can do dpkg-buildpackage -us -uc -nc -jN where N is your cores/processors.
gnuhope

Re: Possible bug when running 1500+ torrents?

Post by gnuhope »

Thank you very much for taking the time to do this. This helps me a lot.
So if I have a eight core cpu then I should change the line to "dpkg-buildpackage -us -uc -nc -j8", am I reading this correctly?
Thank you very much once again.
sledgehammer_999
Administrator
Administrator
Posts: 2443
Joined: Sun Jan 23, 2011 1:17 pm

Re: Possible bug when running 1500+ torrents?

Post by sledgehammer_999 »

Yes. If your ram isn't big enough you should consider 6 or 5.
eg on my dualcore system with 1.5GB RAM after a while it started using the swap file and everything crawled. (swapiness is set to 10%)
But the same machine on Windows XP builds fine. I use xfce on debian. It's weird why this happens...

(don't ask me what ram is big enough for you. I have no idea).
gnuhope

Re: Possible bug when running 1500+ torrents?

Post by gnuhope »

I have 32 gigs of ram on this box so I'm sure it's good. A older version of qBittorrent I used to run used to take forever to boot with this many torrents but once it was loaded it was really snappy and the newer versions boots way faster but is not as snappy. Maybe the "-j8" line will help with that.
I'm going to give this a run and then I'll add some more torrents so see if the problem is gone and then I'll report back here. That way if someone else is researching the same problem and they find this page they will have that information.
Post Reply