Forum Discussion
iRules and performance
Do iRules affect CPU? I read that iRules execute at wire speed and there is no performance hit because it runs the script off the ASIC's on the line card. Which are CPU's essentially. Is this true? I'm sure if there are many iRules running at the same time it will rob the CPU of some cycles but how many I do not know. I'm sure it depends on a variety of factors.
2 Replies
- Kevin_Stewart
Employee
It mostly depends on the iRule. iRules do get compiled (into byte code), and can run at wire speed, but it really depends on what you're doing. If for example, you're processing a heavy regex filter on URI patterns, or building a Fibonacci sequence to insert into an HTTP header, that's probably going to eat some major CPU cycles. The best way to tell is simply to test your iRules. You can insert a timing command into event declarations and look at overall CPU hit across some arbitrary load.
All of that said, you may also want to consider another aspect of iRules - flexibility. iRules present an amount of flexibility that can in some cases make or break some set of requirements. iRules can in some cases fix an application problem faster and with less code than the app owners/developers can. And iRules can sometimes solve problems that simply cannot be solved any other way, or by any other vendor in the space. And for all of that, you may want to overlook the few extra CPU cycles introduced.
- ShannonSeverijn
Nimbostratus
excellent answer thank you very much.
Help guide the future of your DevCentral Community!
What tools do you use to collaborate? (1min - anonymous)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