increase low watermark for disk write queue. log payload rates in session stats
This commit is contained in:
parent
004fac37bd
commit
19d6c53ad4
|
@ -1620,10 +1620,10 @@ namespace libtorrent
|
||||||
if (m_exceeded_write_queue)
|
if (m_exceeded_write_queue)
|
||||||
{
|
{
|
||||||
int low_watermark = m_settings.max_queued_disk_bytes_low_watermark == 0
|
int low_watermark = m_settings.max_queued_disk_bytes_low_watermark == 0
|
||||||
? m_settings.max_queued_disk_bytes / 2
|
? m_settings.max_queued_disk_bytes * 3 / 4
|
||||||
: m_settings.max_queued_disk_bytes_low_watermark;
|
: m_settings.max_queued_disk_bytes_low_watermark;
|
||||||
if (low_watermark >= m_settings.max_queued_disk_bytes)
|
if (low_watermark >= m_settings.max_queued_disk_bytes)
|
||||||
low_watermark = m_settings.max_queued_disk_bytes / 2;
|
low_watermark = m_settings.max_queued_disk_bytes * 3 / 4;
|
||||||
|
|
||||||
if (m_queue_buffer_size < low_watermark
|
if (m_queue_buffer_size < low_watermark
|
||||||
|| m_settings.max_queued_disk_bytes > 0)
|
|| m_settings.max_queued_disk_bytes > 0)
|
||||||
|
|
|
@ -2572,7 +2572,7 @@ namespace aux {
|
||||||
if (p->send_buffer_size() > 100) ++peers_up_requests;
|
if (p->send_buffer_size() > 100) ++peers_up_requests;
|
||||||
|
|
||||||
int dl_bucket = 0;
|
int dl_bucket = 0;
|
||||||
int dl_rate = p->statistics().download_rate();
|
int dl_rate = p->statistics().payload_download_rate();
|
||||||
if (dl_rate == 0) dl_bucket = 0;
|
if (dl_rate == 0) dl_bucket = 0;
|
||||||
else if (dl_rate < 2000) dl_bucket = 1;
|
else if (dl_rate < 2000) dl_bucket = 1;
|
||||||
else if (dl_rate < 5000) dl_bucket = 2;
|
else if (dl_rate < 5000) dl_bucket = 2;
|
||||||
|
@ -2581,7 +2581,7 @@ namespace aux {
|
||||||
else if (dl_rate < 100000) dl_bucket = 5;
|
else if (dl_rate < 100000) dl_bucket = 5;
|
||||||
else dl_bucket = 6;
|
else dl_bucket = 6;
|
||||||
|
|
||||||
int ul_rate = p->statistics().upload_rate();
|
int ul_rate = p->statistics().payload_upload_rate();
|
||||||
int ul_bucket = 0;
|
int ul_bucket = 0;
|
||||||
if (ul_rate == 0) ul_bucket = 0;
|
if (ul_rate == 0) ul_bucket = 0;
|
||||||
else if (ul_rate < 2000) ul_bucket = 1;
|
else if (ul_rate < 2000) ul_bucket = 1;
|
||||||
|
|
Loading…
Reference in New Issue