Search squid archive

Re: TCP_HIT and TCP_MISS

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Guillaume Chartrand wrote:
-----Message d'origine-----
De : ferret@xxxxxxx [mailto:ferret@xxxxxxx] De la part de Chris Robertson
Envoyé : 20 mars 2008 21:21
À : squid-users@xxxxxxxxxxxxxxx
Objet : Re:  TCP_HIT and TCP_MISS

Guillaume Chartrand wrote:
I try the solution on the other post to increase file descriptor
I have 4096 when I do a ulimit -n
I recompile squid
Here what I have when I run squid -v
Squid Cache: Version 2.6.STABLE12
configure options:
No configure options at all? The default (last I checked) did not allow for support of aufs cache dirs.


I've just run ./configure
Without no other option. Now I look for enable aufs cache dir but I didn't find with option I need to enable. The only option who's near that it's
--with-aufs-threads=N_THREADS

If it's that option, how many threads should I put.


Personally I use "--enable-storeio=aufs,null,ufs", with a few other options (with-large-files, enable-snmp, enable-removal-policies=heap,lru). There is a message in the archives (somewhere, I can't find it right now) where Henrik explains that ufs is actually better for a lightly loaded cache (less overhead), but the blocking becomes a factor as the requests per second rise. For me it has become reflexive to suggest using aufs.

2008/03/18 09:11:01| NOTICE: no explicit transparent proxy support enabled. Assuming getsockname() works on >>intercepted conne
ctions
2008/03/18 09:11:01| WARNING: Forwarding loop detected for:
Client: 172.20.20.18 http_port: 172.20.20.18:3128
GET http://172.20.20.18:3128/design/motherbd/software/ias/updates.htm HTTP/1.0
Via: 1.0 squid.collanaud.qc.ca:3128 (squid/2.6.STABLE12)
X-Forwarded-For: 172.21.132.93
Host: 172.20.20.18:3128
Cache-Control: max-age=259200
Connection: keep-alive


So your router is intercepting Squid's traffic and redirecting it back to Squid. That's not so good. In a big way.

This was not addressed in your reply. Hopefully it was addressed on your network. I feel it's the real issue.

And here is some of my squid.conf
# Squid normally listens to port 3128
#http_port 3128
http_port 3128 transparent
#Default:
# cache_mem 8 MB
cache_mem 512 MB
#Default:
# maximum_object_size 4096 KB
maximum_object_size 25600 KB#Default:
cache_dir ufs /usr/local/squid/var/cache 2500 16 256       # this one is a symlink to another disk

A symlink, or is the other disk mounted here. No matter, but you should probably be using aufs, which you will have to compile support for.

It's a symlink only.

Interesting.  Any reason for using a symlink instead of a mount point?

cache_dir ufs /usr/local/squid/var/cache2 2500 16 256

So how much memory does this box have? You've dedicated about a GB of RAM for Squid alone (512 cache_mem + (5GB of cache_dir * 0.1)).

The machine is on VMware virtual machine and have 2 disk of 40GB each and 1GB of RAM

Ugh. My calculation was off by an order of magnitude. 5GB of cache will only take (on average) 50MB of memory. See http://wiki.squid-cache.org/SquidFaq/SquidMemory for more details. But be aware, squid does not put objects from the disk cache BACK into memory. Only objects fetched from the net are put in the memory cache.

all the other option is default value and I have some config for wccp

And apparently some url_rewriters (unless those are implied by using wccp...).
Yes I have SquidGuard configured with squid

Chris

Thank
Guillaume


[Index of Archives]     [Linux Audio Users]     [Samba]     [Big List of Linux Books]     [Linux USB]     [Yosemite News]

  Powered by Linux