Forum Discussion
Chris_Phillips
Nimbostratus
Aug 03, 2006iRule as stored function or similar
Hi,
I have an iRule with a dozen lines or so and amd really hoping that there is some way to use this one single iRule as a stored function for instances of it. I mean, i will be using seper...
JRahm
Admin
Aug 04, 2006Remember too that you can test all your variations against the timing command to find the most efficient solution specific to your environment:
Details on how to configure it:Posted By unRuleY on 3/22/2005 4:19 PM
That is a very good point. You have obviously thought about this. Of course, it will all really depend on just how often you expect to match. If it does not match often, then you are completely correct. If it matches regularly, then you would likely want to save the result in a variable. Another factor to weigh is the number of elements in the class/datagroup.
For those that are interested and paying attention, I'm now going to mention a YASF (yet another stealth feature):
You can enable timing statistics in a rule which will allow you to see just how many cycles are spent evaluating a given rule event. The way you do this is with the "timing on" statement.
An example that enables timing for all subsequent events in a rule is:
rule my_fast_rule {
timing on
when HTTP_REQUEST {
Do some stuff
}
}
An example of only timing a specific event is:
rule my_slow_rule {
when HTTP_REQUEST timing on {
Do some other stuff
}
}
This will then collect timing information each time the rule is evaluated and can be viewed with "b rule show all". You'll likely only want to look at the average and min numbers as max is often way, way out there due to the optimizations being performed on the first run of the rule. Additionally, enabling timing does have some overhead, though it should be negligible.
Details on how to make sense of the numbers:Click here
Recent Discussions
Related Content
DevCentral Quicklinks
* 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
Discover DevCentral Connects