The second runtime settings under the General category of LoadRunner is ‘Pacing’. Pacing is used to regulate the rate of requests hitting to the server. Using Pacing, you can accurately achieve the required TPS rate against your system instead of just mindlessly hammering it. Pacing creates a realistic scenario which adds more accuracy in the performance test result. You can get detailed information on Pacing and Think Time in the article importance of Pacing & Think Time.
Come back to the LoadRunner pacing setting which you can find under runtime settings. As mentioned, ‘Pacing’ is the second tab of the runtime settings window under the General category which controls the rate of iterations during the load test.
LoadRunner provides three ways to insert pacing in the script.
1. Start new iteration as soon as the previous iteration ends
This setting is as same as disabling the pacing i.e. no pacing. As per this setting, when the previous iteration ends, the next iteration will be started immediately without any delay. This is a default setting of pacing.
Where to use?
- This pacing option is used during script debugging
- When TPS and No. of Users are provided in SLA and the application taking more than expected response time, in that case, use no pacing, so that TPS can be achieved with the given number of users.
- To generate the load on the server unrealistically.
2. Start new iteration after the previous iteration ends, with Fixed/Random delay of XX second(s)
This setting provides some delay time (pacing) between two iterations which could be fixed or random as per the scenario. Fixed pacing adds a constant delay between two transactions whereas random pacing provides an option to specify a range for delay time.
Where to use?
- Fixed: When you want to achieve a constant TPS
- Random: When you want to make the scenario more realistic
3. Start new iteration at Fixed/Random intervals, every XX second(s)
This option sets an interval that starts when the Vuser starts the iteration. If the Vuser iterates within the specified interval then it waits for the remaining time until the interval is over else starts the next iteration immediately.
Let’s try to understand this setting with an example. Consider an interval is set to 60 secs and Vuser completes the iteration within 50 secs then the remaining time becomes the pacing i.e. Vuser has to wait for 10 secs before starting the next iteration. If the Vuser surpasses the specified interval, let’s say it takes 65 secs then it proceeds to the next iteration without waiting. In such a case the log displays a message that says ‘Iteration pacing cannot be reached (pace time = 60.00, actual time = 65.00)‘.
This pacing option also has fixed and random time input. Fixed pacing generates a constant interval whereas random pacing provides an option to specify a range for the interval.
Where to use?
- Fixed: When you need to achieve constant TPS and end-to-end response time seems consistent.
- Random: Use where the chances of an end-to-end response time exceeding the specified time is less. It makes the scenario actual and more realistic.
Other Settings in Pacing tab:
- Use Default: On clicking the ‘Use defaults’ button, VuGen resets the pacing settings and enables the first option.
You may be interested: