Forum Discussion
iRules performance measuring
While that statistic refers to CPU Cycle, what is actually meant is an Instruction cycle
Every time a programmer tells a computer to do something, the end result is a sequence of Instructions for the CPU, and these instructions take a number of Instruction cycles to perform.
For a compiled language like C/C++, the C statements are compiled into a series of instructions by a compiler.
For an interpreted language like TCL, as the TCL statements are read, the interpreter takes specific compiled paths to execute the TCL statements and run the script.
In tmm, the TCL interpreter will report on how many instruction cycles a specific irule function takes to perform, and this information is collected for overall statistics. The reporting includes the average cycles, the minimum cycles and the maximum cycles. Sadly, it does not include the variance or standard deviation which might be more useful.
These values are not really useful in an absolute sense, but are useful for comparison.
If your CPU is running at about 30%, that seems to be fine, but you would want to look more closely at the data-plane CPU cores, as they are the ones of interest.
K23505424: Overview of the HTSplit feature
A high volume irule that averages 22k cycles with occasional runs of 440k cycles isn't likely to cause a CPU issue.
If the same irule was averaging 440k cycles, it probably would be.
A low execution rate irule that averages 500k cycles is probably OK.
Looking at the cycles per execution also helps to identify inefficient irules, or irules that may be refactored to use less CPU cycles. Things like regex are CPU intensive, and should be avoided in a high-execution rate irule.
Transitioning to Local Traffic Policies where possible is much more efficient, as well.
Recent Discussions
Related Content
* Getting Started on DevCentral
* Community Guidelines
* Community Terms of Use / EULA
* Community Ranking Explained
* Community Resources
* Contact the DevCentral Team
* Update MFA on account.f5.com