skip to Main Content

Advanced Client Settings

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

BOOL Types

session_paused
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.
Default: 0
use_dht
Enables the dht node and makes the trackerless service available to torrents.
Default: 1
use_upnp
Enables the UPnP service. When started, the listen port and the DHT port are attempted to be forwarded on local UPnP router devices.
Default: 1
use_natpmp
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.
Default: 1
use_lsd
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.
Default: 1
allow_multiple_connections_per_ip
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.
Default: 0
upnp_ignore_nonrouters
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.
Default: 0
use_parole_mode
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.
Default: 1
use_read_cache
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.
Default: 1
coalesce_reads
Allocate separate, contiguous, buffers for read calls. Only used where readv cannot be used will use more RAM but may improve performance.
Default: 0
coalesce_writes
Allocate separate, contiguous, buffers for write calls. Only used where writev cannot be used will use more RAM but may improve performance
Default: 0
auto_manage_prefer_seeds
Prefer seeding torrents when determining which torrents to give active slots to, the default is false which gives preference to downloading torrents.
Default: 0
close_redundant_connections
Specifies whether Koinonein BitTorrent Client 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.
Default: 1
prioritize_partial_pieces
Specifies whether Koinonein BitTorrent Client 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.
Default: 0
rate_limit_ip_overhead
If set to true the estimated TCP/IP overhead is drained from the rate limiters,to avoid exceeding the limits with the total traffic.
Default: 1
announce_to_all_trackers
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.
Default: 0
announce_to_all_tiers
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.
Default: 0
prefer_udp_trackers
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.
Default: 1
strict_super_seeding
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.
Default: 0
disable_hash_checks
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.
Default: 0
allow_i2p_mixed
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.
Default: 0
volatile_read_cache
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.
Default: 0
no_atime_storage
Linux only option. Passes in the O_NOATIME to open() when opening files. This may lead to some disk performance improvements.
Default: 1
incoming_starts_queued_torrents
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.
Default: 0
report_true_downloaded
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.
Default: 0
strict_end_game_mode
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 BitTorrent Client 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.
Default: 1
broadcast_lsd
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.
Default: 1
enable_outgoing_utp
When set to true Koinonein BitTorrent Client will try to make outgoing utp connections controls whether Koinonein BitTorrent Client will accept incoming connections or make outgoing connections of specific type.
Default: 1
enable_incoming_utp
When set to true Koinonein BitTorrent Client will try to make incoming utp connections controls whether Koinonein BitTorrent Client will accept outgoing connections or make outgoing connections of specific type.
Default: 1
enable_outgoing_tcp
When set to true Koinonein BitTorrent Client will try to make outgoing tcp connections controls whether Koinonein BitTorrent Client will accept incoming connections or make outgoing connections of specific type.
Default: 1
enable_incoming_tcp
When set to true Koinonein BitTorrent Client will try to make incoming tcp connections controls whether Koinonein BitTorrent Client will accept outgoing connections or make outgoing connections of specific type.
Default: 1
no_recheck_incomplete_resume
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.
Default: 0
anonymous_mode
When set to true the Koinonein BitTorrent Client 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.
Default: 0
force_proxy
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).
Default: 0
report_web_seed_downloads
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.
Default: 1
seeding_outgoing_connections
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.
Default: 1
no_connect_privileged_ports
When this is true Koinonein BitTorrent Client 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.
Default: 0
smooth_connects
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.
Default: 1
always_send_user_agent
Always send user-agent in every web seed request. If false only the first request per http connection will include the user agent.
Default: 0
apply_ip_filter_to_trackers
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.
Default: 1
lock_files
Determines whether or not to lock files which Koinonein BitTorrent Client is downloading to or seeding from. This is implemented using fcntl(F_SETLK) on unix systems and by not passing in SHARE_READ and SHARE_WRITE on windows. This might prevent 3rd party processes from corrupting the files under Koinonein BitTorrent Client’s feet.
Default: 0
ban_web_seeds
When true web seeds sending bad data will be banned.
Default: 1
support_merkle_torrents
If this is false don’t advertise support for the Tribler merkle tree piece message.
Default: 1
report_redundant_bytes
If this is true,the number of redundant bytes is sent to the tracker.
Default: 1
use_disk_cache_pool
Enables using a pool allocator for disk cache blocks. Enabling it makes the cache perform better at high throughput. It also makes the cache less likely and slower at returning memory back to the system once allocated.
Default: 0
dont_flush_write_cache
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.
Default: 0
listen_system_port_fallback
If this is true Koinonein BitTorrent Client 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.
Default: 1
announce_crypto_support
When this is true and incoming encrypted connections are enabled supportcrypt=1 is included in http tracker announces.
Default: 1
prefer_rc4
If the allowed encryption level is both setting this to true will prefer rc4 if both methods are offered, plaintext otherwise.
Default: 0
proxy_hostnames
If true hostname lookups are done via the configured proxy (if any). This is only supported by SOCKS5 and HTTP.
Default: 1
proxy_peer_connections
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).
Default: 1
auto_sequential
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.
Default: 1
proxy_tracker_connections
If true tracker connections are made over the configured proxy, if any.
Default: 1

INT Types

close_file_interval
Interval in seconds to close files as to trigger the operating system flushing disk cache.
Default: 16513
resolver_cache_timeout
The number of seconds before the internal host name resolver considers a cache value timed out, negative values are interpreted as zero.
Default: 16515
max_web_seed_connections
The maximum number of web seeds to have connected per torrent at any given time.
Default: 3
urlseed_max_request_bytes
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 BitTorrent Client 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 BitTorrent Client 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.
Default: 16777216
web_seed_name_lookup_retry
The time to wait until a new retry of a web seed name lookup.
Default: 1800
port_type
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 BitTorrent Client starts.
  • 2: The operating system will pick an available free port each time Koinonein BitTorrent Client starts.
  • 3: A random port will be selected each time Koinonein BitTorrent Client starts.
Default: 2
port
The last port used or the selected port if port_type=1.
Default: 6881
ssl_port
The last SSL port used or the selected SSL port if port_type=1.
Default: 4433
tracker_completion_timeout
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.
Default: 30
tracker_receive_timeout
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.
Default: 10
stop_tracker_timeout
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.
Default: 5
tracker_maximum_response_length
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.
Default: 1048576
piece_timeout
The number of seconds from a request is sent until it times out if no piece response is returned.
Default: 20
request_timeout
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.
Default: 60
request_queue_time
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.
Default: 3
max_allowed_in_request_queue
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.
Default: 500
max_out_request_queue
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.
Default: 500
whole_pieces_threshold
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.
Default: 20
peer_timeout
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.
Default: 120
urlseed_timeout
As peer_timeout but only applies to url-seeds. This is usually set lower because web servers are expected to be more reliable.
Default: 20
urlseed_pipeline_size
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.
Default: 5
urlseed_wait_retry
Time to wait until a new retry of a web seed takes place.
Default: 30
file_pool_size
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.
Default: 40
max_failcount
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.
Default: 3
min_reconnect_time
The number of seconds to wait to reconnect to a peer. this time is multiplied with the failcount.
Default: 60
peer_connect_timeout
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.
Default: 15
connection_speed
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.
Default: 10
inactivity_timeout
If a peer is uninteresting and uninterested for longer than this number of seconds it will be disconnected.
Default: 600
unchoke_interval
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.
Default: 15
optimistic_unchoke_interval
The number of seconds between each optimistic unchoke. On this timer the currently optimistically unchoked peer will change.
Default: 30
num_want
The number of peers we want from each tracker request. It defines what is sent as the Num_Want parameter to the tracker.
Default: 200
initial_picker_threshold
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.
Default: 4
allowed_fast_set_size
The number of allowed pieces to send to peers that supports the fast extensions.
Default: 5
suggest_mode
Controls whether or not Koinonein BitTorrent Client 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.
Default: 0
send_buffer_low_watermark
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.
Default: 10240
send_buffer_watermark
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.
Default: 512000
send_buffer_watermark_factor
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.
Default: 50
max_queued_disk_bytes
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.
Default: 1048576
handshake_timeout
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.
Default: 10
choking_algorithm
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.
Default: 3
seed_choking_algorithm
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.
Default: 0
cache_size
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).
Default: 1024
cache_buffer_chunk_size
Disk buffers are allocated using a pool allocator. The number of blocks that are allocated at a time when the pool needs to grow can be specified in cache_buffer_chunk_size
  • 0: This is the default and files are opened normally with the OS caching reads and writes.
  • 1: This opens all files in no-cache mode. This corresponds to the OS not letting blocks for the files linger in the cache. This makes sense in order to avoid Koinonein BitTorrent Client to potentially evict all other processes cache by simply handling high throughput and large files. If Koinonein BitTorrent Client read cache is disabled enabling this may reduce performance.
Default: 0
disk_io_read_mode
As disk_io_write_mode.
Default: 0
active_downloads
How many active downloading torrents the queuing mechanism allows.
Default: 3
active_seeds
How many active seeding torrents the queuing mechanism allows.
Default: 5
active_dht_limit
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.
Default: 88
active_tracker_limit
Is the max number of torrents to announce to their trackers.
Default: 1600
active_lsd_limit
Is the max number of torrents to announce to the local network over the local service discovery protocol.
Default: 60
active_limit
Is a hard limit on the number of active auto managed torrents. This limit also applies to slow torrents.
Default: 15
auto_manage_interval
Is the number of seconds between the torrent queue is updated and rotated.
Default: 30
seed_time_limit
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.
Default: 86400
peer_turnover_interval
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
Default: 300
auto_scrape_interval
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.
Default: 1800
auto_scrape_min_interval
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.
Default: 300
max_peerlist_size
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.
Default: 250
max_paused_peerlist_size
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.
Default: 125
min_announce_interval
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.
Default: 300
auto_manage_startup
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.
Default: 60
seeding_piece_quota
The number of pieces to send to a peer when seeding before rotating in another peer to the unchoke set.
Default: 20
max_rejects
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.
Default: 50
recv_socket_buffer_size
Specifies the buffer sizes set on peer sockets. 0 means the OS default (i.e. don’t change the buffer sizes).
Default: 0
send_socket_buffer_size
Specifies the buffer sizes set on peer sockets. 0 means the OS default (i.e. don’t change the buffer sizes).
Default: 0
read_cache_line_size
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.
Default: 32
write_cache_line_size
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.
Default: 16
optimistic_disk_retry
The number of seconds from a disk write errors occur on a torrent until Koinonein BitTorrent Client will take it out of the upload mode to test if the error condition has been fixed.
Default: 600
max_suggest_pieces
The max number of suggested piece indices received from a peer that’s remembered. If a peer floods suggest messages this limit prevents Koinonein BitTorrent Client from using too much RAM.
Default: 16
local_service_announce_interval
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.
Default: 300
dht_announce_interval
The number of seconds between announcing torrents to the distributed hash table.
Default: 900
udp_tracker_token_expiry
The number of seconds Koinonein BitTorrent Client 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.
Default: 60
num_optimistic_unchoke_slots
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 BitTorrent Client opens up 20% of your allowed upload slots as optimistic unchoke slots.
Default: 0
default_est_reciprocation_rate
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.
Default: 16000
increase_est_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.
Default: 20
decrease_est_reciprocation_rate
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.
Default: 3
max_pex_peers
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.
Default: 50
share_mode_target
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.
Default: 300
unchoke_slots_limit
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.
Default: 8
connections_limit
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.
Default: 200
connections_slack
The the number of incoming connections exceeding the connection limit to accept in order to potentially replace existing ones.
Default: 10
utp_target_delay
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.
Default: 100
utp_gain_factor
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.
Default: 3000
utp_min_timeout
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).
Default: 500
utp_syn_resends
The number of SYN packets that are sent and timed out before giving up and closing the socket.
Default: 2
utp_fin_resends
Default: 2
utp_num_resends
The number of times a packet is sent and lossed or timed out before giving up and closing the connection.
Default: 2
utp_connect_timeout
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.
Default: 3000
utp_loss_multiplier
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.
Default: 50
mixed_mode_algorithm
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.
Default: 1
listen_queue_size
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.
Default: 5
torrent_connect_boost
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.
Default: 10
max_metadata_size
The maximum allowed size in bytes to be received by the metadata extension, i.e. magnet links.
Default: 31457280 (30 MB)
tracker_backoff
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 BitTorrent Client more or less aggressive in hitting trackers.
Default: 250
max_http_recv_buffer_size
The max number of bytes to allow an HTTP response to be when announcing to trackers or downloading .torrent files.
Default: 835584
inactive_down_rate
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.
Default: 2048
inactive_up_rate
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.
Default: 2048
outgoing_port
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.
Default: 0
num_outgoing_ports
When binding outgoing connections to specific ports this is the size of the range.
Default: 0
active_checking
The limit of number of simultaneous checking torrents.
Default: 1
peer_tos
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.
Default: 0
checking_mem_usage
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
Default: 256
predictive_piece_announce
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.
Default: 0
aio_threads
Specifies the number of io-threads to use.
Default: 4
aio_max
The max number of outstanding jobs.
Default: 300
network_threads
The number of threads to use to call async_write_some on peer connection sockets. When seeding at extremely high rates this may become a bottleneck and setting this to 2 or more may parallelize that cost. When using SSL torrents all encryption for outgoing traffic is done within the socket send functions and this will help parallelizing the cost of SSL encryption as well.
Default: 2
share_ratio_limit
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.
Default: 200
seed_time_ratio_limit
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
Default: 700
peer_turnover
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.
Default: 4
peer_turnover_cutoff
See peer_turnover.
Default: 90
connect_seed_every_n_download
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 BitTorrent Client 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.
Default: 10
max_retry_port_bind
If binding to a specific port fails this setting specifies how many times to retry a failed port bind.
Default: 10
out_enc_policy
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.
Default: 1
in_enc_policy
See out_enc_policy.
Default: 1
allowed_enc_level
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.
Default: 3
proxy_type
  • 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
Default: 0
proxy_port
The port of the proxy server.
Default: 0
i2p_port
Sets the i2p SAM bridge port to connect to.
Default: 0
cache_size_volatile
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.
Default: 256
tick_interval
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.
Default: 1000
max_peers_torrent
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.
Default: 50
max_slots_torrent
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.
Default: 50

String Types

announce_ip
The ip address passed along to trackers.
outgoing_interfaces
Sets the network interface this session will use when it opens outgoing connections. By default it binds outgoing connections to INADDR_ANY and port 0 (i.e. let the OS decide). This parameter must be a string containing one or more comma separated adapter names. Adapter names on unix systems are of the form “eth0”, “eth1”, “tun0”, etc. When specifying multiple interfaces they will be assigned in round-robin order. This may be useful for clients that are multi-homed. Binding an outgoing connection to a local IP does not necessarily make the connection via the associated NIC/Adapter. Setting this to an empty string will disable binding of outgoing connections.
dht_bootstrap_nodes
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.
Default: dht.libtorrent.org:25401,router.bittorrent.com:6881
proxy_hostname
When using a proxy this is the hostname where the proxy is running.
proxy_username
The proxy username.
proxy_password
The proxy password.
i2p_hostname
Sets the i2p SAM bridge to connect to. Set the port with the i2p_port setting.

DHT [INT Types]

max_peers_reply
The maximum number of peers to send in a reply to get_peers.
Default: 100
search_branching
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.
Default: 5
max_fail_count
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.
Default: 20
max_torrents
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.
Default: 1500
max_dht_items
Maximum number of items the DHT will store.
Default: 700
max_peers
The maximum number of peers to store per torrent.
Default: 250
max_torrent_search_reply
The max number of torrents to return in a torrent search query to the DHT.
Default: 20
block_timeout
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.
Default: 300
block_ratelimit
The max number of packets per second a DHT node is allowed to send without getting banned.
Default: 5
item_lifetime
The number of seconds a immutable/mutable item will be expired. default is 0 and means never expire.
Default: 0

DHT [BOOL Types]

restrict_routing_ips
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.
Default: 1
restrict_search_ips
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.
Default: 1
extended_routing_table
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.
Default: 1
aggressive_lookups
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.
Default: 1
privacy_lookups
When set perform lookups in a way that is slightly more expensive but which minimizes the amount of information leaked about you.
Default: 0
enforce_node_id
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”.
Default: 0
ignore_dark_internet
Ignore DHT messages from parts of the internet we wouldn’t expect to see any traffic from.
Default: 1
read_only
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.
Default: 0
Back To Top

Copyright 2017 Koinonein Ltd - All Rights Reserved

Koinonein On Facebook
Koinonein On Twitter
Koinonein On Google+
Koinonein RSS
Koinonein On Google+
Koinonein RSS