# Optimizing Packet Mirroring Performance

Packet mirroring operations require some system resources. As a general rule, to avoid performance degradation, limit the amount of mirrored traffic to a maximum of 5 percent of the E Series router’s total traffic.

For many packet mirroring environments, using the 5-percent guideline is sufficient. However, if you want to more closely manage packet mirroring’s use of your router’s resources, this section provides guidelines and equations to help you determine your packet mirroring requirements.

The guidelines for packet mirroring requirements use the following assumptions for a specific line module:

- A = Total input traffic at the line module
- B = Total output traffic at the line module
- X = Amount of traffic mirrored at input in the line module
- Y = Amount of traffic mirrored at output in the line module

## Determine Traffic Loads

Using the previous assumptions, you can determine traffic loads for a given line module:

- A = Load at ingress side of the line module
- (B + X) = Load at egress side of the line module
- (A + 2X + Y) = Load at ingress to fabric from the line module

## Establish Resource Guidelines

Next, using the traffic loads that you determined for the line module, you can establish guidelines for the amount of packet mirroring traffic for your router.

If you exceed these guidelines, regular (non-packet mirroring) packets from all subscribers, including nonmirrored subscribers, will be dropped. If the fabric bandwidth is not exceeded, then the performance penalties are contained within the slot where the packet mirroring activity occurs. However, if the fabric bandwidth is exceeded, traffic from other line modules might also be dropped.

- (A + 2X + Y) must be less than the maximum fabric bandwidth supported from this line module.
- (2X + Y) must be less than 100Mbps (the enforced queue limit).

  The 100 Mbps limit does not apply to the following line modules:

  - GE-2 line module (Juniper Networks ERX310 and ERX1440 Broadband Services Routers)
  - GE-HDE line module (ERX310 and ERX1440 router)
  - OC48 Frame APS I/O module (ERX1440 router only)
  - ES2 4G LM (E120 router and E320 Broadband Services Routers)
  - ES2 10G LM (E120/E320)
- (B + X ) must be less than the maximum supported egress bandwidth.
- The number of mirrored interfaces per line module must be less than 1023 (the configuration enforced for secure policy attachments).
- The number of interfaces mirrored per chassis must be less than 2400 (the configuration enforced for secure policy attachments).

  | Note: Packet mirroring can also affect the forwarding controller’s packet handling performance.