This is the reference guide for the advanced-client-settings.xml file that comes with Koinonein BitTorrent Client.
advanced-client-settings.xml is read at launch and rewritten periodically meaning changes should be applied when Koinonein BitTorrent Client is not running.
advanced-client-settings.xml exposes all Libtorrent settings to Koinonein BitTorrent Client.
Koinonein BitTorrent Client is designed to be simple and easy to use however with the use of the settings in this file you can control all aspects of Koinonein BitTorrent Client.
On Windows advanced-client-settings.xml is located in the AppData folder:
C:\Users\Username\AppData\Local\Koinonein BitTorrent Client x86
C:\Users\Username\AppData\Local\Koinonein BitTorrent Client x64
C:\Users\[User]\AppData\Local\Koinonein BitTorrent Client [x64][x86]\Log\koinonein_session.log
C:\Users\[User]\AppData\Local\Koinonein BitTorrent Client [x64][x86]\Log\koinonein_dht.log
C:\Users\[User]\AppData\Local\Koinonein BitTorrent Client [x64][x86]\Log\koinonein_torrent.log
C:\Users\[User]\AppData\Local\Koinonein BitTorrent Client [x64][x86]\Log\koinonein_peer.log
- 0: Direct2D.
- 1: GDI+.
- 2: Direct2D WARP.
- 1: You select your own port and this will be used each time Koinonein starts.
- 2: The operating system will pick an available free port each time Koinonein starts.
- 3: A random port will be selected each time Koinonein starts.
- 0: The default and will not send out suggest messages.
- 1: Will send out suggest messages for the most recent pieces that are in the read cache.
- 0: Fixed slots choker is the traditional choker with a fixed number of unchoke slots as specified by maximum uploads.
- 2: Rate based choker opens up unchoke slots based on the upload rate achieved to peers. The more slots that are opened the marginal upload rate required to open up another slot increases.
- 3: Bittyrant choker attempts to optimize download rate by finding the reciprocation rate of each peer individually and prefers peers that gives the highest return on investment. It still allocates all upload capacity but shuffles it around to the best peers first. For this choker to be efficient you need to set a global upload rate limit.
- 0: Round Robin which round-robins the peers that are unchoked when seeding. This distributes the upload bandwidth uniformly and fairly. It minimizes the ability for a peer to download everything without redistributing it.
- 1: Fastest upload unchokes the peers we can send to the fastest. This might be a bit more reliable in utilizing all available capacity.
- 2: Anti leech prioritizes peers who have just started or are just about to finish the download. The intention is to force peers in the middle of the download to trade with each other.
Delay=5 + 5 * x / 100 * fails^2
This setting may be useful to make Koinonein more or less aggressive in hitting trackers.
- 1: It prevents “zero copy” disk buffers being sent to peers, since each peer needs to mutate the data (i.e. encrypt it) the data must be copied per peer connection rather than sending the same buffer to multiple peers.
- 2: The encryption itself requires more CPU than plain bittorrent protocol. The highest cost is the Diffie Hellman exchange on connection setup.
- 3: The encryption handshake adds several round-trips to the connection setup, and delays transferring data.
- 1: Use only plaintext encryption.
- 2: Use only rc4 encryption.
- 3: Allow both.
- 0: No proxy server is used, all other fields are ignored.
- 1: The server is assumed to be a SOCKS4 server that requires a username.
- 2: The server is assumed to be a SOCKS5 server (RFC 1928) that does not require any authentication. The username and password are ignored.
- 3: The server is assumed to be a SOCKS5 server that supports plain text username and password authentication (RFC 1929). The username and password specified may be sent to the proxy if it requires.
- 4: The server is assumed to be an HTTP proxy. If the transport used for the connection is non-HTTP the server is assumed to support the CONNECT method. i.e. for web seeds and HTTP trackers a plain proxy will suffice. The proxy is assumed to not require authorization. The username and password will not be used.
- 5: The server is assumed to be an HTTP proxy that requires user authorization. The username and password will be sent to the proxy.
- 6: Route through a i2p SAM proxy
DHT INT Settings
DHT BOOL Settings
If true only torrents that are currently active will be updated, if you are seeding lots of torrents this will save a lot of CPU usage.
If true files will be preallocated, this is the global setting and can be overridden on a per torrent basis.
If true the systems sleep settings will be respected.
Respects BEP53 magnet links.
Enables debug logging for the session, log is saved to C:\Users\[User]\AppData\Local\Koinonein BitTorrent Client [x64][x86]\Log\koinonein_session.log
Enables debug logging for DHT, log is saved to C:\Users\[User]\AppData\Local\Koinonein BitTorrent Client [x64][x86]\Log\koinonein_dht.log
Enables debug logging for torrents, log is saved to C:\Users\[User]\AppData\Local\Koinonein BitTorrent Client [x64][x86]\Log\koinonein_torrent.log
Enables debug logging for peer connections, log is saved to C:\Users\[User]\AppData\Local\Koinonein BitTorrent Client [x64][x86]\Log\koinonein_peer.log
Deletes any existing logs when Koinonein starts. Logging is fast and won’t use a lot of CPU but the log files can become very large.
Turns the torrent Auto Management system on or off.
If set to true Koinonein will add trackers from duplicate torrents to the existing torrent.
If set to true Koinonein will only use the network adapters selected in Settings > Client Options > Network Adapters.
Pausing the session has the same effect as pausing every torrent in it except that torrents will not be resumed by the auto-manage mechanism. Resuming will restore the torrents to their previous paused state. i.e. the session pause state is separate from the torrent pause state. A torrent is inactive if it is paused or if the session is paused.
Enables the dht node and makes the trackerless service available to torrents.
Enables the UPnP service. When started, the listen port and the DHT port are attempted to be forwarded on local UPnP router devices.
Enables the NAT-PMP service. When started, the listen port and the DHT port are attempted to be forwarded on the router through NAT-PMP.
Enables Local Service Discovery. This service will broadcast the infohashes of all the non-private torrents on the local network to look for peers on the same swarm within multicast reach.
Determines if connections from the same IP address as existing connections should be rejected or not. Multiple connections from the same IP address is not allowed by default, to prevent abusive behaviour by peers. It may be useful to allow such connections in cases where simulations are run on the same machine, and all peers in a swarm has the same IP address.
Indicates whether or not the UPnP implementation should ignore any broadcast response from a device whose address is not the configured router for this machine. i.e. it’s a way to not talk to other people’s routers by mistake.
Specifies if parole mode should be used. Parole mode means that peers that participate in pieces that fail the hash check are put in a mode where they are only allowed to download whole pieces. If the whole piece a peer in parole mode fails the hash check, it is banned. If a peer participates in a piece that passes the hash check, it is taken out of parole mode.
Enable and disable caching of blocks read from disk. The purpose of the read cache is partly read-ahead of requests but also to avoid reading blocks back from the disk multiple times for popular pieces.
Allocate separate, contiguous, buffers for read calls. Only used where readv cannot be used will use more RAM but may improve performance.
Allocate separate, contiguous, buffers for write calls. Only used where writev cannot be used will use more RAM but may improve performance
Prefer seeding torrents when determining which torrents to give active slots to, the default is false which gives preference to downloading torrents.
Specifies whether Koinonein should close connections where both ends have no utility in keeping the connection open, for instance if both ends have completed their downloads there’s no point in keeping it open.
Specifies whether Koinonein should close connections where both ends have no utility in keeping the connection open, for instance if both ends have completed their downloads there’s no point in keeping it open.
If set to true the estimated TCP/IP overhead is drained from the rate limiters,to avoid exceeding the limits with the total traffic.
Controls how multi tracker torrents are treated. If this is set to true all trackers in the same tier are announced to in parallel. If all trackers in tier 0 fails, all trackers in tier 1 are announced as well. If it’s set to false the behaviour is as defined by the multi tracker specification. It defaults to false.
Controls how multi tracker torrents are treated. When this is set to true one tracker from each tier is announced to. This is uTorrent behaviour. This is false by default in order to comply with the multi-tracker specification.
When true it means that trackers may be rearranged in a way that udp trackers are always tried before http trackers for the same hostname. Setting this to false means that the trackers tier is respected and there is no preference of one protocol over another.
When this is set to true a piece has to have been forwarded to a third peer before another one is handed out. This is the traditional definition of super seeding.
When set to true all data downloaded from peers will be assumed to be correct and will not be tested to match the hashes in the torrent.
If this is true i2p torrents are allowed to also get peers from other sources than the tracker and connect to regular IP’s not providing any anonymization. This may be useful if the user is not interested in the anonymization of i2p, but still wants to be able to connect to i2p peers.
If this is set to true read cache blocks that are hit by peer read requests are removed from the disk cache to free up more space. This is useful if you don’t expect the disk cache to create any cache hits from other peers than the one who triggered the cache line to be read into the cache in the first place.
Linux only option. Passes in the O_NOATIME to open() when opening files. This may lead to some disk performance improvements.
If a torrent has been paused by the auto managed feature for example, the torrent is paused and auto managed, this feature affects whether or not it is automatically started on an incoming connection. The main reason to queue torrents, is not to make them unavailable, but to save on the overhead of announcing to the trackers the DHT and to avoid spreading one’s unchoke slots too thin. If a peer managed to find us even though we’re no in the torrent any more this setting can make us start the torrent and serve it.
When set to true the downloaded counter sent to trackers will include the actual number of payload bytes downloaded including redundant bytes. If set to false it will not include any redundancy bytes.
Controls when a block may be requested twice. If this is true a block may only be requested twice when there’s at least one request to every piece that’s left to download in the torrent. This may slow down progress on some pieces sometimes but it may also avoid downloading a lot of redundant bytes. If this is false Koinonein attempts to use each peer connection to its max by always requesting something even if it means requesting something that has been requested from another peer already.
If set to true the local peer discovery, or Local Service Discovery, will not only use IP multicast but also broadcast it’s messages. This can be useful when running on networks that don’t support multicast. Since broadcast messages might be expensive and disruptive on networks, only every 8’th announce uses broadcast.
When set to true Koinonein will try to make outgoing utp connections controls whether Koinonein will accept incoming connections or make outgoing connections of specific type.
When set to true Koinonein will try to make incoming utp connections controls whether Koinonein will accept outgoing connections or make outgoing connections of specific type.
When set to true Koinonein will try to make outgoing tcp connections controls whether Koinonein will accept incoming connections or make outgoing connections of specific type.
When set to true Koinonein will try to make incoming tcp connections controls whether Koinonein will accept outgoing connections or make outgoing connections of specific type.
Determines if the storage should check the whole files when resume data is incomplete or missing or whether it should simply assume we don’t have any of the data. By default this is determined by the existence of any of the files. By setting this setting to true the files won’t be checked but will go straight to download mode.
When set to true the Koinonein tries to hide it’s identity to a certain degree. The peer-ID will no longer include the client’s fingerprint and the user-agent will be reset to an empty string. Trackers will only be used if they are using a proxy server. The listen sockets are closed and incoming connections will only be accepted through a SOCKS5 or I2P proxy (if a peer proxy is set up and is run on the same machine as the tracker proxy). Since no incoming connections are accepted NAT-PMP, UPnP, DHT and local peer discovery are all turned off when this setting is enabled.
Disables any communication that’s not going over a proxy. Enabling this requires a proxy to be configured as well. The listen sockets are closed and incoming connections will only be accepted through a SOCKS5 or I2P proxy (if a peer proxy is set up and is run on the same machine as the tracker proxy).
Specifies whether downloads from web seeds are reported to the tracker or not. Turning it off also excludes web seed traffic from other statistics and download rate reporting.
Determines if seeding and finished torrents should attempt to make outgoing connections or not. It may be set to false in very specific applications where the cost of making outgoing connections is high, and there are no or small benefits of doing so. For instance, if no nodes are behind a firewall or a NAT seeds don’t need to make outgoing connections.
When this is true Koinonein will not attempt to make outgoing connections to peers whose port is 1024. This is a safety precaution to avoid being part of a DDoS attack.
When true the number of connection attempts per second may be limited to below the connection_speed in case we’re close to bump up against the limit of number of connections. The intention of this setting is to more evenly distribute our connection attempts over time instead of attempting to connect in batches and timing them out in batches.
Always send user-agent in every web seed request. If false only the first request per http connection will include the user agent.
Determines whether the IP filter applies to trackers as well as peers. If this is set to false trackers are exempt from the IP filter (if there is one). If no IP filter is set this setting is irrelevant.
When true web seeds sending bad data will be banned.
If this is false don’t advertise support for the Tribler merkle tree piece message.
If this is true,the number of redundant bytes is sent to the tracker.
When true this will make the disk cache never flush a write piece if it would cause is to have to re-read it once we want to calculate the piece hash.
If this is true Koinonein will fall back to listening on a port chosen by the operating system (i.e. binding to port 0). If a failure is preferred set this to false.
When this is true and incoming encrypted connections are enabled supportcrypt=1 is included in http tracker announces.
If the allowed encryption level is both setting this to true will prefer rc4 if both methods are offered, plaintext otherwise.
If true hostname lookups are done via the configured proxy (if any). This is only supported by SOCKS5 and HTTP.
If true peer connections are made and accepted over the configured proxy, if any. Web seeds as well as regular bittorrent peer connections are considered “peer connections”. Anything transporting actual torrent payload (trackers and DHT traffic are not considered peer connections).
If this setting is true torrents with a very high availability of pieces and seeds are downloaded sequentially. This is more efficient for the disk I/O. With many seeds the download order is unlikely to matter anyway.
If true tracker connections are made over the configured proxy, if any.
Determines what graphics option will be used.
2: Direct2D WARP.
Interval in seconds to close files as to trigger the operating system flushing disk cache.
The number of seconds before the internal host name resolver considers a cache value timed out, negative values are interpreted as zero.
The maximum number of web seeds to have connected per torrent at any given time.
The maximum request range of an url seed in bytes. This value defines the largest possible sequential web seed request. Lower values are possible but will be ignored if they are lower then piece size. This value should be related to your download speed to prevent Koinonein from creating too many expensive http requests per second. You can select a value as high as you want but keep in mind that Koinonein can’t create parallel requests if the first request did already select the whole file. If you combine bittorrent seeds with web seeds and pick strategies like rarest first you may find your web seed requests split into smaller parts because we don’t download already picked pieces twice.
The time to wait until a new retry of a web seed name lookup.
The method by which the listen interface port is selected. Options are:
1: You select your own port and this will be used each time Koinonein starts.
2: The operating system will pick an available free port each time Koinonein starts.
3: A random port will be selected each time Koinonein starts.
The last port used or the selected port if port_type=1.
The last SSL port used or the selected SSL port if port_type=1.
Is the number of seconds the tracker connection will wait from when it sent the request until it considers the tracker to have timed-out.
Is the number of seconds to wait to receive any data from the tracker. If no data is received for this number of seconds the tracker will be considered as having timed out. If a tracker is down this is the kind of timeout that will occur.
The time to wait when sending a stopped message before considering a tracker to have timed out. This is usually shorter to make the client quit faster.
This is the maximum number of bytes in a tracker response. If a response size passes this number of bytes it will be rejected and the connection will be closed. On gzipped responses this size is measured on the uncompressed data. If you get 20 bytes of gzip response that’ll expand to 2 megabytes it will be interrupted before the entire response has been uncompressed assuming the limit is lower than 2 megs.
The number of seconds from a request is sent until it times out if no piece response is returned.
The number of seconds one block (16kB) is expected to be received within. If it’s not the block is requested from a different peer.
The length of the request queue given in the number of seconds it should take for the other end to send all the pieces. i.e. the actual number of requests depends on the download rate and this number.
The number of outstanding block requests a peer is allowed to queue up in the client. If a peer sends more requests than this before the first one has been sent the last request will be dropped. The higher this is the faster upload speeds the client can get to a single peer.
The maximum number of outstanding requests to send to a peer. This limit takes precedence over request_queue_time. i.e. no matter the download speed the number of outstanding requests will never exceed this limit.
If a whole piece can be downloaded in this number of seconds, or less, the peer_connection will prefer to request whole pieces at a time from this peer. The benefit of this is to better utilize disk caches by doing localized accesses and also to make it easier to identify bad peers if a piece fails the hash check.
The number of seconds the peer connection should wait for any activity on the peer connection before closing it due to time out. This defaults to 120 seconds since that’s what’s specified in the protocol specification. After half the time out a keep alive message is sent.
As peer_timeout but only applies to url-seeds. This is usually set lower because web servers are expected to be more reliable.
Controls the pipelining size of url-seeds. i.e. the number of HTTP request to keep outstanding before waiting for the first one to complete. It’s common for web servers to limit this to a relatively low number like 5.
Time to wait until a new retry of a web seed takes place.
Sets the upper limit on the total number of files this session will keep open. The reason why files are left open at all is that some anti virus software hooks on every file close and scans the file for viruses. Deferring the closing of the files will be the difference between a usable system and a completely hogged down system. Most operating systems also has a limit on the total number of file descriptors a process may have open. It is usually a good idea to find this limit and set the number of connections and the number of files limits so their sum is slightly below it.
The maximum times we try to connect to a peer before stop connecting again. If a peer succeeds the failcounter is reset. If a peer is retrieved from a peer source other than DHT the failcount is decremented by one allowing another try.
The number of seconds to wait to reconnect to a peer. this time is multiplied with the failcount.
The number of seconds to wait after a connection attempt is initiated to a peer until it is considered as having timed out. This setting is especially important in case the number of half-open connections are limited since stale half-open connection may delay the connection of other peers considerably.
The number of connection attempts that are made per second. If a number 0 is specified it will default to 200 connections per second. If 0 is specified, it means dont make outgoing connections at all.
If a peer is uninteresting and uninterested for longer than this number of seconds it will be disconnected.
The number of seconds between chokes/unchokes. On this interval peers are re-evaluated for being choked/unchoked. This is defined as 30 seconds in the protocol and it should be significantly longer than what it takes for TCP to ramp up to it’s max rate.
The number of seconds between each optimistic unchoke. On this timer the currently optimistically unchoked peer will change.
The number of peers we want from each tracker request. It defines what is sent as the Num_Want parameter to the tracker.
Specifies the number of pieces we need before we switch to rarest first picking. This defaults to 4 which means the 4 first pieces in any torrent are picked at random, the following pieces are picked in rarest first order.
The number of allowed pieces to send to peers that supports the fast extensions.
Controls whether or not Koinonein will send out suggest messages to create a bias of its peers to request certain pieces. The modes are:
0: The default and will not send out suggest messages.
1: Will send out suggest messages for the most recent pieces that are in the read cache.
The minimum send buffer target size (send buffer includes bytes pending being read from disk). For good and snappy seeding performance set this fairly high to at least fit a few blocks. This is essentially the initial window size which will determine how fast we can ramp up the send rate.
If the send buffer has fewer bytes than Send_Buffer_Watermark we’ll read another 16kB block onto it. If set too small upload rate capacity will suffer. If set too high memory will be wasted. The actual watermark may be lower than this in case the upload rate is low this is the upper limit.
The current upload rate to a peer is multiplied by this factor to get the send buffer watermark. The factor is specified as a percentage. i.e. 50 – 0.5 This product is clamped to the send_buffer_watermark setting to not exceed the max. For high speed upload this should be set to a greater value than 100. For high capacity connections setting this higher can improve upload performance and disk throughput. Setting it too high may waste RAM and create a bias towards read jobs over write jobs.
The number maximum number of bytes to be written to disk that can wait in the disk I/O thread queue. This queue is only for waiting for the disk I/O thread to receive the job and either write it to disk or insert it in the write cache. When this limit is reached the peer connections will stop reading data from their sockets until the disk thread catches up. Setting this too low will severely limit your download rate.
The number of seconds to wait for a handshake response from a peer. If no response is received within this time the peer is disconnected.
Specifies which algorithm to use to determine which peers to unchoke.
0: Fixed slots choker is the traditional choker with a fixed number of unchoke slots as specified by maximum uploads.
2: Rate based choker opens up unchoke slots based on the upload rate achieved to peers. The more slots that are opened the marginal upload rate required to open up another slot increases.
3: Bittyrant choker attempts to optimize download rate by finding the reciprocation rate of each peer individually and prefers peers that gives the highest return on investment. It still allocates all upload capacity but shuffles it around to the best peers first. For this choker to be efficient you need to set a global upload rate limit.
Controls the seeding unchoke behavior. The available options are:
0: Round Robin which round-robins the peers that are unchoked when seeding. This distributes the upload bandwidth uniformly and fairly. It minimizes the ability for a peer to download everything without redistributing it.
1: Fastest upload unchokes the peers we can send to the fastest. This might be a bit more reliable in utilizing all available capacity.
2: Anti leech prioritizes peers who have just started or are just about to finish the download. The intention is to force peers in the middle of the download to trade with each other.
Specified in units of 16 KiB blocks. Buffers that are part of a peer’s send or receive buffer also count against this limit. Send and receive buffers will never be denied to be allocated but they will cause the actual cached blocks to be flushed or evicted. If this is set to -1 the cache size is automatically set to the amount of physical RAM available in the machine divided by 8. If the amount of physical RAM cannot be determined it’s set to 1024 (=16 MiB).
How many active downloading torrents the queuing mechanism allows.
How many active seeding torrents the queuing mechanism allows.
The max number of torrents to announce to the DHT. By default this is set to 88 which is no more than one DHT announce every 10 seconds.
Is the max number of torrents to announce to their trackers.
Is the max number of torrents to announce to the local network over the local service discovery protocol.
Is a hard limit on the number of active auto managed torrents. This limit also applies to slow torrents.
Is the number of seconds between the torrent queue is updated and rotated.
This is the limit on the time a torrent has been an active seed, specified in seconds, before it is considered having met the seed limit criteria.
Peer_Turnover is the percentage of peers to disconnect every turnover peer_turnover_interval (if we’re at the peer limit), this is specified in percent when we are connected to more than limit * peer_turnover_cutoff peers disconnect peer_turnover fraction of the peers. It is specified in percent peer_turnover_interval is the interval in seconds between optimistic disconnects if the disconnects happen and how many peers are disconnected is controlled by peer_turnover and peer_turnover_cutoff
The number of seconds between scrapes of queued torrents (auto managed and paused torrents). Auto managed torrents that are paused are scraped regularly in order to keep track of their downloader/seed ratio. This ratio is used to determine which torrents to seed and which to pause.
The minimum number of seconds between any automatic scrape regardless of torrent. In case there are a large number of paused auto managed torrents this puts a limit on how often a scrape request is sent.
The maximum number of peers in the list of known peers. These peers are not necessarily connected so this number should be much greater than the maximum number of connected peers. Peers are evicted from the cache when the list grows passed 90% of this limit and once the size hits the limit peers are no longer added to the list. If this limit is set to 0 there is no limit on how many peers we’ll keep in the peer list.
The max peer list size used for torrents that are paused. This default to the same as max_peerlist_size but can be used to save memory for paused torrents since it’s not as important for them to keep a large peer list.
This is the minimum allowed announce interval for a tracker. This is specified in seconds and is used as a sanity check on what is returned from a tracker. It mitigates hammering misconfigured trackers.
This is the number of seconds a torrent is considered active after it was started regardless of upload and download speed. This is so that newly started torrents are not considered inactive until they have a fair chance to start downloading.
The number of pieces to send to a peer when seeding before rotating in another peer to the unchoke set.
The number of piece requests we will reject in a row while a peer is choked before the peer is considered abusive and is disconnected.
Specifies the buffer sizes set on peer sockets. 0 means the OS default (i.e. don’t change the buffer sizes).
Specifies the buffer sizes set on peer sockets. 0 means the OS default (i.e. don’t change the buffer sizes).
The number of blocks to read into the read cache when a read cache miss occurs. Setting this to 0 is essentially the same thing as disabling read cache. The number of blocks read into the read cache is always capped by the piece boundary.
When a piece in the write cache has write_cache_line_size contiguous blocks in it they will be flushed. Setting this to 1 effectively disables the write cache.
The number of seconds from a disk write errors occur on a torrent until Koinonein will take it out of the upload mode to test if the error condition has been fixed.
The max number of suggested piece indices received from a peer that’s remembered. If a peer floods suggest messages this limit prevents Koinonein from using too much RAM.
The time between local network announces for a torrent. By default when local service discovery is enabled a torrent announces itself every 5 minutes. This interval is specified in seconds.
The number of seconds between announcing torrents to the distributed hash table.
The number of seconds Koinonein will keep UDP tracker connection tokens around for. This is specified to be 60 seconds, and defaults to that. The higher this value is the fewer packets have to be sent to the UDP tracker. In order for higher values to work the tracker needs to be configured to match the expiration time for tokens.
The number of optimistic unchoke slots to use. It defaults to 0 which means automatic. Having a higher number of optimistic unchoke slots mean you will find the good peers faster but with the trade-off to use up more bandwidth. When this is set to 0 Koinonein opens up 20% of your allowed upload slots as optimistic unchoke slots.
The assumed reciprocation rate from peers when using the BitTyrant choker. This defaults to 14 kiB/s. If set too high you will over-estimate your peers and be more altruistic while finding the true reciprocation rate, if it’s set too low you’ll be too stingy and waste finding the true reciprocation rate.
Specifies how many percent the estimated reciprocation rate should be increased by each unchoke interval a peer is still choking us back. This defaults to 20%. This only applies to the BitTyrant choker.
Specifies how many percent the estimated reciprocation rate should be decreased by each unchoke interval a peer unchokes us. This default to 3%. This only applies to the BitTyrant choker.
The max number of peers we accept from pex messages from a single peer. This limits the number of concurrent peers any of our peers claims to be connected to. If they claim to be connected to more than this we’ll ignore any peer that exceeds this limit.
Specifies the target share ratio for share mode torrents. This defaults to 300 meaning we’ll try to upload 3 times as much as we download. Setting this very high will make it very conservative and you might end up not downloading anything ever (and not affecting your share ratio). It does not make any sense to set this any lower than 200. For instance if only 3 peers need to download the rarest piece it’s impossible to download a single piece and upload it more than 3 times. If the share_mode_target is set to more than 300 nothing is downloaded.
The max number of unchoked peers in the session. The number of unchoke slots may be ignored depending on what choking_algorithm is set to.
Sets a global limit on the number of connections opened. The number of connections is set to a hard minimum of at least two per torrent so if you set a too low connections limit and open too many torrents the limit will not be met.
The the number of incoming connections exceeding the connection limit to accept in order to potentially replace existing ones.
The target delay for UTP sockets in milliseconds. A high value will make UTP connections more aggressive and cause longer queues in the upload bottleneck. It cannot be too low since the noise in the measurements would cause it to send too slow.
The number of bytes the UTP congestion window can increase at the most in one RTT. This defaults to 300 bytes. If this is set too high the congestion controller reacts too hard to noise and will not be stable if it’s set too low it will react slow to congestion and not back off as fast.
The shortest allowed UTP socket timeout specified in milliseconds. This defaults to 500 milliseconds. The timeout depends on the RTT of the connection but is never smaller than this value. A connection times out when every packet in a window is lost or when a packet is lost twice in a row (i.e. the resent packet is lost as well).
The number of SYN packets that are sent and timed out before giving up and closing the socket.
The number of times a packet is sent and lossed or timed out before giving up and closing the connection.
The number of milliseconds of timeout for the initial SYN packet for uTP connections. For each timed out packet in a row the timeout is doubled.
Controls how the congestion window is changed when a packet loss is experienced. It’s specified as a percentage multiplier for cwnd. By default it’s set to 50. Never set it higher than 100.
The mixed_mode_algorithm determines how to treat TCP connections when there are UTP connections. Since UTP is designed to yield to TCP there’s an inherent problem when using swarms that have both TCP and UTP connections. If nothing is done UTP connections would often be starved out for bandwidth by the TCP connections. This mode is prefer_tcp (0). The peer_proportional mode (1) simply looks at the current throughput and rate limits all TCP connections to their proportional share based on how many of the connections are TCP. This works best if UTP connections are not rate limited by the global rate limiter which they aren’t by default.
The number of outstanding incoming connections to queue up while we’re not actively waiting for a connection to be accepted. The default is 5 which should be sufficient for any normal client. If this is a high performance server which expects to receive a lot of connections or used in a simulator or test it might make sense to raise this number.
The number of peers to try to connect to immediately when the first tracker response is received for a torrent. This is a boost to given to new torrents to accelerate them starting up. The normal connect scheduler is run once every second this allows peers to be connected immediately instead of waiting for the session tick to trigger connections.
The maximum allowed size in bytes to be received by the metadata extension, i.e. magnet links.
Default: 31457280 (30 MB)
Determines how aggressively to back off from retrying failing trackers. This value determines x in the following formula determining the number of seconds to wait until the next retry:
Delay=5 + 5 * x / 100 * fails^2
This setting may be useful to make Koinonein more or less aggressive in hitting trackers.
The max number of bytes to allow an HTTP response to be when announcing to trackers or downloading .torrent files.
The download limit for a torrent to be considered active by the queuing mechanism. A torrent whose download rate is less than inactive_down_rate and whose upload rate is less than inactive_up_rate for auto_manage_startup seconds is considered inactive and another queued torrent may be started. This logic is disabled if dont_count_slow_torrents is false.
The uploadload limit for a torrent to be considered active by the queuing mechanism. A torrent whose download rate is less than inactive_down_rate and whose upload rate is less than inactive_up_rate for auto_manage_startup seconds is considered inactive and another queued torrent may be started. This logic is disabled if dont_count_slow_torrents is false.
This is the first port to use for binding outgoing connections to. This is useful for users that have routers that allow QoS settings based on local port.
When binding outgoing connections to specific ports this is the size of the range.
The limit of number of simultaneous checking torrents.
Determines the TOS byte set in the IP header of every packet sent to peers including web seeds The default value for this is 0x0 no marking. One potentially useful TOS mark is 0x20 this represents the QBone scavenger service.
The number of blocks to keep outstanding at any given time when checking torrents. Higher numbers give faster re-checks but uses more memory. Specified in number of 16 kiB blocks
If set to 0 pieces will be announced to other peers before they are fully downloaded and before they are hash checked. The intention is to gain 1.5 potential round trip times per downloaded piece. When non-zero this indicates how many milliseconds in advance pieces should be announced before they are expected to be completed.
Specifies the number of io-threads to use.
The max number of outstanding jobs.
When a seeding torrent reaches either the share ratio (bytes up / bytes down) or the seed time ratio (seconds as seed / seconds as downloader) or the seed time limit (seconds as seed) it is considered done and it will leave room for other torrents these are specified as percentages.
When a seeding torrent reaches either the share ratio (bytes up / bytes down) or the seed time ratio (seconds as seed / seconds as downloader) or the seed time limit (seconds as seed) it is considered done and it will leave room for other torrents these are specified as percentages
peer_turnover is the percentage of peers to disconnect every turnover. This is specified in percent when we are connected to more than limit * peer_turnover_cutoff peers disconnect peer_turnover fraction of the peers. It is specified in percent peer_turnover_interval is the interval (in seconds) between optimistic disconnects if the disconnects happen and how many peers are disconnected is controlled by peer_turnover and peer_turnover_cutoff.
Controls the priority of downloading torrents over seeding or finished torrents when it comes to making peer connections. Peer connections are throttled by the connection_speed and the half-open connection limit, this makes peer connections a limited resource. Torrents that still have pieces to download are prioritized by default. To avoid having many seeding torrents use most of the connection attempts and only give one peer every now and then to the downloading torrent Koinonein will loop over the downloading torrents to connect a peer each and every n:th connection attempt a finished torrent is picked to be allowed to connect to a peer. This setting controls n.
If binding to a specific port fails this setting specifies how many times to retry a failed port bind.
Control the settings for incoming and outgoing connections respectively. Keep in mind that protocol encryption degrades performance in several respects:
1: It prevents “zero copy” disk buffers being sent to peers, since each peer needs to mutate the data (i.e. encrypt it) the data must be copied per peer connection rather than sending the same buffer to multiple peers.
2: The encryption itself requires more CPU than plain bittorrent protocol. The highest cost is the Diffie Hellman exchange on connection setup.
3: The encryption handshake adds several round-trips to the connection setup, and delays transferring data.
Determines the encryption level of the connections. This setting will adjust which encryption scheme is offered to the other peer, as well as which encryption scheme is selected by the client.
1: Use only plaintext encryption.
2: Use only rc4 encryption.
3: Allow both.
0: No proxy server is used, all other fields are ignored.
1: The server is assumed to be a SOCKS4 server that requires a username.
2: The server is assumed to be a SOCKS5 server (RFC 1928) that does not require any authentication. The username and password are ignored.
3: The server is assumed to be a SOCKS5 server that supports plain text username and password authentication (RFC 1929). The username and password specified may be sent to the proxy if it requires.
4: The server is assumed to be an HTTP proxy. If the transport used for the connection is non-HTTP the server is assumed to support the CONNECT method. i.e. for web seeds and HTTP trackers a plain proxy will suffice. The proxy is assumed to not require authorization. The username and password will not be used.
5: The server is assumed to be an HTTP proxy that requires user authorization. The username and password will be sent to the proxy.
6: Route through a i2p SAM proxy
The port of the proxy server.
Sets the i2p SAM bridge port to connect to.
Determines the max number of volatile disk cache blocks. If the number of volatile blocks exceed this limit other volatile blocks will start to be evicted. A disk cache block is volatile if it has low priority and should be one of the first blocks to be evicted under pressure. For instance blocks pulled into the cache as the result of calculating a piece hash are volatile. These blocks don’t represent potential interest among peers so the value of keeping them in the cache is limited.
Specifies the number of milliseconds between internal ticks. This is the frequency with which bandwidth quota is distributed to peers. It should not be more than one second. Setting this to a low value means higher resolution bandwidth quota distribution setting it to a higher value saves CPU cycles.
Sets the maximum number of connection each torrent will open. If all connections are used up incoming connections may be refused or poor connections may be closed. This must be at least 2. -1 means unlimited.
Sets the maximum number of peers that’s unchoked at the same time on each torrent. If you set this to -1 there will be no limit.
The ip address passed along to trackers.
This is a comma-separated list of IP port-pairs. They will be added to the DHT node (if it’s enabled) as back-up nodes in case we don’t know of any.
When using a proxy this is the hostname where the proxy is running.
The proxy username.
The proxy password.
Sets the i2p SAM bridge to connect to. Set the port with the i2p_port setting.
DHT INT Settings
The maximum number of peers to send in a reply to get_peers.
The number of concurrent search request the node will send when announcing and refreshing the routing table. This parameter is called alpha in the kademlia paper.
The maximum number of failed tries to contact a node before it is removed from the routing table. If there are known working nodes that are ready to replace a failing node it will be replaced immediately. This limit is only used to clear out nodes that don’t have any node that can replace them.
The total number of torrents to track from the DHT. This is simply an upper limit to make sure malicious DHT nodes cannot make us allocate an unbounded amount of memory.
Maximum number of items the DHT will store.
The maximum number of peers to store per torrent.
The max number of torrents to return in a torrent search query to the DHT.
The number of seconds a DHT node is banned if it exceeds the rate limit. The rate limit is averaged over 10 seconds to allow for bursts above the limit.
The max number of packets per second a DHT node is allowed to send without getting banned.
The number of seconds a immutable/mutable item will be expired. default is 0 and means never expire.
DHT BOOL Settings
Determines if the routing table entries should restrict entries to one per IP. This defaults to true which helps mitigate some attacks on the DHT. It prevents adding multiple nodes with IPs with a very close CIDR distance. When set nodes whose IP address that’s in the same /24 (or /64 for IPv6) range in the same routing table bucket. This is an attempt to mitigate node ID spoofing attacks also restrict any IP to only have a single entry in the whole routing table.
Determines if DHT searches should prevent adding nodes with IPs with very close CIDR distance. This also defaults to true and helps mitigate certain attacks on the DHT.
Makes the first buckets in the DHT routing table fit 128, 64, 32 and 16 nodes respectively as opposed to the standard size of 8. All other buckets have size 8 still.
Slightly changes the lookup behaviour in terms of how many outstanding requests we keep. Instead of having branch factor be a hard limit we always keep branch factor outstanding requests to the closest nodes. i.e. every time we get results back with closer nodes we query them right away. It lowers the lookup times at the cost of more outstanding queries.
When set perform lookups in a way that is slightly more expensive but which minimizes the amount of information leaked about you.
When set node’s whose IDs that are not correctly generated based on its external IP are ignored. When a query arrives from such node an error message is returned with a message saying “invalid node ID”.
Ignore DHT messages from parts of the internet we wouldn’t expect to see any traffic from.
When set the other nodes won’t keep this node in their routing tables. It’s meant for low-power and/or ephemeral devices that cannot support the DHT it is also useful for mobile devices which are sensitive to network traffic and battery life. This node no longer responds to ‘query’ messages and will place a ‘ro’ key (value=1) in the top-level message dictionary of outgoing query messages.