Load/Performance Testing - How to determine what values to use for Pacing and/or Think Time?

I use HP Loadrunner and Performance Center for load/performance testing.

It's not quite clear to me what best-practices are for setting values for Pacing and Think Time. My team tends to use arbitrary values, but surely it can be done better, with actual reasoning behind it?

What questions should the customer/business be asked in order to determine how we can calculate Pacing and/or Think Time?

Thank you.

  • Hi,

    Think time came to help in simulating the time it takes for a real user to perform a few clicks one after the other.
    A user will normally:

    •  Click on something in the application (this should be surrounded by transaction) 
    • Wait until the application will respond (still included in the context of the transaction opened earlier)
    • Scan the page in his eyes and decide what to do next (should be simulated by think time outside the context of a transaction)
    • Click again (a new transaction should be opened)

    Ideally, in order to select the right values for think times, you should analyze how much time it takes to do it in production environment. Performance Center has Performance Application Lifecycle (PAL) application to help doing so.  Note that PAL requires logs with certain data in them from the web server in the production system in order to do so.

    So think time helps adjusting how fast the end to end operation takes.

    Pacing helps in controlling how often the operations a Vuser perform will be done. Let's take an example, in an online shopping application, I assume search for product will be used in 100% of the hits but buy product will be used in only 40% of the cases. If you have a script that simulate search for product you probably need to simulate more hits of this nature while buy product should have much less hits simulated. Pacing allows you controlling that. Once again, PC PAL can help with that as well.

    Regardless of the above, think time and pacing helps alleviating CPU utilization on the Load Generators. You should use it, but do it right to simulate the right workload.

    Regards,
    Shlomi

  • Hi Jaybiah, 

    usually I set the think time as customer requests, but sometimes it depends on the protocol you have used in the recording phase. 

    In Web HTTP-HTML you can set the think time in the "Think Time" window of Runtime Settings, and you can decide to leave the think time as recorded, define a precise time for every transactions, set it before/after every catched functions (with lr_think_time()) or ignore it (this option disables all the lr_think_time() functions of your script in case of execution). 

    In TruClient, you can insert the think time by the option "Wait" of Toolbox. Since with this protocol you simulate a real navigation, it's impossible to disable completely the think time in the Controller execution. In alternative, you can drag all the wait functions (or the "slower" steps) outside the transaction, so the compute time will be calculated without that delay. 

    I hope to have helped you, 

    Lorenzo