Re: What's wrong with my Squid?

From: Oskar Pearson <oskar@dont-contact.us>
Date: Tue, 28 Apr 1998 17:28:21 +0200

Hi

I think that you are hitting problems with "open/close" latency.
Squid-1.2 with threads might be the only option. For more info look
at www.linux.org.za/squid/ for more info on squid-1.2

Thanks to Michael O'Reilly for my original help with this:

Find your squid-PID.

run:
strace -oz -T -p <squid-PID>

wait a couple of minutes.

run:
./elapcount < z

Here is elapcount.pl:
--------------------
#!/usr/bin/perl

while (<>) {
        /^([a-z0-9]*)\(.*<([^>]*)>$/ or (print($_), next);
        $diff = $2; $syscall = $1;
        $map{$syscall} += $diff;
        $count{$syscall} ++;
        $total += $diff;
}
printf "%20s %5s %12s %12s %2s\n",
        'System call','Count','Total time','Time per call','% total';
foreach $i (sort { $map{$a} <=> $map{$b} } keys %map) {
        printf "%20s %5d %12.4f %12.6f %2.5f\n",
                $i, $count{$i}, $map{$i}, $map{$i} / $count{$i},
                $map{$i} / $total * 100;
}
print "Total time elapsed: $total\n";
--------------------

You will get some kind of info on what is causing squid to slow
down like it is... it'll probably be "close(), open()" and various
others to a lesser degree..

If it's the above, try giving squid-1.2beta20 a go... it's really stable
once you get the threads library sorted.

> 30 MB of RAM in squid.conf, I do plan to add RAM to the system but didn't
Try lowering that...

Also, try remounting your FS with "no_atime":

[root@cache2 /root]# grep atime /etc/rc.d/rc.local
echo "turning noatime support on"
mount -oremount,noatime /dev/md0

Oskar

---
"Haven't slept at all. I don't see why people insist on sleeping. You feel
so much better if you don't. And how can anyone want to lose a minute -
a single minute of being alive?"				-- Think Twice
Received on Tue Apr 28 1998 - 08:32:22 MDT

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