The Cisco IOS command-line parser in the Cisco IOS software performs the translation and execution (parsing) of command lines.
The Parser Cache feature was developed to rapidly process large configuration files, thereby dramatically improving load time.
The Parser Cache feature allows the rapid recognition and translation of configuration lines in a configuration file that
differ slightly from previously used configuration lines (for example, pvc 0/100, pvc 0/101, and so on) by dynamically creating,
caching, and reusing simplified parse graphs. This improvement is useful primarily for configuration files that repeat similar
commands hundreds or thousands of times, such as cases in which thousands of virtual circuits must be configured for subinterfaces,
or hundreds of access lists must be configured. Performance will improve the most for those files in which the same commands
are used repeatedly but the numerical arguments change from command to command.
The Parser Cache is enabled by default on all platforms using Cisco IOS Release 12.1(5)T and later releases. However, users
with Cisco devices that do not require large configuration files may want to disable the Parser Cache to free the resources
used by this feature. (Memory used by this feature depends on the size of the configuration files parsed, but is generally
less than 512 KB.)
There are several ways to control the parser cache (these are all optional):
-
Clearing the Parser Cache--To free resources or to reset the parser cache memory, you may wish to clear the parse entries
and hit/miss statistics stored by the Parser Cache feature
-
Disabling the Parser Cache--The Parser Cache feature is enabled by default. To disable the Parser Cache feature, use the no
parser cache command in global configuration mode. When the parser cache is disabled, the noparsercache command line is written to the running configuration file. If you wish to disable the parser cache to free system resources,
you should clear the parser cache before issuing the noparsercache command. You will not be able to clear the parser cache after disabling it.
-
Reenabling the Parser Cache--To reenable the Parser Cache feature after disabling it, use the parsercache command in global configuration mode
-
Monitoring the Parser--Statistics about the last configuration file parsed are kept in the system memory, along with hit/miss
statistics on the commands parsed by the Parser Cache feature. “Hits” and “misses” refer to the matches that the parser cache
was able to make to similar commands used previously in the configuration session. Those commands that are matched (“hits”)
be parsed more efficiently. The parser cache cannot improve the parse time for those commands it was unable to match (“misses”).