# iRule latency stats

**URL:** <https://community.f5.com/t/irule-latency-stats/26285>\
**Category:** Technical Forums\
**Tags:** irules, dev, devops, application-delivery\
**Created:** [February 18, 2013, 7:40pm UTC](https://community.f5.com/t/irule-latency-stats/26285 "2013-02-18T19:40:42Z")\
**Posts on this page:** 6\
**Page:** 1

<div class="post-metadata">

**Author:** ![netadmindetail](https://avatars.discourse-cdn.com/v4/letter/n/d07c76/32.png) [@netadmindetail](https://community.f5.com/u/netadmindetail)\
**Post date:** [February 18, 2013, 7:40pm UTC](https://community.f5.com/t/irule-latency-stats/26285/1 "2013-02-18T19:40:42Z")

</div>

Hi All

We have an iRule that looks into 2 data-groups to find different matches and deny or not http request based on that matches. One of the data-group could have about 500 entries.

The iRule work perfectly but we want to see how much load this iRule is causing on our LTM 1600. (Execution latency, CPU, MEMORY, and so on)

We modify the iRule to add sometings like this:

1st line of the iRule :

- set tempsirule0 [clock clicks -milliseconds]

Last lines of the iRule :

- set tempsirule1 [clock clicks -milliseconds]

- set delayirule [expr $tempsirule1 - $tempsirule0]

- STATS::setmax $::NOM\_PROFILE “URL\_Filtering\_iRules\_Delay(mm)” $delayirule

Is there a good way to look at the iRule execution latency ?

What about CPU utilization and memory? We want to make sure that everything work well when we’ll have thousand of concurrent connections.

Thank you very much.

---

<div class="post-metadata">

**Author:** ![Ian\_Smith](https://avatars.discourse-cdn.com/v4/letter/i/9f8e36/32.png) [@Ian\_Smith](https://community.f5.com/u/Ian_Smith)\
**Post date:** [February 22, 2013, 7:16pm UTC](https://community.f5.com/t/irule-latency-stats/26285/2 "2013-02-22T19:16:21Z")

</div>

The CPU cycles per execution can be recorded by making the first line of the rule

```tcl
timing on

```

and using the command

```tcl
show ltm rule

```

More detail can be found in SOL6228: [404 Page not found | BIG-IP Documentation](http://support.f5.com/kb/en-us/solutions/public/6000/200/sol6228.html)

Instead of using the first-line/last-line when you try to calculate latency, you should use the first line of the first event (CLIENT\_ACCEPTED, for example) and the last line of the last event (CLIENT\_DATA or HTTP\_REQUEST\_RELEASE, for example), since the rule isn’t going to necessarily execute top to bottom on every connection. Also, recording the timestamps and doing the math will certainly add to the traversal time of the packet.

---

<div class="post-metadata">

**Author:** ![Shun\_Takahashi1](https://avatars.discourse-cdn.com/v4/letter/s/df705f/32.png) [@Shun\_Takahashi1](https://community.f5.com/u/Shun_Takahashi1)\
**Post date:** [February 26, 2013, 2:36pm UTC](https://community.f5.com/t/irule-latency-stats/26285/3 "2013-02-26T14:36:33Z")

</div>

iRule Editor has a nice GUI to show you all the available stat for the particular iRule execution such that CPU clock cycle, latency so on. It’s really cool stuff.

---

<div class="post-metadata">

**Author:** ![Shun\_Takahashi1](https://avatars.discourse-cdn.com/v4/letter/s/df705f/32.png) [@Shun\_Takahashi1](https://community.f5.com/u/Shun_Takahashi1)\
**Post date:** [February 26, 2013, 2:37pm UTC](https://community.f5.com/t/irule-latency-stats/26285/4 "2013-02-26T14:37:08Z")

</div>

iRule Editor has a nice GUI to show you all the available stat for the particular iRule execution such that CPU clock cycle, latency so on. It’s really cool stuff.

---

<div class="post-metadata">

**Author:** ![netadmindetail](https://avatars.discourse-cdn.com/v4/letter/n/d07c76/32.png) [@netadmindetail](https://community.f5.com/u/netadmindetail)\
**Post date:** [March 4, 2013, 2:14pm UTC](https://community.f5.com/t/irule-latency-stats/26285/5 "2013-03-04T14:14:10Z")

</div>

Thank you very much for all those reply guys.

I’ll look at this

---

<div class="post-metadata">

**Author:** ![netadmindetail](https://avatars.discourse-cdn.com/v4/letter/n/d07c76/32.png) [@netadmindetail](https://community.f5.com/u/netadmindetail)\
**Post date:** [March 7, 2013, 6:01pm UTC](https://community.f5.com/t/irule-latency-stats/26285/6 "2013-03-07T18:01:13Z")

</div>

I found out some interesting stats in the Analytics module.

Is there limitation about the number of analytics profile I can call with VSs ? (like 50 VS calling 1 analytics profile) Can this slow down the units ?

Thanks
