In message <199805270218.MAA19130@moto.off.connect.com.au>, Stewart Forster wri
tes:
> Hi Michael,
>
> The solution you propose will then suffer from starvation problems.
> If a machine is capable of being driven to maximum with ICP requests and
> responses, then there could arise situations where squid will starve (for
> short periods) its current TCP transactions while it gets busy dealing
> with ICP requests and replies.
Indeed. That should be a
for (loop = 0; loop < 16 ; ++loop) {
....
}
instead of a while (1). This should produce exactly the same behaviour
as calling comm_select_incoming() every time instead of every 16th
time, but saves you all the poll/select calls.
> Of course, another approach is not to even bother calling
> comm_poll_incoming and just call icpHandleUdp directly. It's a
> possibility and under high loads would be faster than doing a poll()
> which is almost always guaranteed to gave something waiting and then
> do a icpHandleUdp anyway. It may be possible to code this in a nice
> fashion where squid starts to discard certain checks (ie poll) once
> the load gets high enough in order to preserve CPU/system calls.
That's an interesting idea, and one I'd like to see carried a little
further.
Michael.
Received on Tue Jul 29 2003 - 13:15:50 MDT
This archive was generated by hypermail pre-2.1.9 : Tue Dec 09 2003 - 16:11:47 MST