Ramp-up configuration
Loadero allows not only to specify how many participants you would like to simulate for a test, but also define the exact pace at which these participants will begin test execution, typically referred to as the ramp-up phase. Ramp-up pacing may be configured through the use of test configuration parameters like the increment strategy and start interval. How long a participant executes the script once it begins execution, however, is up to the script logic.
When defining the ramp-up phase of a test, there are four key aspects to pay attention to as all of them together decide the pace at which participants will begin executing the test. These are:
- the actual amount of participants;
- whether participant groups are used and how participants are distributed among them;
- the start interval;
- the increment strategy;
Start interval
The start interval is the timespan of the ramp-up phase, which is something you will want in most load tests. Without a ramp-up phase you risk subjecting the system under test to a DDoS attack instead of realistic load conditions. The start interval defines the maximum amount of time within which all participants must begin script execution. If your start interval, for example, is 1 minute, then after one minute passes since the moment the test run entered the "Running" phase, all participants will be executing the script. Any earlier than that and some participants may still be idle.
The start interval does not define the time gap between two sequential participants.
If the start interval is set too large relative to the amount of time it takes to execute the script, then it is likely to happen that some participants will finish execution before others had even started it. Keep this in consideration when planning for a certain concurrent load.
To get an idea of how long the script takes to execute, we suggest running the test with just one participant first. Then you can use the results as a base to evaluate how long the start interval needs to be to ensure everyone starts the test before the first participants finish execution. Additionally, if simply reducing the start interval is not an option, you can artificially extend the script and make participants stick around for longer by:
- looping the scenario or parts of the scenario in the script instead of executing it one time
- if the test is a WebRTC call, then you can simply extend the pause of how long the participants stay in the call
- adding a pause at the beginning of the test to let the latter participants catch up, this can be particularly handy for circumventing bottlenecks where the authentication module may allow only a certain amount of requests per second (RPS) but the target RPS for the system in general may be higher;
Increment strategy
The increment strategy is strongly connected to the start interval. While the start interval defines the beginning and end of ramp-up, the increment strategy affects how the participant start times are distributed throughout this ramp-up.
Loadero offers four increment strategy options:
- Linear participant - participants will begin execution one by one in the order
that they had been created in the test. If you create one participant "A" with
count=8
and then another participant "B" withcount=2
, then the order will be eight A participants followed by two B participants. The amount that passes between any two sequential participants starting execution is the same, meaning that participant start times are spread out evenly across the ramp-up phase. - Linear group - the exact same principles apply as for the "Linear participant" strategy, with one notable exception - participants will begin execution in groups, any one group's participants will join simultaneously. Groups will begin the test in the order they were created and the same amount of time will pass between two sequential groups beginning execution.
- Random participant - participants will begin execution one by one in a random order. The amount of time that passes between any two sequential participants is unpredictable. The only predictable aspect when using this strategy is that by the time the start interval has ended, all participants will have begun execution. Unlike linear strategies the start time for the first and last participants is also unpredictable. Even if the start interval is 5 minutes, it could be that all participants have already begun script execution by the 4-minute mark.
- Random group - the exact same principles apply as for the "Random participant" strategy, with one notable exception - participants will begin execution in groups, any one group's participants will join simultaneously. The order in which the groups start and the groups' timing are unpredictable.
While linear strategies allow more control to calculate an exact load profile for a specific scenario, random strategies will shuffle the order of which participant/group starts when. Group strategies can be useful for cases where bursts of sudden load are what matters rather than the target concurrent load at the end of the start interval.
Linear strategies take into account the order in which the resources were created by using their unique IDs. You can find the ID by opening the editing window for the participant (or group) and checking the top right corner.
If you need participants (groups) to join in a specific order that differs from the order in which they were created, then you can duplicate the resource and then delete the original. Since the duplicated resource has a greater ID, it will now be put at the end of the order.
Calculating the time gap between participants (or groups) starting the test
Calculating an exact time gap between two participants or two groups is only possible when using one of the linear increment strategies. This is not possible for random strategies.
Since the first participant or group (depending on whether a participant or group strategy is used) always starts at 00:00.000 in linear strategies, this means that tests that have only one participant (or only one group) will entirely ignore the start interval as there are no additional participants (or groups) to distribute.
The first participant (or group) in a linear strategy will begin execution at exactly 0 seconds since the start of the test. The image below displays the nature of how these strategies work.
Let's look at the "Linear participant" strategy example provided in the image. This test has 8 participants. Let's assume the start interval is 70 seconds. The first participant will always start at 0 seconds since the beginning of the test (and this is regardless of what the start interval value is), whereas the last participant will always start at the end of the start interval, so in this case - 70 seconds since the beginning of the test. The rest of the participants will be linearly distributed throughout the start interval, so the gap between any two sequential participants will be the same.
You can calculate that time gap via the formula
gap = start_interval / (count-1)
, where count
is the amount of participants
when using the "Linear participant" strategy or the amount of groups when using
the "Linear group" strategy.
In the provided example that would mean that the gap is gap = 70 / 7 = 10
seconds. To get a better idea of why this formula is the way it is, you can
manually calculate the start point of each participant in this example. You will
see that the final participant ends up at exactly the point that matches the end
of the start interval:
- Participant #1 - begins at 00:00.000
- Participant #2 - begins at 00:10.000
- Participant #3 - begins at 00:20.000
- Participant #4 - begins at 00:30.000
- Participant #5 - begins at 00:40.000
- Participant #6 - begins at 00:50.000
- Participant #7 - begins at 01:00.000
- Participant #8 - begins at 01:10.000
Time gaps between groups for the "Linear group" increment strategy are calculated the exact same way. In the previous example, if there were 8 groups, then a group would start every 10 seconds.