1042 BigIron RX Series Configuration Guide
53-1002253-01
Configuring sFlow
39
Changing the sampling rate
The sampling rate is the average ratio of the number of packets incoming on an sFlow-enabled 
port, to the number of flow samples taken from those packets. By default, all sFlow-enabled ports 
use the default sampling rate, which is 2048. With a sampling rate of 2048, on average, one in 
every 2048 packets forwarded on an interface is sampled. 
You can change the default (global) sampling rate. You also can change the rate on an individual 
port, overriding the default sampling rate. 
sFlow uses CPU resources to send sFlow samples to the collector. If you set a low sampling rate, CPU 
utilization can become high.
Configuration considerations
The sampling rate is a fraction in the form 1/N, meaning that, on average, one out of every N 
packets will be sampled. The sflow sample command at the global level or port level specifies N, 
the denominator of the fraction. Thus a higher number for the denominator means a lower 
sampling rate since fewer packets are sampled. Likewise, a lower number for the denominator 
means a higher sampling rate because more packets are sampled. For example, if you change the 
denominator from 2,000 to 512, the sampling rate increases because four times as many packets 
will be sampled. 
Brocade recommends that you do not change the denominator to a value lower than the default. 
Sampling requires CPU resources. Using a low denominator for the sampling rate can cause high 
CPU utilization.
Change to global rate
If you change the global sampling rate, the change is applied to all sFlow-enabled ports except 
those ports on which you have already explicitly set the sampling rate. For example, suppose that 
sFlow is enabled on ports 1/1, 1/2, and 5/1. If you configure the sampling rate on port 1/1 but 
leave the other two ports using the default rate, then a change to the global sampling rate applies 
to ports 1/2 and 5/1 but not port 1/1. sFlow assumes that you want to continue using the 
sampling rate you explicitly configured on an individual port even if you globally change the 
sampling rate for the other ports.    
Sampling rate for new ports
When you enable sFlow on a port, the port's sampling rate is set to the global default sampling rate. 
This also applies to ports on which you disable and then re-enable sFlow. The port does not retain 
the sampling rate it had when you disabled sFlow on the port, even if you had explicitly set the 
sampling rate on the port.
Changing the default sampling rate
To change the default (global) sampling rate, enter a command such as the following at the global 
CONFIG level of the CLI.
BigIron RX(config)# sflow sample 2048
Syntax: [no] sflow sample <num>