Forum Discussion
Robert_47833
Jul 21, 2011Altostratus
will rand() cause performance issue
rand()
one question about rand
will rand cause performance issue?How to test it?
Can u give me an example
We want to put rand() in production
Robert_47833
Jul 26, 2011Altostratus
here is the stats for irule which use rand
[jucao@srwd00lba001:/S1-green-P:Active] ~ b rule srwd29cjjmain show all
RULE srwd29cjjmain
+-> HTTP_REQUEST 3553 total 0 fail 0 abort
| | Cycles (min, avg, max) = (0, 465171, 1446128)
+-> HTTP_RESPONSE 157 total 0 fail 0 abort
| Cycles (min, avg, max) = (0, 0, 0)
[jucao@srwd00lba001:/S1-green-P:Active] ~ b rule srwd29cjjmain show all
RULE srwd29cjjmain
+-> HTTP_REQUEST 3560 total 0 fail 0 abort
| | Cycles (min, avg, max) = (0, 466582, 1446128)
+-> HTTP_RESPONSE 165 total 0 fail 0 abort
| Cycles (min, avg, max) = (0, 0, 0)
[jucao@srwd00lba001:/S1-green-P:Active] ~ b rule srwd29cjjmain show all
RULE srwd29cjjmain
+-> HTTP_REQUEST 3560 total 0 fail 0 abort
| | Cycles (min, avg, max) = (0, 466582, 1446128)
+-> HTTP_RESPONSE 165 total 0 fail 0 abort
| Cycles (min, avg, max) = (0, 0, 0)
[jucao@srwd00lba001:/S1-green-P:Active] ~ b rule srwd29cjjmain show all
RULE srwd29cjjmain
+-> HTTP_REQUEST 3561 total 0 fail 0 abort
| | Cycles (min, avg, max) = (0, 466582, 1446128)
+-> HTTP_RESPONSE 165 total 0 fail 0 abort
| Cycles (min, avg, max) = (0, 0, 0)
[jucao@srwd00lba001:/S1-green-P:Active] ~ b rule srwd29cjjmain show all
RULE srwd29cjjmain
+-> HTTP_REQUEST 3561 total 0 fail 0 abort
| | Cycles (min, avg, max) = (0, 466582, 1446128)
+-> HTTP_RESPONSE 166 total 0 fail 0 abort
| Cycles (min, avg, max) = (0, 0, 0)
[jucao@srwd00lba001:/S1-green-P:Active] ~ b rule srwd29cjjmain show all
RULE srwd29cjjmain
+-> HTTP_REQUEST 3561 total 0 fail 0 abort
| | Cycles (min, avg, max) = (0, 466582, 1446128)
+-> HTTP_RESPONSE 166 total 0 fail 0 abort
| Cycles (min, avg, max) = (0, 0, 0)
[jucao@srwd00lba001:/S1-green-P:Active] ~ b rule srwd29cjjmain show all
RULE srwd29cjjmain
+-> HTTP_REQUEST 3561 total 0 fail 0 abort
| | Cycles (min, avg, max) = (0, 466582, 1446128)
+-> HTTP_RESPONSE 166 total 0 fail 0 abort
| Cycles (min, avg, max) = (0, 0, 0)
[jucao@srwd00lba001:/S1-green-P:Active] ~ b rule srwd29cjjmain show all
RULE srwd29cjjmain
+-> HTTP_REQUEST 3563 total 0 fail 0 abort
| | Cycles (min, avg, max) = (0, 466582, 1446128)
+-> HTTP_RESPONSE 168 total 0 fail 0 abort
this is for irule which didn't use rand
[jucao@srwd00lba001:/S1-green-P:Active] ~ b rule SRWD29-Main-rb1112 show all
RULE SRWD29-Main-rb1112
+-> HTTP_REQUEST 14 total 0 fail 0 abort
| | Cycles (min, avg, max) = (0, 350114, 378678)
+-> HTTP_RESPONSE 14 total 0 fail 0 abort
| Cycles (min, avg, max) = (0, 0, 0)
[jucao@srwd00lba001:/S1-green-P:Active] ~ b rule SRWD29-Main-rb1112 show all
RULE SRWD29-Main-rb1112
+-> HTTP_REQUEST 14 total 0 fail 0 abort
| | Cycles (min, avg, max) = (0, 350114, 378678)
+-> HTTP_RESPONSE 14 total 0 fail 0 abort
| Cycles (min, avg, max) = (0, 0, 0)
[jucao@srwd00lba001:/S1-green-P:Active] ~ b rule SRWD29-Main-rb1112 show all
RULE SRWD29-Main-rb1112
+-> HTTP_REQUEST 14 total 0 fail 0 abort
| | Cycles (min, avg, max) = (0, 350114, 378678)
+-> HTTP_RESPONSE 14 total 0 fail 0 abort
| Cycles (min, avg, max) = (0, 0, 0)
[jucao@srwd00lba001:/S1-green-P:Active] ~ b rule SRWD29-Main-rb1112 show all
RULE SRWD29-Main-rb1112
+-> HTTP_REQUEST 15 total 0 fail 0 abort
| | Cycles (min, avg, max) = (0, 350114, 378678)
+-> HTTP_RESPONSE 15 total 0 fail 0 abort
| Cycles (min, avg, max) = (0, 0, 0)
[jucao@srwd00lba001:/S1-green-P:Active] ~ b rule SRWD29-Main-rb1112 show all
RULE SRWD29-Main-rb1112
+-> HTTP_REQUEST 15 total 0 fail 0 abort
| | Cycles (min, avg, max) = (0, 350114, 378678)
+-> HTTP_RESPONSE 15 total 0 fail 0 abort
| Cycles (min, avg, max) = (0, 0, 0)
[jucao@srwd00lba001:/S1-green-P:Active] ~ b rule SRWD29-Main-rb1112 show all
RULE SRWD29-Main-rb1112
+-> HTTP_REQUEST 15 total 0 fail 0 abort
| | Cycles (min, avg, max) = (0, 350114, 378678)
+-> HTTP_RESPONSE 15 total 0 fail 0 abort
| Cycles (min, avg, max) = (0, 0, 0)
[jucao@srwd00lba001:/S1-green-P:Active] ~ b rule SRWD29-Main-rb1112 show all
RULE SRWD29-Main-rb1112
+-> HTTP_REQUEST 16 total 0 fail 0 abort
| | Cycles (min, avg, max) = (0, 350114, 378678)
+-> HTTP_RESPONSE 16 total 0 fail 0 abort
| Cycles (min, avg, max) = (0, 0, 0)
[jucao@srwd00lba001:/S1-green-P:Active] ~ b rule SRWD29-Main-rb1112 show all
RULE SRWD29-Main-rb1112
It seems rand will cost more time,how to resolve it?
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