Re: [squid-users] Squid Performance Issues - reproduced

From: Andres Kroonmaa <andre@dont-contact.us>
Date: Thu, 2 Jan 2003 15:20:57 +0200

On 2 Jan 2003, at 19:28, Robert Collins <robertc@squid-cache.org> wrote:

> On Thu, 2003-01-02 at 16:02, Henrik Nordstrom wrote:
>
> > Wait a minute.. yes, naturally. This will quite likely happen on an aufs
> > Squid which has nothing to do as the I/O queue is only polled once per
> > comm loop, and an "idle" comm loop runs at 100/s. The question is more
> > why it does not always happen, and why it is 200KB/s and not 400KB/s.
> > What can be said is also that the likelyhood that this won't happen
> > decreases a lot on SMP machines as the main thread then have no
> > copmetition with the I/O threads for the CPU.
>
> I have a suggestion. If there are queued disk IO's, set the comm_timeout
> lower than 100.

 Isn't it already reduced to 10ms if aufs is compiled?
 It won't help below systick time. Its how poll() handles timeout value.
 Timeout has granularity of systick, thus if poll blocks, it will not
 return until next systick no matter what timeout value. If there appears
 some ready FD while poll is blocked, it may return earlier, but not
 guaranteed. If system OS is busy with other stuff, it will be handled
 before unblocking poll.
 Bottomline is that poll(0,0,1) will return in 10ms earliest, and quite
 often in 15-20ms.
 So commloop that blocks in poll cannot do more that 100Hz polls.
 The only way to return earlier from poll is to make some FD ready
 from io-thread or change systick frequency.

> We current service store IO's, then do any queued comm callbacks. That
> may result in more storeIO's being queued, so waiting for the comm
> system becomes a performance limit.
>
> Another possibility is to do a decaying average of the last -say 100-
> comm_select call return times as a % of the timeout, and reduce the
> handed timeout to that %. That will result in no reduction when
> comm_select() times out, and will quickly reduce the timeout when it
> does return within the timeout.

------------------------------------
 Andres Kroonmaa <andre@online.ee>
 CTO, Microlink Data AS
 Tel: 6501 731, Fax: 6501 725
 Pärnu mnt. 158, Tallinn
 11317 Estonia
Received on Thu Jan 02 2003 - 06:30:30 MST

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