Re: [squid-users] squid performance epoll. 350req/sec 100% cpu

From: Steven Wilton <swilton@dont-contact.us>
Date: Thu, 25 May 2006 08:06:53 +0800

----- Original Message -----
From: "John Horne" <john.horne@plymouth.ac.uk>
To: "Squid Users" <squid-users@squid-cache.org>
Sent: Wednesday, May 24, 2006 11:10 PM
Subject: Re: [squid-users] squid performance epoll. 350req/sec 100% cpu

> On Wed, 2006-05-24 at 16:37 +0200, Henrik Nordstrom wrote:
>> ons 2006-05-24 klockan 14:45 +0100 skrev John Horne:
>>
>> > Can I jump in and ask if the bootstrap script needs to be run when
>> > installing on a Fedora Core 4 linux system using the squid SRPM?
>>
>>
>> If the SRPM spec includes patches which modifies configure.in,
>> Makefile.am or any other autotool config file then yes, it needs to
>> bootstrap the source tree before compile. Either by running the
>> bootstrap.sh script or manually invoking the autotool programs
>> separately.
>>
> In which case, and as far as I can tell, the bootstrap script doesn't
> need to be run in this instance.
>
> Also, grepping the squid source, it seems that only the epoll patch
> makes use of ENTRY_DEFER_READ. Since this appears in our log files epoll
> must be being used.
>
> Having said that though, I have just run strace on the main squid pid
> and captured the output to a file. I let it run for a couple of minutes
> - we have a busy cache - so the file was getting big. The file contains
> no mention of poll/epoll but lots of 'select' (over 30,000).
>
> It is very confusing that our squid seems to have the epoll patch
> included, but is using select as well as producing error messages
> produced by the epoll patch.
>
> Any ideas as to what is going on here?
>

The epoll patch does add the ENTRY_DEFER_READ flag to connections regardless
of whether epoll is actually being used or not. This flag allows squid to
skip a few tests in the deferred handler. The presence of these messages in
your cache log shows that you've applied the epoll patch successfully.

Check that your sysem supports epoll (linux 2.6 kernel) and make sure you
have --enable-epoll as an option to configure. The epoll patch will
download and compile an epoll library if the glibc headers do not support
epoll. For this library to compile, a 2.6 kernel source must be present in
/usr/src/linux.

Steven
Received on Wed May 24 2006 - 18:06:14 MDT

This archive was generated by hypermail pre-2.1.9 : Thu Jun 01 2006 - 12:00:02 MDT