Pessoal, tenho um provedor aqui com uns 400 clientes, média ON diária de uns 150 clientes. Uso uma RB800 para o controle de banda e MAC, com redirect de proxy (direto sem intermedio do web cache do mk) numa maquina dedicada para um proxy Squid no Debian.
Sistema:
Debian Linux proxy 2.6.38-2-amd64 #1 SMP Sun May 8 13:51:57 UTC 2011 x86_64 GNU/Linux
Configuração da Maquina Servidora:
Link da Maquina: 3 ADSLs Modo PCC Mikrotik - 1x 8 Mbps e 2x 4 Mbps
2x Processadores
Intel(R) Core(TM)2 Duo CPU E7400@ 2.80GHz
cache size 3072 KB
2x HDs Samsung 320GB somados em RAID Striping
Desempenho no hdparm: (com o squid rodando)
Timing buffered disk reads: 614 MB in 3.01 seconds = 204.25 MB/sec
8GB RAM DDR2 800 Dual Channel
cache_mem 2GB
maximo objeto memoria = 2 MB
maximo objeto em disco = 32MB
250GB de cache de disco - sistema diskd
cache_dir diskd /var/spool/squid 250000 64 256 Q1=64 Q2=72
memory_replacement_policy heap GDSF
cache_replacement_policy heap LFUDA
demais configuracoes do squid sao as padroes
Aqui um grafico do MRTG do cache HIT do meu squid:
http://sgcu.dyndns.org:8090/link/proxy.html
Aqui o grafico de uso dos meus links:
http://sgcu.dyndns.org:8090/link/
Apos 10 dias de uso, tenho 70GB de cache de disco e no momento 4GB de RAM em utilizacao.
Abaixo informacoes do comando squidclient -p 3128 mgr:info
Connection information for squid:
Number of clients accessing cache: 2
Number of HTTP requests received: 6105418
Number of ICP messages received: 0
Number of ICP messages sent: 0
Number of queued ICP replies: 0
Number of HTCP messages received: 0
Number of HTCP messages sent: 0
Request failure ratio: 0.00
Average HTTP requests per minute since start: 1262.5
Average ICP messages per minute since start: 0.0
Select loop called: 128409021 times, 2.260 ms avg
Cache information for squid:
Request Hit Ratios: 5min: 34.5%, 60min: 36.4%
Byte Hit Ratios: 5min: 17.1%, 60min: 18.5%
Request Memory Hit Ratios: 5min: 33.2%, 60min: 36.1%
Request Disk Hit Ratios: 5min: 35.1%, 60min: 33.4%
Storage Swap size: 66424320 KB
Storage Mem size: 2047956 KB
Mean Object Size: 20.36 KB
Requests given to unlinkd: 260
Median Service Times (seconds) 5 min 60 min:
HTTP Requests (All): 0.39928 0.39928
Cache Misses: 0.49576 0.55240
Cache Hits: 0.00562 0.00286
Near Hits: 0.42149 0.33943
Not-Modified Replies: 0.00000 0.00000
DNS Lookups: 0.22276 0.23291
ICP Queries: 0.00000 0.00000
Resource usage for squid:
UP Time: 290158.425 seconds
CPU Time: 3640.924 seconds
CPU Usage: 1.25%
CPU Usage, 5 minute avg: 1.78%
CPU Usage, 60 minute avg: 1.94%
Process Data Segment Size via sbrk(): 3313480 KB
Maximum Resident Size: 13400400 KB
Page faults with physical i/o: 9
Memory usage for squid via mallinfo():
Total space in arena: -880824 KB
Ordinary blocks: -881559 KB 629 blks
Small blocks: 0 KB 0 blks
Holding blocks: 45084 KB 3 blks
Free Small blocks: 0 KB
Free Ordinary blocks: 734 KB
Total in use: -836475 KB 100%
Total free: 734 KB 0%
Total size: -835740 KB
Memory accounted for:
Total accounted: 2900451 KB
memPoolAlloc calls: 911542535
memPoolFree calls: 895689561
File descriptor usage for squid:
Maximum number of file descriptors: 1024
Largest file desc currently in use: 862
Number of file desc currently in use: 811
Files queued for open: 0
Available number of file descriptors: 213
Reserved number of file descriptors: 100
Store Disk files open: 0
IO loop method: epoll
Internal Data Structures:
3307731 StoreEntries
369453 StoreEntries with MemObjects
369359 Hot Object Cache Items
3262311 on-disk objects
Gostaria de compartilhar com voces todos essas informacoes acima, se estou com um bom proxy configurado ou se ha algo para melhorar a taxa de hits. So lembrando que nao tenho interesse algum em solucoes como ThunderCache, quero apenas o squid mesmo, algum ajuste fino de suas configuracoes apenas. Pois pelo que vi, tenho tanto de disco como de memoria uma taxa de 30% de sucesso em hits, isso eh muito ou ha algo ainda para ajustar?
Estou aberto a sugestoes. Abracos a todos da comunidade.