[squid-users] A few questions about squid

From: Jordon Bedwell <jordon_at_envygeeks.com>
Date: Wed, 15 Sep 2010 17:50:03 -0500

I have a few questions about squid that the documentation doesn't seem
to cover easily, and some people don't seem to cover it when I do a
Google search, I hope I don't have to adjust the upstream source to get
what I want easily.

1.) When I use Squid as an accelerator it didn't accelerate anything, as
a matter of fact, I got less latency from PHP and Apache and even less
latency when I used NGINX and PHP vs. Squid accelerators. Even under
high loads.

2.) Is there a way I can force it to reduce latency? The entire goal of
the accelerator is to cache and reduce latency or to see if we could
reduce latency more. Before we were using homegrown solutions to
balance mixed with some patched Memcached severs to sync PHP Sessions.

3.) Is there a way to easily clear the cache? The entire cache? While
Squid claims it's not possible, we can clear it manually but I was
wondering if there might be a client that can do it?

A few notes: Squid has no way of knowing if PHP code is dynamic or
static since we don't serve PHP headers and we certainly don't serve
anything but Apache (Debian ~ EnvyGeeks) and NGINX (Debian ~ EnvyGeeks)
so even if it's PHP it looks as if it's a normal HTML file. We don't use
query strings at all, as a matter of fact if a query string is used the
server pretends it doesn't know what's going on.

We get the same latency from squid we do from Apache 2 so maybe I have
the configuration file wrong? I mean I might have it a bit confused
since I've just started working with squid extensively to see if we can
reduce latency more than we already have it reduced.

Squid can't blame the origin servers since they are accessed through the
local network with a local switch and each region has a matching
accelerator that attaches itself to local origin servers. Example: UK
has acc04, EU General has acc05-06 and US has acc01-03 each acc0* is a
squid server with several origin servers under it, previously it was our
homegrown balancer.

Squid CONF:

acl our_sites dstdomain example.com
http_access allow our_sites
http_port 0.0.0.0:80 accel defaultsite=example.com
cache_peer 0.0.0.1 parent 80 0 no-query originserver name=acc01
cache_peer 0.0.0.2 sibling 80 0 no-query originserver name=acc01
cache_peer 0.0.0.3 sibling 80 0 no-query originserver name=acc01
cache_peer 0.0.0.4 sibling 80 0 no-query originserver name=acc01
cache_peer 0.0.0.5 sibling 80 0 no-query originserver name=acc01
cache_peer_access acc01 allow our_sites
refresh_pattern . 60 100% 4320
hosts_file /etc/hosts
coredump_dir /var/spool/squid3
visible_hostname example.com
dns_defnames off
reply_header_access X-Cache deny all
reply_header_access X-Cache-Lookup deny all
reply_header_access Via deny all
cache_effective_user 101
cache_effective_group 103
minimum_object_size 0 KB
cache_mem 1000 MB

Hopefully somebody can help me figure out what's going on before I flip
the switch and go back to the way we used to have it, it's sad that I
can't figure out how to get it to accelerate...
Received on Wed Sep 15 2010 - 22:50:21 MDT

This archive was generated by hypermail 2.2.0 : Thu Sep 16 2010 - 12:00:03 MDT