adjust default read cache line size and log IOPS in session stats

This commit is contained in:
Arvid Norberg
2011-06-26 19:00:40 +00:00
parent 2e70f92003
commit c647e95244
3 changed files with 7 additions and 3 deletions

View File

@@ -201,7 +201,7 @@ namespace libtorrent
, optimize_hashing_for_speed(true) , optimize_hashing_for_speed(true)
, file_checks_delay_per_block(0) , file_checks_delay_per_block(0)
, disk_cache_algorithm(avoid_readback) , disk_cache_algorithm(avoid_readback)
, read_cache_line_size(128) , read_cache_line_size(32)
, write_cache_line_size(32) , write_cache_line_size(32)
, optimistic_disk_retry(10 * 60) , optimistic_disk_retry(10 * 60)
, disable_hash_checks(false) , disable_hash_checks(false)

View File

@@ -227,8 +227,8 @@ namespace libtorrent
set.cache_size = 32768 * 2; set.cache_size = 32768 * 2;
set.use_read_cache = true; set.use_read_cache = true;
set.cache_buffer_chunk_size = 128; set.cache_buffer_chunk_size = 128;
set.read_cache_line_size = 512; set.read_cache_line_size = 32;
set.write_cache_line_size = 512; set.write_cache_line_size = 32;
set.low_prio_disk = false; set.low_prio_disk = false;
// one hour expiration // one hour expiration
set.cache_expiry = 60 * 60; set.cache_expiry = 60 * 60;

View File

@@ -967,6 +967,8 @@ namespace aux {
":uTP down rate" ":uTP down rate"
":uTP peak send delay" ":uTP peak send delay"
":uTP avg send delay" ":uTP avg send delay"
":read ops/s"
":write ops/s"
"\n\n", m_stats_logger); "\n\n", m_stats_logger);
} }
#endif #endif
@@ -3352,6 +3354,8 @@ namespace aux {
STAT_LOG(d, utp_down_rate); STAT_LOG(d, utp_down_rate);
STAT_LOG(f, float(utp_peak_send_delay) / 1000000.f); STAT_LOG(f, float(utp_peak_send_delay) / 1000000.f);
STAT_LOG(f, float(utp_num_delay_sockets ? float(utp_send_delay_sum) / float(utp_num_delay_sockets) : 0) / 1000000.f); STAT_LOG(f, float(utp_num_delay_sockets ? float(utp_send_delay_sum) / float(utp_num_delay_sockets) : 0) / 1000000.f);
STAT_LOG(f, float(cs.reads - m_last_cache_status.reads) / float(tick_interval_ms));
STAT_LOG(f, float(cs.writes - m_last_cache_status.writes) / float(tick_interval_ms));
fprintf(m_stats_logger, "\n"); fprintf(m_stats_logger, "\n");
#undef STAT_LOG #undef STAT_LOG