Difficult to understand the Gaussian Random Timer?
Asked Answered
M

4

15

I have read the Gaussian Random Timer info in jmeter user manual but it is difficult to understand. any one have idea related to this please explain with example highly appreciated. Thanks in advance.

Matthaus answered 12/7, 2013 at 13:35 Comment(0)
T
27

The Gaussian Random Timer has a random deviation (based on Gauss curve distribution) around the constant delay offset.

For example:

  • Deviation: 100 ms
  • Constant Delay Offset: 300 ms

The delay will vary between 200 ms (300 - 100) and 400 ms (300 + 100) based on Gauss distribution for about 68% of the cases.

Tory answered 16/10, 2013 at 8:22 Comment(1)
thank you, I just wanted to make it a little bit clearer ... :)Tory
E
11

I'll try to explain it with one of the examples already posted:

  • Constant delay offset: 1000 ms
  • Deviation: 500 ms

Approximately 68% of the delays will be between [500, 1500] ms (=[1000 - 500, 1000 + 500] ms).

According to the docs (emphasis mine):

The total delay is the sum of the Gaussian distributed value (with mean 0.0 and standard deviation 1.0) times the deviation value you specify, and the offset value

Apache JMeter invokes Random.nextGaussian()*range to calculate the delay. As explained in the Wikipedia, the value ofnextGaussian() will be between [-1,1] only for about 68% of the cases. In theory, it could have any value (though the probability to get values outside of this interval decreases very quickly with the distance to it).

As a proof, I have written a simple JMeter test that launches one thread with a dummy sampler and a Gaussian Random Timer: 3000 ms constant delay, 2000 ms deviation:

Gaussian Timer Configuration

To rule out cpu load issues, I have configured an additional concurrent thread with another dummy sampler and a Constant Timer: 5000 ms:

Constant Timer

The results are quite enlightening:

JMeter test results

Take for instance samples 10 and 12: 9h53'04.449" - 9h52'57.776" = 6.674", that is a deviation of 3.674" in contrast to the 2.000" configured! You can also verify that the constant timer only deviates about 1ms if at all.

I could find a very nice explanation of these gaussian timers in the Gmane jmeter user's list: Timer Question.

Extractive answered 27/2, 2015 at 15:12 Comment(0)
C
3

Gaussian Random Timer is nearly the same as Uniform Random Timer.

  • In Uniform Random Timer the variation around constant offset has a linear distribution

  • In Gaussian Random Timer, the variation around constant offset has a gaussian curve distribution.

Chlamydeous answered 13/7, 2013 at 13:36 Comment(3)
Thanks for replay, the deviation & Constant Delay Offset values how much affect i.e. suppose deviation is 100 & Constant Delay Offset is 300 in that case how result set gets affects due to these values.Matthaus
you mean pause time vary in between 300-100 & 300+100 i.e. below & up Constant Delay Offset by deviation.Matthaus
This answer is not very precise, and the comments are not accurate. The pause could be smaller than 200ms or bigger than 400ms. See my answer.Extractive
A
2

Constant delay offset(mu)=300 ms,deviation(si)=100 ms mu-si=200,mu+si=400,There are 68% chances of the time gap between two threads are in range of[200,400]

mu-2(si)=100,mu+2(si)=500,There are 95% chances of time gap between two threads are in range of[100,500]

mu-3(si)=0,mu+3(si)=300,there are 99.7% chances of the time gap between two consecutive threads are in range of[0,600]

when you go on like this some where you will get 100% probability that time gap between two threads is 100%

I am restricting my self to 3 iterations because mu-4(si) yields a negative value and time elapsed is always a positive value in this universe.

But it will be very unrealistic to depend on gaussian timer as we have constant timer and constant through put timer with no standard deviation(si).

Hope that it helps.

Aquaplane answered 9/8, 2017 at 11:53 Comment(0)

© 2022 - 2024 — McMap. All rights reserved.