]> git.ipfire.org Git - thirdparty/squid.git/commitdiff
AUFS: Raise I/O queue congestion limits
authorAmos Jeffries <squid3@treenet.co.nz>
Fri, 24 Jul 2015 13:32:26 +0000 (06:32 -0700)
committerAmos Jeffries <squid3@treenet.co.nz>
Fri, 24 Jul 2015 13:32:26 +0000 (06:32 -0700)
... 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
src/DiskIO/DiskThreads/aiops_win32.cc

index b014c172d31d4224254b06180510b07a6b6d3002..cacac2a07daf5aeb30c7c1a35e0768133328a5f4 100644 (file)
@@ -500,13 +500,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 << ")");
         }
     }
 
index 7ad34ea38eb69484ffd52c1d8a420d4e257e2fcd..ccaddf90adbf1c6e53512dad85d16d5e7395f5ae 100644 (file)
@@ -581,13 +581,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 << ")");
         }
     }