Forum Discussion
Craig_Hammer_10
Nimbostratus
Aug 02, 2005Timing iRules
I have inserted "timing on" into a couple of scripts, and collected stats (on test sites) for a few days. The timing statistic is expressed in "Cycles." I have not found a description of what "Cycles" is measuring. I thought perhaps it was CPU clock cycles, but that is not making sense.
For instance, I ran a brief test this morning of a script that does one "if" and one "else". Should be very lightweight. This is the listing from "bigpipe rule blah show all":
RULE loadtest
+-> HTTP_REQUEST 729 total 0 fail 0 abort
| Cycles (min, avg, max) = (3693, 3959, 53936)
How can I communicate this statistic in a meaningful way to management and support staff ?
Thanks,
- unRuleY_95363Historic F5 AccountYes, these cycles are cpu cycles as measured by the TSC (time stamp counter) on the cpu. Before evaluating the rule we read the TSC and then read it again at completion of the rule and add the delta to the average.
- unRuleY_95363Historic F5 AccountOh, I should add that the number for "max" is often grossly out of proportion. This is because at least once per tick, the operating system takes control and makes sure the right process is running (this is called scheduling). Because we simply read the TSC and then measure the difference, we can't account for this operating system overhead that occasionally happens in the middle of a rule evaluation. So, unfortunately, this max number is actually quite useless (originally, I had hoped it would show the longest path through the rule). Eventually, we are planning on adding more detailed statistics to further help diagnose and improve rule performance.
- Craig_Hammer_10
Nimbostratus
Excellent info! - Al_Carandang_11
Nimbostratus
If we divide 1266000000 CPU cycles per second by 3959, we would get about 320000. Would it be safe to say that this is the theoretical maximum number of times we could execute this code per second? Of course there would be other factors which would lower this value. I'm also assuming the second CPU on my box would handle all the other tasks the box would need to do. - uni
Altostratus
Posted By unRuleY on 8/02/2005 11:27 AMbigpipe rule [ | all] stats reset
- Ed_Hammond_2611
Nimbostratus
I've been look this over in more detail again. I have a script that does the "stats reset" once, then issues the "show all" at regular intervals. Looking at the results does not make much sense... The values continue to grow, including the "min" value. How can the "min" value grow over time? Are these all cumulative values? If so, what does "min" mean?
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