squid停顿20秒左右无响应
本帖最后由 石头玩儿 于 2011-05-28 10:09 编辑
我是用windows下的squid做普通代理上网。上网速度还不错,但是squid运行一段时间后总后停顿20秒左右无响应(什么网站都打不开,20几秒后又恢复正常)以下是我的配置,敬候高手帮助
negative_ttl 1 second
max_open_disk_fds 0
minimum_object_size 4 KB
maximum_object_size 512 MB
#取消优酷视频的seek功能
acl url_deny urlpath_regex -i \.flv\?start
http_access deny url_deny
###############################################
acl manager proto cache_object
acl localhost src 127.0.0.1/32
acl to_localhost dst 127.0.0.0/8 0.0.0.0/32
acl localnet src 10.0.0.0/8 # RFC1918 possible internal network
acl localnet src 172.16.0.0/12 # RFC1918 possible internal network
acl localnet src 192.168.0.0/16 # RFC1918 possible internal network
acl SSL_ports port 443
acl Safe_ports port 80 # http
acl Safe_ports port 21 # ftp
acl Safe_ports port 443 # https
acl Safe_ports port 70 # gopher
acl Safe_ports port 210 # wais
acl Safe_ports port 1025-65535 # unregistered ports
acl Safe_ports port 280 # http-mgmt
acl Safe_ports port 488 # gss-http
acl Safe_ports port 591 # filemaker
acl Safe_ports port 777 # multiling http
acl CONNECT method CONNECT
http_access allow manager localhost
http_access deny manager
http_access deny !Safe_ports
http_access deny CONNECT !SSL_ports
http_access allow localnet
http_access deny all
http_reply_access allow all
icp_access allow all
icp_access deny all
http_port 3128
hierarchy_stoplist cgi-bin ?
################################################
acl LocalServers dstdomain qzonestyle.gtimg.cn
acl LocalServers dstdomain ossweb-img.qq.com
acl LocalServers dstdomain ctc.qzs.qq.com
acl LocalServers dstdomain ctc.appimg.qq.com
acl LocalServers dstdomain ctc.qzonestyle.gtimg.cn
acl LocalServers dstdomain ptlogin2.qq.com
acl LocalServers dstdomain mcbase.qzone.qq.com
acl LocalServers dstdomain baike.bdimg.com
acl LocalServers dstdomain rescdn.qqmail.com
acl LocalServers dstdomain fodder.tc.qq.com
acl LocalServers dstdomain login.taobao.com
acl LocalServers dstdomain update.xyq.163.com
acl LocalServers dstdomain xyq.163.com
acl LocalServers dstdomain update.mmog.163.com
acl LocalServers dstdomain zt.ztgame.com
no_cache deny LocalServers
visible_hostname none
refresh_pattern -i \.gif$ 14400 88% 43200 ignore-reload
refresh_pattern -i \.jpg$ 14400 88% 43200 ignore-reload
refresh_pattern -i \.jpeg$ 14400 88% 43200 ignore-reload
refresh_pattern -i \.png$ 14400 88% 43200 ignore-reload
refresh_pattern -i \.ico$ 14400 88% 43200 ignore-reload
refresh_pattern -i \.mp3$ 14400 88% 43200 override-expire ignore-reload
refresh_pattern -i \.mp4$ 14400 88% 144000 override-expire ignore-reload
refresh_pattern -i \.wmv$ 14400 88% 43200 override-expire ignore-reload
refresh_pattern -i \.avi$ 14400 88% 43200 override-expire ignore-reload
refresh_pattern -i \.rmvb$ 14400 88% 43200 override-expire ignore-reload
refresh_pattern -i \.rm$ 14400 88% 43200 override-expire ignore-reload
refresh_pattern -i \.swf$ 14400 88% 43200 override-expire ignore-reload
refresh_pattern -i \.flv$ 14400 88% 144000 override-expire ignore-reload
refresh_pattern -i \.f4v$ 14400 88% 144000 override-expire ignore-reload
refresh_pattern -i \.mpeg$ 14400 88% 43200 override-expire ignore-reload
refresh_pattern -i \.wma$ 14400 88% 43200 override-expire ignore-reload
refresh_pattern -i \.exe$ 1440 88% 5760 override-expire ignore-reload
refresh_pattern -i \.rar$ 1440 88% 5760 override-expire ignore-reload
refresh_pattern -i \.cab$ 1440 88% 5760 override-expire ignore-reload
refresh_pattern -i \.bat$ 1440 88% 5760 override-expire ignore-reload
refresh_pattern -i \.zip$ 1440 88% 5760 override-expire ignore-reload
refresh_pattern -i \.txt$ 1440 88% 5760 override-expire ignore-reload
refresh_pattern -i \.css$ 1440 88% 4320 override-expire ignore-reload
refresh_pattern -i \.js$ 1440 88% 4320 override-expire ignore-reload
refresh_pattern -i \.vbs$ 1440 88% 4320 override-expire ignore-reload
refresh_pattern -i \.mp3\? 14400 88% 43200 override-expire ignore-reload
refresh_pattern -i \.mp4\? 14400 88% 144000 override-expire ignore-reload
refresh_pattern -i \.swf\? 14400 88% 43200 override-expire ignore-reload
refresh_pattern -i \.flv\? 14400 88% 144000 override-expire ignore-reload
refresh_pattern -i \.f4v\? 14400 88% 144000 override-expire ignore-reload
refresh_pattern \.flv\?start 0 0% 0
refresh_pattern \.flv\?ref 0 0% 0
refresh_pattern \.f4v\?ref 0 0% 0
refresh_pattern \.mp4\?ref 0 0% 0
refresh_pattern ^ftp: 1440 20% 10080
refresh_pattern ^gopher: 1440 0% 1440
refresh_pattern -i (/cgi-bin/|\?) 0 0% 0
refresh_pattern . 0 20% 4320
memory_replacement_policy lru
maximum_object_size_in_memory 1024 KB
ipcache_size 4096
ipcache_low 90
ipcache_high 95
fqdncache_size 4096
cache_replacement_policy heap LFUDA
########500G的硬盘#########
cache_dir ufs g:\cache_a 18000 16 256
cache_dir ufs g:\cache_b 18000 16 256
cache_dir ufs g:\cache_c 18000 16 256
cache_dir ufs g:\cache_d 18000 16 256
cache_dir ufs g:\cache_e 18000 16 256
cache_dir ufs g:\cache_f 18000 16 256
cache_dir ufs g:\cache_g 18000 16 256
cache_dir ufs g:\cache_h 18000 16 256
cache_dir ufs g:\cache_i 18000 16 256
cache_dir ufs g:\cache_j 18000 16 256
cache_dir ufs g:\cache_k 18000 16 256
cache_dir ufs g:\cache_l 18000 16 256
cache_dir ufs g:\cache_m 18000 16 256
cache_dir ufs g:\cache_n 18000 16 256
cache_dir ufs g:\cache_o 18000 16 256
cache_dir ufs g:\cache_p 18000 16 256
cache_dir ufs g:\cache_q 18000 16 256
cache_dir ufs g:\cache_r 18000 16 256
cache_dir ufs g:\cache_s 18000 16 256
cache_dir ufs g:\cache_t 18000 16 256
cache_dir ufs g:\cache_u 18000 16 256
cache_dir ufs g:\cache_v 18000 16 256
cache_dir ufs g:\cache_w 18000 16 256
cache_dir ufs g:\cache_x 18000 16 256
cache_dir ufs g:\cache_y 18000 16 256
cache_dir ufs g:\cache_z 18000 16 256
cache_mem 1792 MB
cache_swap_low 90
cache_swap_high 95
cache_log null
cache_store_log none
access_log null
HTTP/1.0 200 OK
Server: squid/3.0.STABLE23-BZR
Mime-Version: 1.0
Date: Fri, 27 May 2011 01:53:17 GMT
Content-Type: text/plain
Expires: Fri, 27 May 2011 01:53:17 GMT
Last-Modified: Fri, 27 May 2011 01:53:17 GMT
X-Cache: MISS from none
X-Cache-Lookup: MISS from none:3128
Via: 1.0 none (squid/3.0.STABLE23-BZR)
Proxy-Connection: close
Squid Object Cache: Version 3.0.STABLE23-BZR
Running as Squid Windows System Service on Windows Server 2003
Service command line is:
Start Time: Thu, 26 May 2011 16:52:54 GMT
Current Time: Fri, 27 May 2011 01:53:17 GMT
Connection information for squid:
Number of clients accessing cache: 20
Number of HTTP requests received: 36577
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: 67.7
Average ICP messages per minute since start: 0.0
Select loop called: 4117856 times, 7.874 ms avg
Cache information for squid:
Hits as % of all requests: 5min: 1.0%, 60min: 19.1%
Hits as % of bytes sent: 5min: 0.1%, 60min: 8.6%
Memory hits as % of hit requests: 5min: 0.0%, 60min: 1.7%
Disk hits as % of hit requests: 5min: 100.0%, 60min: 54.2%
Storage Swap size: 75784672 KB
Storage Swap capacity: 15.8% used, 84.2% free
Storage Mem size: 111724 KB
Storage Mem capacity: 6.1% used, 93.9% free
Mean Object Size: 132.12 KB
Requests given to unlinkd: 739
Median Service Times (seconds) 5 min 60 min:
HTTP Requests (All): 0.23230 0.12106
Cache Misses: 0.23230 0.14252
Cache Hits: 0.05951 0.01847
Near Hits: 0.00000 0.15048
Not-Modified Replies: 0.00000 0.00000
DNS Lookups: 0.00949 0.00949
ICP Queries: 0.00000 0.00000
Resource usage for squid:
UP Time: 32423.373 seconds
CPU Time: 118.080 seconds
CPU Usage: 0.36%
CPU Usage, 5 minute avg: 2.39%
CPU Usage, 60 minute avg: 1.41%
Maximum Resident Size: 207668 KB
Page faults with physical i/o: 62882
Memory accounted for:
Total accounted: 166297 KB
memPoolAlloc calls: 11781767
memPoolFree calls: 10493545
File descriptor usage for squid:
Maximum number of file descriptors: 2048
Largest file desc currently in use: 101
Number of file desc currently in use: 56
Files queued for open: 0
Available number of file descriptors: 1992
Reserved number of file descriptors: 100
Store Disk files open: 1
Internal Data Structures:
573737 StoreEntries
3265 StoreEntries with MemObjects
3253 Hot Object Cache Items
573617 on-disk objects
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(3)
高手啊高手出来指点一下吧!!
看样子此论坛已无高手,悲哀多次发贴无人应
这个兄弟恁是心急了
为何弄这么多cache_dir呢?
官方建议一个物理磁盘仅设置一个Cache目录,不然反而会降低I/O效率。