Forum Discussion
NiHo_202842
Sep 14, 2016Cirrostratus
Unusual high CPU cycles on iRule
Hi, So I am using the following iRule on all virtual servers & just enabled timing on this:
priority 50
when RULE_INIT {
set static::maindatalist
set static::debug 0
}
when HTTP_RE...
Kai_Wilke
Sep 15, 2016MVP
Hi NiHo,
you should consider in your calculations how often each event is executed.
: Is only issued each time you load/save the configRULE_INIT
: Is issued on each request.HTTP_REQUEST
: Is issued on each request, but only if the POOL has been failed and ifLB_FAILED
is not active.( $status eq "1" )
In addition, if
( $status eq "1" )
or your POOL is down, then you will send a HTTP response on behalf of your servers and save the ressources required to handle server side connections. I would bet that an outtage/maintenance will even result in a lower CPU consumption compared to normal operation.
In the end just the
HTTP_REQUEST
event should be considered in your calculation. The iRule you've provided is already highly optimized. You may only save a few cycles by removing the $status
variable and passing the results of [class match -value "[virtual name]" equals "maintenance-list"]
directly into the if { } then {
. But thats all about what you can do to further improve this iRule without over engineering it.
Also keep in mind, that you've to multiply the Cycles/Sec value of the spreatsheet with the total number of CPU cores in your system.
Cheers, Kai
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