[SunHELP] Squid is slow

Josh Kuperman josh at ssimr.com
Sat Jul 5 13:04:52 CDT 2003


On Fri, Jul 04, 2003 at 09:13:28PM -0400, Charles Shannon Hendrix wrote:
> On Fri, Jul 04, 2003 at 06:13:30PM +0200, Patrick Marquetecken wrote:
> > On Fri, 4 Jul 2003 10:56:03 -0400
> > Charles Shannon Hendrix <shannon at widomaker.com> wrote:
> > 
> > > On Thu, Jul 03, 2003 at 08:51:54AM +0200, Patrick Marquetecken wrote:
> > > > Hi,
> > > > 
> > > > I have installed squid, on a sparc4 with 88Mb ram and sol 2.6 and find
> > > > it extreemly slow. Could this be because this is a 'slow' machine with
> > > > not mutch ram?
> > > 
> > > What kind of network connection does this machine have?
> > 10Mbit
> 
> You have 10Mbit to the outside world, or is this just your LAN?
> 
> > > How many clients are using the cache?
> > > 
> > 1
> > > How bit is the cache?
> > >
> > 1024 mb 
> 
> This should not be slow.
> 
> I have 2.5GB of cache on an SS5 and generally keep squid at around 32MB,
> and it has 9 redirectors running ad-zapper.  Seems plenty fast.


I use Squid to manage a public library getting decent results with a
75MHz Pentium machine -- and I will suggest the following two things
to test:

1. Up the cachemem memory setting. I believe it is small for a 2G
   cache. In general you start with the defaults to get a baseline
   or take a look at the FAQs, Web Sites, and mailing list archives,
   for squid to decide what changes to make.

2. This is more important. Remove the redirectors. If you have an
   acl for a test machine you can even use the "redirector
   access_deny" directive to see what happens without them.  BTW,
   when you say you have 9 redirectors is that really 9 distinct
   programs using OPEN2, perl script or you simply have 9 child
   processes. If the latter you might try setting it back down to
   the default 5.


Depending on what your redirector does, it can slow squid down. You
can even write a stupid one using then framwork below. Using 'sleep
5;' will effectively kill your squid even though everything will in
fact be working. As is it should be a fast redirector.

#!/usr/bin/perl
# Redirect from the FAQ
$|=1;
while (<>) {
#		(time killing function of your choice)	
    print;
}

You can also try, prefilling the cache with wget and stopping squid from checking for updated web pages if it has cached the page recently. Check the squid pages and FAQs.

-- 
Josh Kuperman
josh at ssimr.com



More information about the SunHELP mailing list