Is there a minimum seed ratio or seed time?

307 views
Skip to first unread message

John Michaels

unread,
Aug 25, 2015, 1:53:55 AM8/25/15
to Hadouken BitTorrent client
Hello! New Hadouken convert here. Neither the seedTime nor seedRatio options seem to be working for me on v5.2.0. I'm running it on 64-bit Windows 10. To test it, I started a few fairly small downloads (<10MB) and waited, with a seed ratio of 0.1 and seed time of 120 [seconds]. I let the torrents seed for a few hours, but none ever stopped seeding. Here is the bittorrent section of my hadouken.json file:

  "bittorrent": {
    "defaultSavePath": "C:/Users/John/Downloads/Torrents/Hadouken/Incomplete",
    "statePath": "C:/ProgramData/Hadouken//state/",
    "geoIpFile": "C:/Data/GeoIP.dat",
    "anonymousMode": false,
    "defaultOptions": {
      "seedRatio": 0.1,
      "seedTime": 120,
      "seedAction": "remove"
    },
    "dht": {
      "enabled": true,
      "routers": [
        [
          "router.bittorrent.com",
          6881
        ],
        [
          "router.utorrent.com",
          6881
        ],
        [
          "dht.transmissionbt.com",
          6881
        ],
        [
          "dht.aelitis.com",
          6881
        ]
      ]
    },
    "proxy": {
      "type": "none",
      "hostname": "",
      "port": 0,
      "username": "",
      "password": "",
      "proxyHostnames": true,
      "proxyPeerConnections": true
    },
    "storage": {
      "sparse": false
    },
    "upnp": {
      "enabled": true
    },
    "utp": {
      "enabled": true
    },
    "uploadRateLimit": 0
  },
I have tried different values for both options, as well as using "pause" instead of "remove" with no effect. Any ideas? Have I overlooked something? Thanks,

John

Robert Ars

unread,
Aug 27, 2015, 3:34:28 PM8/27/15
to Hadouken BitTorrent client
i've looked into the documentation and from what i can find it should be something like:

{
  "bittorrent":
  {
    "defaultOptions":
    {
      "seedRatio": 2.0,
      "seedTime": 18000,
      "seedAction": "pause"
    }
  } 
} 

this pauses the torrent when a seed ratio has been met of 200% or 5 hours (18.000 seconds) (direct copy from documentation) 

i don't know what sort of ratio you like but for me when i want to pause the torrent as soon as the download is finished (my prefered setup because i love to manually set them to seed during the night so i have my bandwith available to myself during the day):

{
  "bittorrent":
  {
    "defaultOptions":
    {
      "seedRatio": 0,
      "seedTime": 0,
      "seedAction": "pause"
    }
  }
}

Viktor Elofsson

unread,
Aug 28, 2015, 2:07:39 AM8/28/15
to Hadouken BitTorrent client
Does the log file tell you anything? Also, the default options are only applied to new torrents.

John Michaels

unread,
Aug 28, 2015, 2:52:50 AM8/28/15
to Hadouken BitTorrent client
I've tried several new torrents, all of which seed indefinitely. I just tried setting it to a seed time of 0 and seed ratio of 0, but it still seeds indefinitely. The log file doesn't show anything of use, the only mentions of the torrent I just added and finished downloading are as follows:

(0000000f) 23:41:19.481103: <info> Saved torrent file for 'FOOL'S GOLD _DAY OFF FIRE_' to C:/ProgramData\Hadouken\state\torrents\18a750f31a2c22194919a5447f67e21ad5929978.torrent
(00000010) 23:41:19.481103: <debug> Torrent '18a750f31a2c22194919a5447f67e21ad5929978' hash checked.


I have uninstalled and cleared out all the Hadouken folders in Program Files and ProgramData and reinstalled a few times now with reboots inbetween...but that hasn't helped. I have also tried both torrent files and magnet links. It does the same for both. The ETA is listed as "infinity" after the download has completed. Is there a way to enable verbose logging?

Dan Rayner

unread,
Sep 17, 2015, 11:36:01 PM9/17/15
to Hadouken BitTorrent client
I have the same issue myself, using 5.2
No matter what settings I place in the file, it doesn't obey them

I have tried a seedtime 1 incase it doesnt understand 0's. I have also tried removing seedratio and vice versa in case they were clashing.
Tried adding in different torrents after the setting was applied. 

Kyle Sabo

unread,
Sep 24, 2015, 4:21:17 AM9/24/15
to Hadouken BitTorrent client
I believe there is a bug in the code causing this issue:

When adding a torrent, the defaultOptions are read and stored in the metadata for the torrent being created if they exist. If they do not exist, the per-torrent metadata contains the defaults.

        // Add any default options to the metadata
        var defaultOptions = config.get("bittorrent.defaultOptions") || {};

        var options = {
            seedRatio: (defaultOptions["seedRatio"] || 2.0),
            seedTime: (defaultOptions["seedTime"] || 0),
            seedAction: (defaultOptions["seedAction"] || "pause")
        };

When a torrent state is changed, these values are read from the per-torrent metadata, if and only if a"seedOverride" option is also set. If it is not set, the default values are used. I believe there is no way to actually set this option however. This means the default values are always used regardless of what is specified in the config file.

        var options = torrent.metadata("options") || {};

        var goalRatio = options.seedOverride ? (options.seedRatio || 2.0) : 2.0;
        var goalTime  = options.seedOverride ? (options.goalTime  ||   0) :   0;

I'm not sure I understand what the point of this seedOverride option is. Since the defaults are already copied into the per-torrent metadata any changes would just overwrite those stored values and no extra bool is needed. This variable only seems to make sense if the plan for the future involves not copying the defaults into the per-torrent metadata and instead allowing config file changes to apply retroactively to already-added torrents if this value is not specified. But in that case the mere existence of a seedRatio or goalTime in the metadata could also serve as such a flag that the default is being overridden.

I've changed the code to remove this check for seedOverride, and now my torrents will seed past 2.0. I can create a bug in the issue tracker and send a pull request if desired, but the code change is so simple it might be easier for Viktor to just recreate it.
Reply all
Reply to author
Forward
0 new messages