![]() |
IP Routing: BGP Configuration Guide, Cisco IOS Release 12.4
|
||||||||||||||||
Regex Engine Performance Enhancement
![]() |
|||||||||||||||||
|
Contents
Regex Engine Performance EnhancementLast Updated: October 19, 2011
The Regex Engine Performance Enhancement feature introduces a new regular expression engine that is designed to process complex regular expressions. This new regular expression engine does not replace the existing engine. The existing engine is preferred for simple regular expressions and is the default engine and in Cisco IOS software. Either engine can be selected from the command-line interface (CLI). Finding Feature InformationYour software release may not support all the features documented in this module. For the latest feature information and caveats, see the release notes for your platform and software release. To find information about the features documented in this module, and to see a list of the releases in which each feature is supported, see the Feature Information Table at the end of this document. Use Cisco Feature Navigator to find information about platform support and Cisco software image support. To access Cisco Feature Navigator, go to www.cisco.com/go/cfn. An account on Cisco.com is not required. Prerequisites for Regex Engine Performance EnhancementThe regular expression engine can be selected only under a Border Gateway Protocol (BGP) routing process in router configuration mode. So, the engine can be changed only after BGP has been enabled. Information About Regex Engine Performance Enhancement
Regular Expression OverviewA regular expression is a pattern to match against an input string. You specify the pattern that a string must match when you compose a regular expression. Matching a string to the specified pattern is called "pattern matching." Pattern matching either succeeds or fails. A regular expression can be a single-character pattern or a multiple-character pattern. That is, a regular expression can be a single character that matches the same single character in the input string or multiple characters that match the same multiple characters in the input string. Default Regular Expression EngineThe default Cisco IOS regular expression engine uses a recursive algorithm. This engine is effective but uses more system resources as the complexity of regular expressions increase. The recursive algorithm works well for simple regular expressions, but is less efficient when processing very complex regular expressions because of the backtracking that is required by the default engine to process partial matches. In some cases, CPU watchdog timeouts and stack overflow traces have occurred because of the length of time that the default engine requires to process very complex regular expressions. New Regular Expression Engine SelectionThe Regex Engine Performance Enhancement feature introduces a deterministic processing time regular expression engine in Cisco IOS software. This new engine does not replace the default regular expression engine. The new engine employs an improved algorithm that eliminates excessive back tracking and greatly improves performance when processing complex regular expressions. When the new engine is enabled, complex regular expressions are evaluated more quickly, and CPU watchdog timeouts and stack overflow traces will not occur. However, the new regular expression engine takes longer to process simple regular expressions than the default engine. We recommend that you use the new regular expression engine if you need to evaluate complex regular expressions or if you have observed problems related to evaluating regular expressions. We recommend that you use the default regular expression engine if you use only simple regular expressions. The new engine can be enabled by entering the bgp regexp deterministic command under a BGP routing process. The default regular expression engine can be reenabled by entering the no form of this command. How to Change the Regular Expression EngineSelecting the New Regular Expression EngineWe recommend that you use the new regular expression engine if you need to evaluate complex regular expressions or if you have observed problems related to evaluating regular expressions. We recommend that you use the default regular expression engine if you only use simple regular expressions. DETAILED STEPS ExamplesThe following example configures Cisco IOS software to use the default regular expression engine: router bgp 1 no bgp regexp deterministic The following example configures Cisco IOS software to use the deterministic processing time regular expression engine: router bgp 1 bgp regexp deterministic Additional ReferencesThe following sections provide references related to the Regex Engine Performance Enhancement feature. MIBs
Technical Assistance
Feature Information for Regex Performance EnhancementThe following table provides release information about the feature or features described in this module. This table lists only the software release that introduced support for a given feature in a given software release train. Unless noted otherwise, subsequent releases of that software release train also support that feature. Use Cisco Feature Navigator to find information about platform support and Cisco software image support. To access Cisco Feature Navigator, go to www.cisco.com/go/cfn. An account on Cisco.com is not required.
Cisco and the Cisco logo are trademarks or registered trademarks of Cisco and/or its affiliates in the U.S. and other countries. To view a list of Cisco trademarks, go to this URL: www.cisco.com/go/trademarks. Third-party trademarks mentioned are the property of their respective owners. The use of the word partner does not imply a partnership relationship between Cisco and any other company. (1110R) Any Internet Protocol (IP) addresses and phone numbers used in this document are not intended to be actual addresses and phone numbers. Any examples, command display output, network topology diagrams, and other figures included in the document are shown for illustrative purposes only. Any use of actual IP addresses or phone numbers in illustrative content is unintentional and coincidental. © 2011 Cisco Systems, Inc. All rights reserved.
|
||||||||||||||||
|
|