deprecate settings_pack::hashing_threads and replace it with aio_threads in documentation

This commit is contained in:
arvidn 2016-03-18 15:43:02 -04:00
parent 85f615132b
commit b446fe4bba
7 changed files with 17 additions and 17 deletions

View File

@ -119,7 +119,7 @@ libtorrent starts 3 to 5 threads.
* The third thread is the SHA-1 hash thread. By default there's only one hash thread,
but on multi-core machines downloading at very high rates, libtorrent can be configured
to start any number of hashing threads, to take full use of multi core systems.
(see ``settings_pack::hashing_threads``).
(see ``settings_pack::aio_threads``).
* The fourth and fifth threads are spawned by asio on systems that don't support
asynchronous host name resolution, in order to simulate non-blocking ``getaddrinfo()``.

View File

@ -332,12 +332,12 @@ and ``settings_pack::active_seeds``.
SHA-1 hashing
-------------
When downloading at very high rates, it is possible to have the CPU be the bottleneck
for passing every downloaded byte through SHA-1. In order to enable calculating SHA-1
hashes in parallel, on multi-core systems, set ``settings_pack::hashing_threads``
to the number of threads libtorrent should start to do SHA-1 hashing. This defaults
to 1, and only if that thread is close to saturating one core does it make sense to
increase the number of threads.
When downloading at very high rates, it is possible to have the CPU be the
bottleneck for passing every downloaded byte through SHA-1. In order to enable
calculating SHA-1 hashes in parallel, on multi-core systems, set
``settings_pack::aio_threads`` to the number of threads libtorrent should
perform I/O and do SHA-1 hashing in. Only if that thread is close to saturating
one core does it make sense to increase the number of threads.
scalability
===========

View File

@ -1243,7 +1243,7 @@ int main(int argc, char* argv[])
" previous command line options, so be sure to specify this first\n"
" -G Add torrents in seed-mode (i.e. assume all pieces\n"
" are present and check hashes on-demand)\n"
" -E <num-threads> specify how many hashing threads to use\n"
" -E <num-threads> specify how many disk I/O threads to use\n"
"\n BITTORRENT OPTIONS\n"
" -c <limit> sets the max number of connections\n"
" -T <limit> sets the max number of connections per torrent\n"
@ -1401,7 +1401,7 @@ int main(int argc, char* argv[])
case 'B': settings.set_int(settings_pack::peer_timeout, atoi(arg)); break;
case 'n': settings.set_bool(settings_pack::announce_to_all_tiers, true); --i; break;
case 'G': seed_mode = true; --i; break;
case 'E': settings.set_int(settings_pack::hashing_threads, atoi(arg)); break;
case 'E': settings.set_int(settings_pack::aio_threads, atoi(arg)); break;
case 'd': settings.set_int(settings_pack::download_rate_limit, atoi(arg) * 1000); break;
case 'u': settings.set_int(settings_pack::upload_rate_limit, atoi(arg) * 1000); break;
case 'S':

View File

@ -1387,6 +1387,9 @@ namespace libtorrent
// received by the metadata extension, i.e. magnet links.
max_metadata_size,
#ifndef TORRENT_NO_DEPRECATE
// DEPRECTED: use aio_threads instead
// ``hashing_threads`` is the number of threads to use for piece hash
// verification. It defaults to 1. For very high download rates, on
// machines with multiple cores, this could be incremented. Setting it
@ -1394,6 +1397,9 @@ namespace libtorrent
// any benefit of setting it to the number of cores. If it's set to 0,
// hashing is done in the disk thread.
hashing_threads,
#else
deprecated9,
#endif
// the number of blocks to keep outstanding at any given time when
// checking torrents. Higher numbers give faster re-checks but uses

View File

@ -282,7 +282,7 @@ namespace libtorrent
settings_pack sett;
sett.set_int(settings_pack::cache_size, 0);
sett.set_int(settings_pack::hashing_threads, 2);
sett.set_int(settings_pack::aio_threads, 2);
// TODO: this should probably be optional
alert_manager dummy2(0, 0);

View File

@ -97,7 +97,6 @@ namespace libtorrent
set.set_int(settings_pack::checking_mem_usage, 2);
// don't use any extra threads to do SHA-1 hashing
set.set_int(settings_pack::hashing_threads, 0);
set.set_int(settings_pack::network_threads, 0);
set.set_int(settings_pack::aio_threads, 1);
@ -274,11 +273,6 @@ namespace libtorrent
// connect to us if they want to
set.set_int(settings_pack::max_failcount, 1);
// we're likely to have more than 4 cores on a high
// performance machine. One core is needed for the
// network thread
set.set_int(settings_pack::hashing_threads, 4);
// the number of threads to use to call async_write_some
// and read_some on peer sockets
// this doesn't work. See comment in settings_pack.cpp

View File

@ -316,7 +316,7 @@ namespace libtorrent
SET(torrent_connect_boost, 10, 0),
SET(alert_queue_size, 1000, &session_impl::update_alert_queue_size),
SET(max_metadata_size, 3 * 1024 * 10240, 0),
SET(hashing_threads, 1, 0),
DEPRECATED_SET(hashing_threads, 1, 0),
SET(checking_mem_usage, 256, 0),
SET(predictive_piece_announce, 0, 0),
SET(aio_threads, 4, &session_impl::update_disk_threads),