不同高中低端ROUTER,其netflow处理性能果然相差很大
低端10000f/s是极限,中端40000f/s,高端60000f/s(且还有simpled这个杀手锏)
-低端ROUTER(2600,2800,3600,3700)来说,采集10000流/秒已经是极限了,CPU利用率已经超10%,高于20000f/s到40000f/s,CPU利用率都在接近30%作用
-高端ROUTER(7200(注意不要太老的NPE),7500(注意不要太老的NPE),3800),其40000f/s的CPU利用率都能在10%以下(太老的NPE还是能达到20%),明显性能占优
-骨干ROUTER 12000支持 10000f/s 的CPU利用率也在10%以下,40000/s的CPU利用率在20%左右,65000f/s的CPU利用率是30%左右,采用simpling后,40000f/s能降到12%左右,65000f/s能降到14%
CPU损耗主要在流采集上,不在export上
flow 采集因为都是ASIC硬件抓取,所以对性能几乎没有影响。有影响的地方主要是flow技术里侧重于软件的部分————Cache技术
因此flow对性能的影响主要集中于当前cache中的active flow数目
flow 对内存的消耗————主要是对CACHE的消耗
每个flow(cache entry)占64字节
Cache size缺省值是64K entries,每个cache entry大约占用64 字节的存贮空间
用满就是64 x 64000 =4096000 (4M DRAM)
NetFlow cache的缺省大小可以满足需要,不建议更改
cisco强烈建议保留缺省值,如果必须修改entry值,可能需要先扩容内存
cisco 官方对export流量对带宽的损耗的解释:正常流量的1.5%
the amount of export data being about 1.5% of the switched traffic in the router.
根据计算,在采样率为1:1000时,对 10Gbit/s的流量进行NetFlow分析,只产生1.3Mbit/s的流量
Flow Counts and PPS
Flow Count
|
PPS
(即export 多少个UDP包(每个UDP包里含1-30个flow)每秒)
注:业界标准,1GE网口线速为1,488,095pps
|
Bps
占用的带宽
|
2,000
|
274
|
|
10,000
|
1394
|
|
45,000
|
6326
|
|
65,000
|
8903
|
28Mbps
65000/8 = 8903,相当于1个export包里有8个flow
8flow的一个UDP包,只400字节足够
8903 x 400字节/包x8 , 约等于 28M bps
(注意不能乘1500字节/包,因为1500字节是为30flow一包算的)
|
常见的几种解决性能问题的办法:
Some significant factors in reducing CPU utilization from the NetFlow process include:
-Sampled NetFlow
-Optimize the aging timers to proper values for the amount of flows
优化老化时间
-Leverage a distributed architecture
分布式架构
-Utilization of flow masks on Catalyst 65k/7600
设flow mask(6500系列)
Sampled 采样率要设置得适中
采样率过高(如1000:1或更高),流量分析的误差将加大,尤其对小Flow或混杂在大流量中的部分关键的小Flow的分析,因此路由器的采样率在很大程度上决定了分析结果的准确性
而采样率越低,对资源的占用越大。如果设置过低的NetFlow采样率会对路由器的性能带来较大的影响。
CISCO官方测算的不同sampling比率对CPU利用率的降低比率
CPU Utilization and Sampling Rate for the Cisco 7505 Router
Sampling Rate
|
Average % Decrease in CPU
|
1:100
|
75
|
1:1000
|
82
|
通常sampling 只在大型router 部署,甚至只在72,75,12000上有支持的指令
ip route-cache flow [simpling] (或flow-sampler-map …)
cisco文档的sampled配置:
Router(config)# flow-sampler-map mysampler1 Router(config-sampler)# mode random one-out-of 100
Router(config-if)# interface FastEthernet9/0/0 Router(config-if)# ip address 150.1.2.2 255.255.255.0 Router(config-if)# flow-sampler mysampler1 Router(config-if)# ip route-cache distributed
|
另一类sampled配置:
interface GigabitEthernet0/1/0 no ip address ip route-cache flow sampled input ! interface GigabitEthernet0/1/0.2 encapsulation dot1Q 2 ip address 122.64.0.145 255.255.255.252 ! ip flow-sampling-mode packet-interval 500
|
不同接口不同采样比
flow-sampler-map test1
mode random one-out-of 100
!
flow-sampler-map test2
mode random one-out-of 1000
interface FastEthernet1/0
ip address 10.194.194.72 255.255.255.0
ip flow ingress
ip flow egress
duplex half
flow-sampler test1
!
interface FastEthernet2/0
ip address 10.193.193.21 255.255.255.0
ip flow ingress
ip flow egress
duplex half
flow-sampler test2
转载于:https://blog.51cto.com/kwsnh/482382
本文内容由网友自发贡献,版权归原作者所有,本站不承担相应法律责任。如您发现有涉嫌抄袭侵权的内容,请联系:hwhale#tublm.com(使用前将#替换为@)