vcdog 发表于 2010-10-26 10:03

squid网关服务器透明代理cache hit命中率很低,网关服务器丢包率也很高

# 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.220040.35832
      Cache Misses:          0.358320.58309
      Cache Hits:            0.000910.00179    //怎么我的squid透明代理命中率这么低啊,只有0.091%--0.179%?
      Near Hits:             0.220040.44492
      Not-Modified Replies:0.000910.00091
      DNS Lookups:         0.119260.36346
      ICP Queries:         0.000000.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.000910.00179    //怎么我的squid透明代理命中率这么低啊,只有0.091%--0.179%?
大虾帮忙给分析一下,谢谢!~

vcdog 发表于 2010-10-27 09:21

昨天把squid-graph装上,从页面监控流量显示cache_hit的命中率,好象比昨天要高一些,基本在30%左右!!

vcdog 发表于 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.127830.13498
      Cache Misses:          0.245240.30459
      Cache Hits:            0.008650.00562//cach_hit命中率86.5%
      Near Hits:             0.177110.18699
      Not-Modified Replies:0.002860.00286
      DNS Lookups:         0.042370.04639
      ICP Queries:         0.000000.00000

qianlei 发表于 2012-02-20 18:11

我是跟你一定的问题,我的代理跟你一样,是为内网提供服务的。但是还是出现你一样问题,我的本身已经是512MB了,是什么原因呢

mengcun123 发表于 2014-11-28 10:42

所谓命中率低是不是,和丢包一样的情况????
页: [1]
查看完整版本: squid网关服务器透明代理cache hit命中率很低,网关服务器丢包率也很高