[squid-users] squid 3.0 not caching anything?

From: Michael Wolf <maw@dont-contact.us>
Date: Wed, 30 Jun 2004 20:11:03 -0400

Hi

I've been experimenting with squid 3.0, and am having trouble getting it
to consistently cache objects.

The versions of squid which I have tried are squid-3.0.PRE3 and squid-
3.0-PRE3-20040628.

I'm using a pretty basic squid.conf; the changes from the default which
I made do the following:
- tell the cache to use lots of memory
- make the maximum object size very big
- make the maximum object sized stored in memory fairly large
- make the cache dir fairly large, and to only have one subdirectory
- put the logs somewhere else
- turn off the auth_param stuff
- allow all clients access (http_access allow_all)

I've put the squid.conf I'm using at
http://primates.ximian.com/~maw/squid.conf.

Starting with a freshly initialised cache dir, I run this command:

    http_proxy=http://rc-qa-607:3128 wget \
    http://ftp.ximian.com/pub/mono/suse-91-i586/gecko-sharp-\
    0.5-2.ximian.9.1.i586.rpm

I see this in access.log:

    1088631792.599 94 164.99.121.54 TCP_MISS/200 21513 GET \
    http://ftp.ximian.com/pub/mono/suse-91-i586/gecko-sharp-0.5-\
    2.ximian.9.1.i586.rpm - DIRECT/64.14.94.167 application/x-rpm

and this in store.log:

    1088631792.598 SWAPOUT 00 00000000 A7942270C77FE574C0D80D9B911A7FC2\
    200 1088654996 1088218852 -1 application/x-rpm 21136/21136 \
    GET http://ftp.ximian.com/pub/mono/suse-91-i586/gecko-sharp-0.5-\
    .ximian.9.1.i586.rpm

When I run the wget command again, I get this in access.log:

    1088631886.394 316 164.99.121.54 TCP_CLIENT_REFRESH_MISS/200 \
    21513 GET http://ftp.ximian.com/pub/mono/suse-91-i586/gecko-sharp-\
    0.5-2.ximian.9.1.i586.rpm - DIRECT/64.14.94.167 application/x-rpm

and these two lines in store.log:

    1088631886.357 RELEASE 00 00000000 A7942270C77FE574C0D80D9B911A7FC2\
    200 1088654996 1088218852 -1 application/x-rpm 21136/21136 \
    GET http://ftp.ximian.com/pub/mono/suse-91-i586/gecko-sharp-0.5-\
    2.ximian.9.1.i586.rpm

    1088631886.392 SWAPOUT 00 00000001 A7942270C77FE574C0D80D9B911A7FC2\
    200 1088655090 1088218852 -1 application/x-rpm 21136/21136 \
    GET http://ftp.ximian.com/pub/mono/suse-91-i586/gecko-sharp-0.5-\
    2.ximian.9.1.i586.rpm

Subsequent requests yield the same thing.

The package I'm downloading is about 24k, well within the specified
range of object sizes.

It looks as though, on the first request, squid downloads the package
and writes it to disk. On the second request, squid flushes the package
from disk, downloads it, and writes it again.

I tried a build of squid-2.4-STABLE with a similar squid.conf, and it
works as expected; objects are cached and I see TCP_HITs in
access.log.

So, how do I get squid 3.0 to cache objects? Surely it's something
obvious, but I'm totally at wit's end now.

An unrelated question - what unit does maximum_object_size really take?
The comments around it say bytes, but the commented out default is "4096
KB". Is that therefore 4 megs, or is the KB ignored, or ...?

Thanks,

Received on Wed Jun 30 2004 - 18:11:35 MDT

This archive was generated by hypermail pre-2.1.9 : Thu Jul 01 2004 - 12:00:03 MDT