Moçada fiz vários testes depois de ler esta mensagem e outras várias. De todo jeito o squid consome toda a memoria da maquina, mesmo setando cache_mem pra 16MB e cache_dir p/ 1024 16 256.
Usei ufs, aufs, diskd, etc. DISKD e AUFS teve melhor rendimento.
A máquina é dedicada para proxy.
Configuração:
HP Celeron D420
2 GB RAM 533mhz
2 HD SATA 3gb/s 10.000rpm 80 gb cada
Squid 2.5 STABLE14
Tinha uma maquina inferior como proxy rodando blz no mesmo squid.conf, troquei por esta nova ai começou a dar problemas.
Em todos os testes ele funciona muito bem, mas vai enchendo a memória toda, mesmo com pouca cache_mem e cache_dir.
Diminui tamanho dos objetos em cache, aumentei, Mudei a potilica de cache, e nada.
Segue squid.conf pra quem puder ajudar.
http_port 3128
hierarchy_stoplist cgi-bin ?
acl QUERY urlpath_regex cgi-bin \?
acl ANTIVIR urlpath_regex avginfowin.ctf update.def
no_cache deny QUERY
no_cache deny ANTIVIR
cache_mem 64 MB
cache_swap_low 90
cache_swap_high 95
minimum_object_size 0 KB
maximum_object_size 128 KB
maximum_object_size_in_memory 4 KB
cache_replacement_policy heap GDSF
memory_replacement_policy heap LFUDA
cache_dir aufs /var/spool/squid/cache01 1024 16 256
cache_access_log none
cache_log none
cache_store_log none
ftp_user
[email protected]
dns_timeout 2 minutes
dns_nameservers 201.10.120.3 201.10.128.3
refresh_pattern ^ftp: 1440 20% 10080
refresh_pattern ^gopher: 1440 0% 1440
refresh_pattern . 0 20% 4320
acl all src 0.0.0.0/0.0.0.0
acl manager proto cache_object
acl localhost src 127.0.0.1/255.255.255.255
acl to_localhost dst 127.0.0.0/8
acl SSL_ports port 443 563
acl Safe_ports port 80
acl Safe_ports port 21
acl Safe_ports port 443 563
acl CONNECT method CONNECT
acl cpd src 172.32.1.0/24
http_access allow manager localhost
http_access deny manager
http_access deny !Safe_ports
http_access deny CONNECT !SSL_ports
http_access allow localhost
http_access allow cpd
http_access deny all
http_reply_access allow all
icp_access allow all
reply_header_max_size 20 KB
reply_body_max_size 0 allow all
cache_mgr
[email protected]
visible_hostname srvproxy.empresa.com.br
httpd_accel_host virtual
httpd_accel_port 80
httpd_accel_with_proxy on
httpd_accel_uses_host_header on
coredump_dir /var/spool/squid