免费注册 查看新帖 |

Chinaunix

  平台 论坛 博客 文库
最近访问板块 发新帖
查看: 5240 | 回复: 4
打印 上一主题 下一主题

squid网关服务器透明代理cache hit命中率很低,网关服务器丢包率也很高 [复制链接]

论坛徽章:
0
跳转到指定楼层
1 [收藏(0)] [报告]
发表于 2010-10-26 10:03 |只看该作者 |倒序浏览
# squidclient -h host-squid-01 -p 3128 mgr:info  
HTTP/1.0 200 OK
Server: squid/2.6.STABLE21
Date: Tue, 26 Oct 2010 01:55:42 GMT
Content-Type: text/plain
Expires: Tue, 26 Oct 2010 01:55:42 GMT
Last-Modified: Tue, 26 Oct 2010 01:55:42 GMT
X-Cache: MISS from jrcz-gw-01
X-Cache-Lookup: MISS from jrcz-gw-01:3128
Via: 1.0 host-squid-01:3128 (squid/2.6.STABLE21)
Proxy-Connection: close

Squid Object Cache: Version 2.6.STABLE21
Start Time:     Mon, 25 Oct 2010 05:00:00 GMT
Current Time:   Tue, 26 Oct 2010 01:55:42 GMT
Connection information for squid:
        Number of clients accessing cache:      43
        Number of HTTP requests received:       213934
        Number of ICP messages received:        0
        Number of ICP messages sent:    0
        Number of queued ICP replies:   0
        Request failure ratio:   0.00
        Average HTTP requests per minute since start:   170.4
        Average ICP messages per minute since start:    0.0
        Select loop called: 3648381 times, 20.651 ms avg
Cache information for squid:
        Request Hit Ratios:     5min: 23.9%, 60min: 24.2%
        Byte Hit Ratios:        5min: 13.7%, 60min: 11.3%
        Request Memory Hit Ratios:      5min: 21.9%, 60min: 14.3%
        Request Disk Hit Ratios:        5min: 38.6%, 60min: 36.5%
        Storage Swap size:      1776760 KB
        Storage Mem size:       65488 KB
        Mean Object Size:       15.78 KB
        Requests given to unlinkd:      7510
Median Service Times (seconds)  5 min    60 min:
        HTTP Requests (All):   0.22004  0.35832
        Cache Misses:          0.35832  0.58309
        Cache Hits:            0.00091  0.00179    //怎么我的squid透明代理命中率这么低啊,只有0.091%--0.179%?
        Near Hits:             0.22004  0.44492
        Not-Modified Replies:  0.00091  0.00091
        DNS Lookups:           0.11926  0.36346
        ICP Queries:           0.00000  0.00000
Resource usage for squid:
        UP Time:        75342.146 seconds
        CPU Time:       334.829 seconds
        CPU Usage:      0.44%
        CPU Usage, 5 minute avg:        1.70%
        CPU Usage, 60 minute avg:       2.01%
        Process Data Segment Size via sbrk(): 101516 KB
        Maximum Resident Size: 0 KB
        Page faults with physical i/o: 1
Memory usage for squid via mallinfo():
        Total space in arena:  101648 KB
        Ordinary blocks:       100744 KB    290 blks
        Small blocks:               0 KB      0 blks
        Holding blocks:           244 KB      1 blks
        Free Small blocks:          0 KB
        Free Ordinary blocks:     903 KB
        Total in use:          100988 KB 99%
        Total free:               903 KB 1%
        Total size:            101892 KB
Memory accounted for:
        Total accounted:        91028 KB
        memPoolAlloc calls: 28820306
        memPoolFree calls: 28166509
File descriptor usage for squid:
        Maximum number of file descriptors:   1024
        Largest file desc currently in use:    538
        Number of file desc currently in use:  320
        Files queued for open:                   0
        Available number of file descriptors:  704
        Reserved number of file descriptors:   100
        Store Disk files open:                   0
        IO loop method:                     epoll
Internal Data Structures:
        113092 StoreEntries
         13297 StoreEntries with MemObjects
         13261 Hot Object Cache Items
        112595 on-disk objects


***************************************************************
   Cache Hits:            0.00091  0.00179    //怎么我的squid透明代理命中率这么低啊,只有0.091%--0.179%?
大虾帮忙给分析一下,谢谢!~

论坛徽章:
0
2 [报告]
发表于 2010-10-27 09:21 |只看该作者
昨天把squid-graph装上,从页面监控流量显示cache_hit的命中率,好象比昨天要高一些,基本在30%左右!!

论坛徽章:
0
3 [报告]
发表于 2010-10-28 08:58 |只看该作者
找到cach_hit命中率低的原因了:我的squid.conf配置文件中,cache_mem 64 MB,这个值设置的太低,网上建议应该设置为内存的1/3大小,之后,将其改为cache_mem 600 MB后,用命令: squidclient -h host-squid-01 -p 3128 mgr:info结果如下:

Median Service Times (seconds)  5 min    60 min:
        HTTP Requests (All):   0.12783  0.13498
        Cache Misses:          0.24524  0.30459
        Cache Hits:            0.00865  0.00562  //cach_hit命中率86.5%
        Near Hits:             0.17711  0.18699
        Not-Modified Replies:  0.00286  0.00286
        DNS Lookups:           0.04237  0.04639
        ICP Queries:           0.00000  0.00000

论坛徽章:
0
4 [报告]
发表于 2012-02-20 18:11 |只看该作者
我是跟你一定的问题,我的代理跟你一样,是为内网提供服务的。但是还是出现你一样问题,我的本身已经是512MB了,是什么原因呢

论坛徽章:
0
5 [报告]
发表于 2014-11-28 10:42 |只看该作者
所谓命中率低是不是,和丢包一样的情况????
您需要登录后才可以回帖 登录 | 注册

本版积分规则 发表回复

  

北京盛拓优讯信息技术有限公司. 版权所有 京ICP备16024965号-6 北京市公安局海淀分局网监中心备案编号:11010802020122 niuxiaotong@pcpop.com 17352615567
未成年举报专区
中国互联网协会会员  联系我们:huangweiwei@itpub.net
感谢所有关心和支持过ChinaUnix的朋友们 转载本站内容请注明原作者名及出处

清除 Cookies - ChinaUnix - Archiver - WAP - TOP