Forum Discussion

Vic_13197's avatar
Vic_13197
Icon for Nimbostratus rankNimbostratus
Sep 29, 2010

TCP Tuning: How to test web application performance

 

Hey everyone... new guy here! I know this is very basic, but it'll be hugely helpful to me.

 

 

We have a web application that we use heavily, but has been having major performance issues. So much so that the company is now looking to go spend big money to replace it. When I heard of this, I checked the configuration on the LTM, it's using default settings (including the default TCP profile). I was thinking there's a chance that making changes there may help, but I'd like to be able to quantify the performance gains, and I don't know how.

 

 

When a user connects via web browser, and completes a transaction, I'd like to be able to see what's actually happening, so when I make the changes, we'd be able to see if there's an improvement.

 

 

So, are there commands on the LTM that I can run to see response times, tcp windows size in relation to the transaction, the effects of disabling nagle... etc, or do I have to use a sniffer? If so, what do I target in terms of the actual virtual server connectivity?

 

 

Thanks much!

 

  • Hamish's avatar
    Hamish
    Icon for Cirrocumulus rankCirrocumulus
    Not so basic. Performance is a black art in itself. To determine whether changing settings would have an effect you'd have to establish where the problem is actually occurring. It's probable that the performance is being constrained at the backend more than the ltm. You'd really need to check all aspects first.
  •  

    Thanks Hamish. Yes I understand that the backend could be an issue... as well as the code itself (it's a home grown app). So, how do I actually test for these? At least, for now I'd like to focus on the LTM to at least eliminate that as an issue since, again, the VS is using default the tcp profile.
  • Hamish's avatar
    Hamish
    Icon for Cirrocumulus rankCirrocumulus
    One of the easiest and best ways is to take a tcpdumpmof the traffic through the f5 and match up the streams on each side of the ltm. As it operates as a proxy you can measure the latencies produced by the ltm directly by checking the timings on the packets that get sent

     

    I'd be surprised if it was more than a millisecond though
  • If it does end up being LTM, change to tcp-lan-optimized and see if the problems go away..I've seen this a few times now.
  • Vic: do you all suspect that the LTM is the culprit here or are you just trying to help matters by tuning it? This is actually a pretty big question.

     

     

    If you're seeking end-to-end clarity on possible performance issues, one thing I'd look at is pointing an Extrahop device at this environment from a spanned port that can see all sides of the transactions (all the way back to the DB if possible). They do an incredible job at identifying bottlenecks and performance issues, as well as giving some guidance on how to rectify such issues from an application delivery perspective.

     

     

    Another thing that I would do is use HTTPWatch to look at the HTTP transactions carefully - it'll show you round trip times, network times, etc. which is extremely handy.

     

     

    -Matt
  • Posted By L4L7 on 09/29/2010 06:44 PM

     

    Vic: do you all suspect that the LTM is the culprit here or are you just trying to help matters by tuning it? This is actually a pretty big question.

     

     

    If you're seeking end-to-end clarity on possible performance issues, one thing I'd look at is pointing an Extrahop device at this environment from a spanned port that can see all sides of the transactions (all the way back to the DB if possible). They do an incredible job at identifying bottlenecks and performance issues, as well as giving some guidance on how to rectify such issues from an application delivery perspective.

     

     

    Another thing that I would do is use HTTPWatch to look at the HTTP transactions carefully - it'll show you round trip times, network times, etc. which is extremely handy.

     

     

    -Matt

     

     

    Oooh...another Extrahop user!
  • I certainly agree with the other comments. This really can be a complex question to answer - it all depends on how far you want to get into it. I second the recommendation by L4L7. If you really want to do this correctly and completely, you're going to need some type of external appliance to do the calculations on a spanned port. If you are just looking to do thumbnail calculations, you can use something like HTTP Analyzer. Wireshark also has basic charting capabilites. I've also exported data from Wireshark and done calculations in Excel before too. It's really a matter of how detailed you want to get.

     

     

    Just to give you a more practical perspective, we had very poor application performance on our LTM-hosted web applications too when I first started managing LTMs. And I didn't know anything about TCP at the time. Having studied TCP for several years now and knowing what I know now about the LTMs, I would immediately do the following:

     

     

    Increase the Send Buffer and Receive Buffer to 65535

     

    Increase the Proxy Buffer Low to 98304

     

    Increase the Proxy Buffer High to 131072

     

    Disable Nagle's Algorithm

     

     

    These settings might be part of the tcp-lan-optimized profile that Chris suggested. If your settings aren't already at this level, you should see an immediate, significant performance improvement. Beyond this, I have seen huge performance gains by disabling Slow Start, though not in all cases - in certain situations it has caused problems. This particular setting takes a bit more study.