免费注册 查看新帖 |

Chinaunix

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

[proxy] 晒晒squid命中率 [复制链接]

论坛徽章:
0
跳转到指定楼层
1 [收藏(0)] [报告]
发表于 2009-02-06 10:39 |只看该作者 |倒序浏览
RHEL4X86_64  apache2.2.10+squid-2.6.STABLE22
全静态页面
apache采用deflate 压缩
  1. <IfModule mod_deflate.c>
  2. DeflateCompressionLevel 7
  3. AddOutputFilterByType DEFLATE text/html text/plain text/xml
  4. AddOutputFilter DEFLATE css js
  5. </IfModule>
复制代码

squid 增加
通用的配置
增加
  1. cache_vary on
复制代码


下面是squid client info出来的信息

Squid Object Cache: Version 2.6.STABLE22
Start Time:     Thu, 05 Feb 2009 09:25:43 GMT
Current Time:   Fri, 06 Feb 2009 02:38:03 GMT
Connection information for squid:
        Number of clients accessing cache:      5236
        Number of HTTP requests received:       4005476
        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:   3880.0
        Average ICP messages per minute since start:    0.0
        Select loop called: 14538164 times, 4.261 ms avg
Cache information for squid:
        Request Hit Ratios:     5min: 94.4%, 60min: 94.8%
        Byte Hit Ratios:        5min: 83.4%, 60min: 84.3%
        Request Memory Hit Ratios:      5min: 66.3%, 60min: 67.5%
        Request Disk Hit Ratios:        5min: 3.5%, 60min: 3.7%
        Storage Swap size:      1887424 KB
        Storage Mem size:       1048560 KB
        Mean Object Size:       27.71 KB
        Requests given to unlinkd:      225685
Median Service Times (seconds)  5 min    60 min:
        HTTP Requests (All):   0.00179  0.00091
        Cache Misses:          0.07825  0.11465
        Cache Hits:            0.00091  0.00091
        Near Hits:             0.00091  0.00091
        Not-Modified Replies:  0.00286  0.00286
        DNS Lookups:           0.00000  0.67710
        ICP Queries:           0.00000  0.00000
Resource usage for squid:
        UP Time:        61940.290 seconds
        CPU Time:       1343.276 seconds
        CPU Usage:      2.17%
        CPU Usage, 5 minute avg:        3.44%
        CPU Usage, 60 minute avg:       3.42%
        Process Data Segment Size via sbrk(): 1171064 KB
        Maximum Resident Size: 0 KB
        Page faults with physical i/o: 3
Memory usage for squid via mallinfo():
        Total space in arena:  1171064 KB
        Ordinary blocks:       1155456 KB  83224 blks
        Small blocks:               0 KB      0 blks
        Holding blocks:          7428 KB      5 blks
        Free Small blocks:          0 KB
        Free Ordinary blocks:   15607 KB
        Total in use:          1162884 KB 99%
        Total free:             15607 KB 1%
        Total size:            1178492 KB
Memory accounted for:
        Total accounted:       1122438 KB
        memPoolAlloc calls: 353215609
        memPoolFree calls: 351763854
File descriptor usage for squid:
        Maximum number of file descriptors:   16384
        Largest file desc currently in use:   1503
        Number of file desc currently in use: 1429
        Files queued for open:                   0
        Available number of file descriptors: 14955
        Reserved number of file descriptors:   100
        Store Disk files open:                  10
        IO loop method:                     epoll
Internal Data Structures:
         68149 StoreEntries
         38617 StoreEntries with MemObjects
         38605 Hot Object Cache Items
         68119 on-disk objects

大家给点建议

论坛徽章:
0
2 [报告]
发表于 2009-02-06 10:40 |只看该作者
感觉磁盘命中率不高:wink: 大家有什么好的建议吗?

论坛徽章:
0
3 [报告]
发表于 2009-03-10 15:01 |只看该作者
Squid Object Cache: Version 3.0.STABLE13
Start Time: Tue, 10 Mar 2009 05:13:04 GMT Current Time: Tue, 10 Mar 2009 06:25:36 GMT
Connection information for squid:
        Number of clients accessing cache:        0
        Number of HTTP requests received:        793884
        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:        10945.6
        Average ICP messages per minute since start:        0.0
        Select loop called: 11210315 times, 0.388 ms avg
Cache information for squid:
        Hits as % of all requests:        5min: 93.4%, 60min: 93.4%
        Hits as % of bytes sent:        5min: 90.8%, 60min: 90.7%
        Memory hits as % of hit requests:        5min: 27.4%, 60min: 30.3%
        Disk hits as % of hit requests:        5min: 51.1%, 60min: 46.3%
        Storage Swap size:        9437556 KB
        Storage Swap capacity:        90.0% used, 10.0% free
        Storage Mem size:        524340 KB
        Storage Mem capacity:        100.0% used, 3276800.0% free
        Mean Object Size:        25.73 KB
        Requests given to unlinkd:        20673
Median Service Times (seconds)  5 min    60 min:
        HTTP Requests (All):   0.00865  0.00562
        Cache Misses:          0.03829  0.02451
        Cache Hits:            0.03829  0.01469
        Near Hits:             0.14252  0.10857
        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:        4351.800 seconds
        CPU Time:        399.698 seconds
        CPU Usage:        9.18%
        CPU Usage, 5 minute avg:        8.94%
        CPU Usage, 60 minute avg:        8.91%
        Process Data Segment Size via sbrk(): 348640 KB
        Maximum Resident Size: 0 KB
        Page faults with physical i/o: 2
Memory usage for squid via mallinfo():
        Total space in arena:  348904 KB
        Ordinary blocks:       348225 KB   1354 blks
        Small blocks:               0 KB      0 blks
        Holding blocks:        298968 KB   2047 blks
        Free Small blocks:          0 KB
        Free Ordinary blocks:     678 KB
        Total in use:          647193 KB 100%
        Total free:               678 KB 0%
        Total size:            647872 KB
Memory accounted for:
        Total accounted:       608541 KB  94%
        memPool accounted:     608541 KB  94%
        memPool unaccounted:    39330 KB   6%
        memPoolAlloc calls: 151521404
        memPoolFree calls:  149393205
File descriptor usage for squid:
        Maximum number of file descriptors:   16384
        Largest file desc currently in use:   3210
        Number of file desc currently in use: 2882
        Files queued for open:                   0
        Available number of file descriptors: 13502
        Reserved number of file descriptors:   100
        Store Disk files open:                  91
Internal Data Structures:
        375171 StoreEntries
         28611 StoreEntries with MemObjects
         28515 Hot Object Cache Items
        366745 on-disk objects


内存命中率不高,大家有什么好建议? 是图片服务器来的。

论坛徽章:
0
4 [报告]
发表于 2009-03-27 17:26 |只看该作者
Squid Object Cache: Version 2.6.STABLE19
Start Time:     Mon, 02 Mar 2009 01:45:19 GMT
Current Time:   Fri, 27 Mar 2009 09:25:36 GMT
Connection information for squid:
        Number of clients accessing cache:      101473
        Number of HTTP requests received:       370157433
        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:   10152.3
        Average ICP messages per minute since start:    0.0
        Select loop called: -350569932 times, -6.240 ms avg
Cache information for squid:
        Request Hit Ratios:     5min: 96.3%, 60min: 96.1%
        Byte Hit Ratios:        5min: 99.4%, 60min: 96.8%
        Request Memory Hit Ratios:      5min: 85.6%, 60min: 83.8%
        Request Disk Hit Ratios:        5min: 1.9%, 60min: 3.0%
        Storage Swap size:      28776276 KB
        Storage Mem size:       1048556 KB
        Mean Object Size:       65.52 KB
        Requests given to unlinkd:      0
Median Service Times (seconds)  5 min    60 min:
        HTTP Requests (All):   0.00000  0.00000
        Cache Misses:          0.00379  0.00379
        Cache Hits:            0.00000  0.00000
        Near Hits:             0.03622  0.04047
        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:        2187616.405 seconds
        CPU Time:       242918.063 seconds
        CPU Usage:      11.10%
        CPU Usage, 5 minute avg:        16.94%
        CPU Usage, 60 minute avg:       18.55%
        Process Data Segment Size via sbrk(): 1396220 KB
        Maximum Resident Size: 0 KB
        Page faults with physical i/o: 10
Memory usage for squid via mallinfo():
        Total space in arena:  1396220 KB
        Ordinary blocks:       1331686 KB 139582 blks
        Small blocks:               0 KB      0 blks
        Holding blocks:         18544 KB      4 blks
        Free Small blocks:          0 KB
        Free Ordinary blocks:   64533 KB
        Total in use:          1350230 KB 95%
        Total free:             64533 KB 5%
        Total size:            1414764 KB
Memory accounted for:
        Total accounted:       1283809 KB
        memPoolAlloc calls: 2477649358
        memPoolFree calls: 2475188375
File descriptor usage for squid:
        Maximum number of file descriptors:   65536
        Largest file desc currently in use:   2379
        Number of file desc currently in use: 2088
        Files queued for open:                   0
        Available number of file descriptors: 63448
        Reserved number of file descriptors:   100
        Store Disk files open:                 203
        IO loop method:                     epoll
Internal Data Structures:
        439369 StoreEntries
         51154 StoreEntries with MemObjects
         50929 Hot Object Cache Items
        439170 on-disk objects

论坛徽章:
0
5 [报告]
发表于 2009-04-13 10:35 |只看该作者
Squid Object Cache: Version 2.6.STABLE22
Start Time:     Wed, 01 Apr 2009 13:52:08 GMT
Current Time:   Mon, 13 Apr 2009 02:35:02 GMT
Connection information for squid:
        Number of clients accessing cache:      25224
        Number of HTTP requests received:       67075800
        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:   4040.0
        Average ICP messages per minute since start:    0.0
        Select loop called: 814933439 times, 1.222 ms avg
Cache information for squid:
        Request Hit Ratios:     5min: 97.0%, 60min: 96.6%
        Byte Hit Ratios:        5min: 97.2%, 60min: 96.6%
        Request Memory Hit Ratios:      5min: 29.7%, 60min: 28.0%
        Request Disk Hit Ratios:        5min: 16.2%, 60min: 15.0%
        Storage Swap size:      55295848 KB
        Storage Mem size:       2097052 KB
        Mean Object Size:       38.80 KB
        Requests given to unlinkd:      0
Median Service Times (seconds)  5 min    60 min:
        HTTP Requests (All):   0.00179  0.00179
        Cache Misses:          0.06286  0.08265
        Cache Hits:            0.24524  0.24524
        Near Hits:             0.46965  0.46965
        Not-Modified Replies:  0.00091  0.00091
        DNS Lookups:           0.05313  0.05078
        ICP Queries:           0.00000  0.00000
Resource usage for squid:
        UP Time:        996173.631 seconds
        CPU Time:       28886.570 seconds
        CPU Usage:      2.90%
        CPU Usage, 5 minute avg:        5.11%
        CPU Usage, 60 minute avg:       4.36%
        Process Data Segment Size via sbrk(): 4293214832 KB
        Maximum Resident Size: 0 KB
        Page faults with physical i/o: 0
Memory usage for squid via mallinfo():
        Total space in arena:  -1752464 KB
        Ordinary blocks:       -1755138 KB  45975 blks
        Small blocks:               0 KB      0 blks
        Holding blocks:         18952 KB      9 blks
        Free Small blocks:          0 KB
        Free Ordinary blocks:    2673 KB
        Total in use:          -1736186 KB 100%
        Total free:              2673 KB 0%
        Total size:            -1733512 KB
Memory accounted for:
        Total accounted:       2360189 KB
        memPoolAlloc calls: 2894015148
        memPoolFree calls: 2886802388
File descriptor usage for squid:
        Maximum number of file descriptors:   65535
        Largest file desc currently in use:   2456
        Number of file desc currently in use: 2174
        Files queued for open:                   0
        Available number of file descriptors: 63361
        Reserved number of file descriptors:   100
        Store Disk files open:                  58
        IO loop method:                     epoll
Internal Data Structures:
        1433006 StoreEntries
        133117 StoreEntries with MemObjects
        133057 Hot Object Cache Items
        1425313 on-disk objects

论坛徽章:
0
6 [报告]
发表于 2009-04-13 10:36 |只看该作者
请教一个问题  为什么 我这里都是 负的 ???

Memory usage for squid via mallinfo():
        Total space in arena:  -1752464 KB
        Ordinary blocks:       -1755138 KB  45975 blks
        Small blocks:               0 KB      0 blks
        Holding blocks:         18952 KB      9 blks
        Free Small blocks:          0 KB
        Free Ordinary blocks:    2673 KB
        Total in use:          -1736186 KB 100%
        Total free:              2673 KB 0%
        Total size:            -1733512 KB

论坛徽章:
0
7 [报告]
发表于 2009-04-22 21:39 |只看该作者
其实我觉得大部分都是这样的~~我试过了,也是

论坛徽章:
2
2015年辞旧岁徽章
日期:2015-03-03 16:54:1515-16赛季CBA联赛之上海
日期:2016-05-05 09:45:14
8 [报告]
发表于 2009-04-23 09:35 |只看该作者

论坛徽章:
0
9 [报告]
发表于 2009-04-24 09:33 |只看该作者
原帖由 xiaoqi8866 于 2009-4-13 10:36 发表
请教一个问题  为什么 我这里都是 负的 ???

Memory usage for squid via mallinfo():
        Total space in arena:  -1752464 KB
        Ordinary blocks:       -1755138 KB  45975 blks
        Small blocks:               0 KB      0 blks
        Holding blocks:         18952 KB      9 blks
        Free Small blocks:          0 KB
        Free Ordinary blocks:    2673 KB
        Total in use:          -1736186 KB 100%
        Total free:              2673 KB 0%
        Total size:            -1733512 KB        



squid的计数器溢出了

签名
---
等你的squid的正常工作持续个几个月的,那个计数器溢出得才好看
可以瞬间看到你服务器的流量跑到10G以上~~~~

论坛徽章:
0
10 [报告]
发表于 2009-04-30 10:43 |只看该作者

回复 #9 coolzsb 的帖子

哈哈    

多谢
您需要登录后才可以回帖 登录 | 注册

本版积分规则 发表回复

  

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

清除 Cookies - ChinaUnix - Archiver - WAP - TOP