Forum Discussion

Naman_65674's avatar
Naman_65674
Icon for Nimbostratus rankNimbostratus
Feb 25, 2009

Perfomance gain of using HTTP Classes over iRules

Hi,

 

 

I raised this issue in the general iRule forum (http://devcentral.f5.com/Default.aspx?tabid=53&forumid=5&postid=33291&view=topic), but I thought this would be the best place to focus the attention on the actual performance testing.

 

 

As mentionted before, we currently have a block of code in an iRule which sends traffic to different pools based on the uri using dataclasses. We want to move to using HTTP Classes but first would like to understand what kind of performance gain (if any) we should expect.

 

 

I tried running a few jMeter tests with ~1000 req/sec in both scenarios, comparing the throughput and using the following guide http://devcentral.f5.com/Default.aspx?tabid=63&articleType=ArticleView&articleId=123 but i couldnt see any notable differences.

 

 

Does anyone have any ideas of any other tools i could use to compare my two options? Maybe i need to generate more load?

 

 

Thanks,

 

Naman

4 Replies

  • Naman,

     

     

    I would be surprised if only 1000 conns/sec put any real stress on the LTM. You probably hit that goal using both versions of the iRule, so the throughput would naturally be the same in both cases. Throughput would only be affected if the delay incurred by one of the rules was so great that it affected TCPs windowing system, and that won't be the case here.

     

     

    Did you actually enable timing in the iRule and view the stats after the test had completed? The timing statistics should have told you which iRule used more CPU time, even if the test wasn't heavy enough to result in a visible difference. The average 'cycles' for each iRule should be a good indicator of which one is using more CPU time. I would record the average cycles used for each iRule across several tests on each iRule, then create an average of the averages. This should give you a good idea of which iRule is performing better even if you can't tell using simple statistics like throughput. I'd also ensure that the timing command is providing the output you expect by running at least one test using trivial iRule that checks for whether the request is for a 'jpg' or not, but uses the same pool either way. The average cycles used in that test should be far lower than the more complex iRules.

     

     

     

    Some points to remember when running your tests:

     

    - Always clear your iRule stats between tests: "b rule all stats reset"

     

    - Run a 'bigstart restart tmm' between tests. (will disrupt traffic, do not do this on a production system)

     

     

     

     

    Hope this helps.

     

     

     

    thanks,

     

    --jesse
  • I think Naman was hoping to get details on what kind of performance improvements he might expect if he was replacing an iRule with HTTP classes. Has any performance testing been done to compare an iRule and a set of HTTP classes?

     

     

    Aaron
  • [b]I would be surprised if only 1000 conns/sec put any real stress on the LTM.[/b]

     

     

    Any tips on how I could generate more load? Do you have a prefered testing tool?

     

     

    [b]Did you actually enable timing in the iRule and view the stats after the test had completed?[/b]

     

     

    I did. Results are:

     

    Current iRule: % CPU utilization / request: 0.026238047%

     

    Stripped down iRule utilizing dataclasses: % CPU utilization / request: 0.016391819%

     

    Some notable difference. Do you think i would get a wider gap if i was to generate more load?

     

     

    [b]I think Naman was hoping to get details on what kind of performance improvements he might expect if he was replacing an iRule with HTTP classes. Has any performance testing been done to compare an iRule and a set of HTTP classes?[/b]

     

     

    That's right Aaron.
  • Hoolio,

     

     

    I'm not aware of any testing having been performed that focus on the performance difference between iRules and HTTP classes directly. The final two questions in his post above are what led me to giving testing advice.

     

     

     

    Naman,

     

     

    I'm afraid I'm not as up-to-date on freely available software packages as I'd like to be; my testing is usually done with purpose-built performance test hardware that's not commonly available. I'm not aware of what software based tools are really our there, though anything that provides a consistent level of load would be acceptable. Even a bunch a spare linux machines looping through 'ab' would work, you'd just have to ensure that you are accounting for deviations in performance due to inconsistency from within the test infrastructure. My first thought would be running multiple tests to produce averages that should be indicative of the differences. LTM is very fast, and that makes serious performance tests problematic.

     

     

    Are the results you posted above for a single run, or several runs averages together? What platform are you testing?

     

     

     

    --jesse