enable coalesce_reads and coalesce_writes by default on windows
This commit is contained in:
parent
b7f230316c
commit
b0b1bfb7a9
|
@ -1,4 +1,5 @@
|
|||
|
||||
* coalesce reads and writes by default on windows
|
||||
* fixed disk I/O performance of checking hashes and creating torrents
|
||||
* fix race condition in part_file
|
||||
* fix part_file open mode compatibility test
|
||||
|
|
|
@ -165,8 +165,17 @@ namespace libtorrent
|
|||
DEPRECATED_SET(use_write_cache, true, 0),
|
||||
DEPRECATED_SET(dont_flush_write_cache, false, 0),
|
||||
DEPRECATED_SET(explicit_read_cache, false, 0),
|
||||
#ifdef TORRENT_WINDOWS
|
||||
// the emulation of preadv/pwritev uses overlapped reads/writes to be able
|
||||
// to issue them all back to back. However, it appears windows fail to
|
||||
// merge them. At least for people reporting performance issues in
|
||||
// qBittorrent
|
||||
SET(coalesce_reads, true, 0),
|
||||
SET(coalesce_writes, true, 0),
|
||||
#else
|
||||
SET(coalesce_reads, false, 0),
|
||||
SET(coalesce_writes, false, 0),
|
||||
#endif
|
||||
SET(auto_manage_prefer_seeds, false, 0),
|
||||
SET(dont_count_slow_torrents, true, &session_impl::update_count_slow),
|
||||
SET(close_redundant_connections, true, 0),
|
||||
|
|
|
@ -447,6 +447,28 @@ TORRENT_TEST(coalesce_writes)
|
|||
cleanup();
|
||||
}
|
||||
|
||||
TORRENT_TEST(no_coalesce_reads)
|
||||
{
|
||||
using namespace libtorrent;
|
||||
// test allowed fast
|
||||
settings_pack p;
|
||||
p.set_int(settings_pack::read_cache_line_size, 16);
|
||||
p.set_bool(settings_pack::coalesce_reads, false);
|
||||
test_transfer(0, p, false);
|
||||
|
||||
cleanup();
|
||||
}
|
||||
|
||||
TORRENT_TEST(no_coalesce_writes)
|
||||
{
|
||||
using namespace libtorrent;
|
||||
// test allowed fast
|
||||
settings_pack p;
|
||||
p.set_bool(settings_pack::coalesce_writes, false);
|
||||
test_transfer(0, p, false);
|
||||
|
||||
cleanup();
|
||||
}
|
||||
|
||||
TORRENT_TEST(allocate)
|
||||
{
|
||||
|
|
Loading…
Reference in New Issue