sflow sample
The default sampling rate is 4096 packets.
Global configuration mode
Interface configuration mode
LAG configuration mode
For RUCKUS ICX 8200 and ICX 8100 devices, the command is supported in global configuration mode only.
The value range for the sampling rate is from 256 through 16777215
The sampling rate is a fraction in the form 1/N, meaning that, on average, one out of every N packets is sampled. The sflow sample command specifies N, the denominator of the fraction. Thus a higher number for the denominator means a lower sampling rate because 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 4096 to 2048, the sampling rate increases because four times as many packets are sampled.
The CPU-bound sFlow sample packets are rate-limited to 50 samples per second to avoid high CPU utilization.
The sampling rate must be set depending on input traffic rate. If the input traffic rate is more on the interface, the sampling rate must be configured to a higher value to keep the number of sample packets within the CPU rate limit. Else, the excess sample packets are dropped by the CPU.
The following examples show the ideal sample rate configurations for various input rates that keep the sample packets within the CPU rate limit.
- If the input traffic rate is 200,000 packets/sec, the interface sample rate must be set to 4096. (200000/4096 = less than 50 samples)
- If the input traffic rate is 400,000 packets/sec, the interface sample rate must be set to 8192. (400000/8192 = less than 50 samples)
You cannot change a module's sampling rate directly. You can change a module's sampling rate only by changing the sampling rate of a port on that module.
You can configure an individual port to use a different sampling rate than the global default sampling rate. This is useful when ports have different bandwidths.
You can configure individual LAG ports to use a different sampling rate than the global default sampling rate. For a keep-alive LAG, sFlow can be enabled only at the interface level and not at the LAG level.
When configuring the sample rate, if you configure the value as 1000, the software rounds the value to the next higher odd power of 2; so the actual rate is 2^11 (2048), and 1 in 2048 packets are sampled by the hardware.
The
no form of the command resets the sampling rate to the default value.