Important performance patch II - Squid 1.2beta23 PL4

From: Stewart Forster <slf@dont-contact.us>
Date: Fri, 21 Aug 1998 16:10:50 +1000

Hiya,

Another important patch for HIGH loads. Someone mentioned once when we were
designing the automatic comm_select_incoming counters tuning code that we
should try not to check too often. I argued against that and I was wrong.
At high loads, the sheer load of polling starts to bite badly, and so the
below patch reduces the amount of polling needed. Now squid slows down more
sanely at really high loads (rather than brick wall). Ideally these values
should be configurable and called:

incoming_icp_average 6
incoming_http_average 4
min_icp_poll_cnt 8
min_http_poll_cnt 8

but I don't have the time to write this up. These values will definately
vary from site to site depending on the ICP/HHTP load ratio. The above
values work okay for us, but maybe not for everyone.....

The lower the poll_cnts will mean the more rapid the polling.
The lower the incoming_*_average will mean the more rapid the polling.
The min_*_poll_cnt will put a maximum limit on the rate of polls.

Stew.

--- comm_select.c 1998/08/20 22:37:13 1.1
+++ comm_select.c 1998/08/20 23:26:19
@@ -215,9 +215,9 @@
     if (nfds == 0)
        return;
     nevents = comm_check_incoming_poll_handlers(nfds, fds);
+ incoming_icp_interval = incoming_icp_interval + 6 - nevents;
+ if (incoming_icp_interval < 8)
+ incoming_icp_interval = 8;
- incoming_icp_interval = incoming_icp_interval + 1 - nevents;
- if (incoming_icp_interval < 0)
- incoming_icp_interval = 0;
     if (incoming_icp_interval > MAX_INCOMING_INTERVAL)
        incoming_icp_interval = MAX_INCOMING_INTERVAL;
     if (nevents > INCOMING_ICP_MAX)
@@ -241,9 +241,9 @@
        fds[nfds++] = HttpSockets[j];
     }
     nevents = comm_check_incoming_poll_handlers(nfds, fds);
+ incoming_http_interval = incoming_http_interval + 4 - nevents;
+ if (incoming_http_interval < 8)
+ incoming_http_interval = 8;
- incoming_http_interval = incoming_http_interval + 1 - nevents;
- if (incoming_http_interval < 0)
- incoming_http_interval = 0;
     if (incoming_http_interval > MAX_INCOMING_INTERVAL)
        incoming_http_interval = MAX_INCOMING_INTERVAL;
     if (nevents > INCOMING_HTTP_MAX)
Received on Tue Jul 29 2003 - 13:15:51 MDT

This archive was generated by hypermail pre-2.1.9 : Tue Dec 09 2003 - 16:11:51 MST