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

From: O'Brien, Kevin <Kevin.OBrien@dont-contact.us>
Date: Fri, 26 May 2006 11:38:47 -0700

You need to put the epoll patch and bootstrap.sh before the other
patches. Bootstrap.sh will rebuild the configure script so any patches
done before bootstrap.sh is run will be lost. Here's what my %prep
section looks like:

%prep
%setup -q
%if %{with_epoll}
%patch9 -p1 -b .epoll
./bootstrap.sh
%endif
%patch1 -p1 -b .config
%patch3 -p1 -b .location
%patch4 -p1 -b .build
%patch5 -p1 -b .perlpath
%patch6 -p1 -b .pipe
%patch7 -p1 -b .config

P.S. I've configured my spec file to allow me to build with or without
epoll using rpmbuild -ba --with epoll squid.spec or rpmbuild -ba --with
epoll squid.spec.

-=Kevin=-

-----Original Message-----
From: John Horne [mailto:john.horne@plymouth.ac.uk]
Sent: Friday, May 26, 2006 4:11 AM
To: Squid Users
Subject: Re: [squid-users] squid performance epoll. 350req/sec 100% cpu

On Thu, 2006-05-25 at 08:06 +0800, Steven Wilton wrote:
>
> 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.
>
Yes the patch itself has been applied with no errors, but it (epoll) is
not necessarily being used. The
file /usr/src/redhat/BUILD/squid-2.5.STABLE13/include/autoconf.h after
installing the patch and running configure, but not running
bootstrap.sh, doesn't contain the lines:

   /*
    * Supports epoll
    */
   #define HAVE_EPOLL 1

So the patch is applied but epoll is not being used.

> Check that your sysem supports epoll (linux 2.6 kernel)
>
It's a 2.6.16 kernel - Fedora Core 4 linux.

> and make sure you have --enable-epoll as an option to configure.
>
Yup, that's enabled as well as --disable-poll.

I have modified the squid.spec file to run bootstrap.sh just before
configure. Whilst this seems to be okay (bootstrap.sh runs okay;
configure runs okay), I now get errors from the rpmbuild near the end:

RPM build errors:
    File not found: /var/tmp/squid-2.5.STABLE13-root/etc/squid/mib.txt
    File not found: /var/tmp/squid-2.5.STABLE13-root/usr/share/squid

It seems that the bootstrap.sh script has changed something such that
the file /usr/src/redhat/BUILD/squid-2.5.STABLE13/src/Makefile changes
from containing

    DEFAULT_MIB_PATH = $(sysconfdir)/mib.txt
to
    DEFAULT_MIB_PATH = $(datadir)/mib.txt

I'm not really familiar with the aclocal/autoconf/automake commands so
this will need a bit of investigating to see why the file location has
changed.

John.

-- 
---------------------------------------------------------------
John Horne, University of Plymouth, UK  Tel: +44 (0)1752 233914
E-mail: John.Horne@plymouth.ac.uk       Fax: +44 (0)1752 233839
Received on Fri May 26 2006 - 12:39:20 MDT

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