红联Linux门户
Linux帮助

centos6.7下运行squid

发布时间:2016-01-13 11:00:30来源:红联作者:最小的家伙
squid配置信息:
http_port 80 accel vhost
http_access allow all
cache_peer x.x.x.x parent 80 0 originserver round-robin weight=1
cache_peer x.x.x.x parent 80 0 originserver round-robin weight=1
cache_mem 21000 MB
refresh_pattern . 0 50% 4320 ignore-reload
maximum_object_size_in_memory 128000 KB
maximum_object_size 12800 KB
acl OverConnLimit maxconn 16
http_access deny OverConnLimit
cache_dir ufs /squid/cache/ 1000 16 256
acl picurl url_regex -i \.bmp$ \.png$ \.jpg$ \.gif$ \.jpeg$
acl mystie1 referer_regex -i happy.swjtu.edu.cn
http_access allow mystie1 picurl
acl nullref referer_regex -i ^$
http_access allow nullref
acl hasref referer_regex -i .+
acl managercache src x.x.x.x 127.0.0.1
acl Purge method PURGE
http_access allow managercache Purge
http_access deny Purge
visible_hostname huancun-1
cache_mgr 1184903719@qq.com



squid运行信息:
HTTP/1.0 200 OK
Server: squid/3.1.23
Mime-Version: 1.0
Date: Wed, 13 Jan 2016 02:54:54 GMT
Content-Type: text/plain
Expires: Wed, 13 Jan 2016 02:54:54 GMT
Last-Modified: Wed, 13 Jan 2016 02:54:54 GMT
X-Cache: MISS from huancun-1
X-Cache-Lookup: MISS from huancun-1:80
Via: 1.0 huancun-1 (squid/3.1.23)
Connection: close

Squid Object Cache: Version 3.1.23
Start Time: Wed, 13 Jan 2016 01:52:00 GMT
Current Time: Wed, 13 Jan 2016 02:54:54 GMT
Connection information for squid:
Number of clients accessing cache: 6
Number of HTTP requests received: 1018517
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: 16192.2
Average ICP messages per minute since start: 0.0
Select loop called: 13007966 times, 0.290 ms avg
Cache information for squid:
Hits as % of all requests: 5min: 52.9%, 60min: 47.6%
Hits as % of bytes sent: 5min: 61.3%, 60min: 55.7%
Memory hits as % of hit requests: 5min: 12.8%, 60min: 9.8%
Disk hits as % of hit requests: 5min: 43.5%, 60min: 50.8%
Storage Swap size: 7930064 KB
Storage Swap capacity: 36.9% used, 63.1% free
Storage Mem size: 4973884 KB
Storage Mem capacity: 23.4% used, 76.6% free
Mean Object Size: 24.74 KB
Requests given to unlinkd: 28239
Median Service Times (seconds) 5 min 60 min:
HTTP Requests (All): 0.00919 0.01235
Cache Misses: 0.03241 0.03241
Cache Hits: 0.00000 0.00000
Near Hits: 0.00562 0.00678
Not-Modified Replies: 0.00000 0.00000
DNS Lookups: 0.00000 0.00000
ICP Queries: 0.00000 0.00000
Resource usage for squid:
UP Time: 3774.108 seconds
CPU Time: 577.218 seconds
CPU Usage: 15.29%
CPU Usage, 5 minute avg: 14.87%
CPU Usage, 60 minute avg: 15.61%
Process Data Segment Size via sbrk(): 5617604 KB
Maximum Resident Size: 22865200 KB
Page faults with physical i/o: 0
Memory usage for squid via mallinfo():
Total space in arena: 1423432 KB
Ordinary blocks: 1422827 KB 199 blks
Small blocks: 0 KB 0 blks
Holding blocks: 346320 KB 11 blks
Free Small blocks: 0 KB
Free Ordinary blocks: 604 KB
Total in use: 1769147 KB 100%
Total free: 605 KB 0%
Total size: 1769752 KB
Memory accounted for:
Total accounted: 1231463 KB 70%
memPool accounted: 5425767 KB 307%
memPool unaccounted: -3656015 KB 0%
memPoolAlloc calls: 265325491
memPoolFree calls: 265936491
File descriptor usage for squid:
Maximum number of file descriptors: 655350
Largest file desc currently in use: 1351
Number of file desc currently in use: 1026
Files queued for open: 0
Available number of file descriptors: 654324
Reserved number of file descriptors: 100
Store Disk files open: 2
Internal Data Structures:
320913 StoreEntries
195219 StoreEntries with MemObjects
194815 Hot Object Cache Items
320485 on-disk objects

cache.log日志:
2016/01/13 09:57:40| temporary disabling (Not Found) digest from 172.16.10.101
2016/01/13 09:58:40| temporary disabling (Not Found) digest from 172.16.10.102
2016/01/13 10:02:40| temporary disabling (Not Found) digest from 172.16.10.101
2016/01/13 10:03:40| temporary disabling (Not Found) digest from 172.16.10.102
2016/01/13 10:12:40| temporary disabling (Not Found) digest from 172.16.10.101
2016/01/13 10:13:40| temporary disabling (Not Found) digest from 172.16.10.102
2016/01/13 10:32:40| temporary disabling (Not Found) digest from 172.16.10.101
2016/01/13 10:33:40| temporary disabling (Not Found) digest from 172.16.10.102
2016/01/13 10:49:12| clientIfRangeMatch: Weak ETags are not allowed in If-Range: "5754-1421033139222" ? "5754-1421033139222"

为什么命中率这么低??
Total accounted: 1231463 KB 70%
memPool accounted: 5425767 KB 307%
memPool unaccounted: -3656015 KB 0%
memPoolAlloc calls: 265325491为什么是负数??这个是什么意思???
文章评论

共有 0 条评论