Configuring CPU Limit

About CPU Limit

The CPU limit feature controls the rate at which packets are routed to the CPU to improve CPU performance. You can limit the rate of packets routed to the CPU by configuring a limit based on the type of packet.

How to Configure CPU Limit

Configuring CPU Limit

To configure CPU limit, perform this procedure.

SUMMARY STEPS

  1. enable
  2. configure terminal
  3. [no] cpu-limit {arp | bpdu | broadcast | dhcp | icmp | igmp | mld | ospf | other | rip | snmp | ssh | switch-dst-mac | telnet } rate

DETAILED STEPS

  Command or Action Purpose

Step 1

enable

Example:

Device> enable 

Enables privileged EXEC mode.

Enter your password if prompted.

Step 2

configure terminal

Example:

Device# configure terminal 

Enters global configuration mode.

Step 3

[no] cpu-limit {arp | bpdu | broadcast | dhcp | icmp | igmp | mld | ospf | other | rip | snmp | ssh | switch-dst-mac | telnet } rate

Example:

Device(config)# cpu-limit arp 100 

(Optional) Allows packets within the specified CPU-limit rate for the specified packet type.

rate : The range is 1 to 10000 packets per second.

Use the no cpu-limit command to restore the default value.

Monitoring CPU Limit

The commands in the following table can be used to monitor CPU performance.

Table 1. CPU Performance

Command

Purpose

show cpu-limit

Displays the packet types and the speed for each packet type.

show cpu-utilization

Displays CPU utilization.

Example: Configuring CPU Limit

The following example shows how to configure the CPU limit of ARP packets to 100pps.

Device> enable
Device# configure terminal 
Device(config)# cpu-limit arp 100

The following example shows the sample ouput of the show cpu-limit command.

Device> enable
Device# show cpu-limit 
packet-type     speed(pps)
other           200
broadcast       200
switch-dst-mac  1000
icmp            200
mld             200
igmp            200
ssh             200
dhcp            200
snmp            100
arp             100
ospf            200
rip             200
telnet          100
bpdu            200

The following example shows the sample ouput of the show cpu-utilization command.

Device> enable
Device# show cpu-utilization 
CPU Information:
CPU Idle : 82 %