From c0cd0c6dfa85c4e116a3d54be7809deffc4b0fd8 Mon Sep 17 00:00:00 2001 From: Amos Jeffries Date: Fri, 31 Jul 2015 18:00:12 -0700 Subject: [PATCH] AUFS: Raise I/O queue congestion limits ... from 8 to 8196 before initial congestion message appears. Modern networks can be quite busy and even amateur installations have a much higher I/O throughput than Squid was originally designed for. This often results in a series of "Queue congestion" warnings appearing on startup before Squid learns what the local environment requires. The new limit helps to cater for this and reduce teh frequency of unnecessary warnings. They may still occur, so debug output is also updated to show what the queue length has grown to with each warning. Also updating the congestion counter from 32-bit to 64-bit unsigned since the new limit already consumes half the available growth bits in 32-bit integer. NP: this update was triggered by reports from admin with proxies needing to expand AIO queues to over 4K entries on startup. --- src/DiskIO/DiskThreads/aiops.cc | 6 +++--- src/DiskIO/DiskThreads/aiops_win32.cc | 6 +++--- 2 files changed, 6 insertions(+), 6 deletions(-) diff --git a/src/DiskIO/DiskThreads/aiops.cc b/src/DiskIO/DiskThreads/aiops.cc index 725c9f461a..0b7c7f6183 100644 --- a/src/DiskIO/DiskThreads/aiops.cc +++ b/src/DiskIO/DiskThreads/aiops.cc @@ -523,13 +523,13 @@ squidaio_queue_request(squidaio_request_t * request) } if (request_queue2.head) { - static int filter = 0; - static int filter_limit = 8; + static uint64_t filter = 0; + static uint64_t filter_limit = 8192; if (++filter >= filter_limit) { filter_limit += filter; filter = 0; - debugs(43, DBG_IMPORTANT, "squidaio_queue_request: WARNING - Queue congestion"); + debugs(43, DBG_IMPORTANT, "squidaio_queue_request: WARNING - Queue congestion (growing to " << filter_limit << ")"); } } diff --git a/src/DiskIO/DiskThreads/aiops_win32.cc b/src/DiskIO/DiskThreads/aiops_win32.cc index 9701e7cbb1..e9581e34b8 100644 --- a/src/DiskIO/DiskThreads/aiops_win32.cc +++ b/src/DiskIO/DiskThreads/aiops_win32.cc @@ -606,13 +606,13 @@ squidaio_queue_request(squidaio_request_t * request) } if (request_queue2.head) { - static int filter = 0; - static int filter_limit = 8; + static uint64_t filter = 0; + static uint64_t filter_limit = 8196; if (++filter >= filter_limit) { filter_limit += filter; filter = 0; - debugs(43, DBG_IMPORTANT, "squidaio_queue_request: WARNING - Queue congestion"); + debugs(43, DBG_IMPORTANT, "squidaio_queue_request: WARNING - Queue congestion (growing to " << filter_limit << ")"); } } -- 2.47.2