Hang of Throughput Shaping Timer 2.5 for zero rps

79 просмотров
Перейти к первому непрочитанному сообщению

Vyacheslav Smirnov

не прочитано,
6 мая 2022 г., 07:13:4406.05.2022
– jmeter-plugins
Hello! I use Throughput Shaping Timer 2.5. Sometimes thread worked extra time after test. End of test is a rampUp from big RPS to zero - it is root cost of current problem.

Zero rps is root cost of hang.

Thread dump of JMeter for this "extra time" moment:

"put2map-ThreadStarter 3-421" #7127 prio=5 os_prio=31 cpu=5920.67ms elapsed=23607.27s tid=0x00007fa50896f800 nid=0x20dc07 in Object.wait()  [0x0000000379644000]
   java.lang.Thread.State: TIMED_WAITING (on object monitor)
        at java.lang.Object.wait(java...@11.0.14/Native Method)
        - waiting on <no object reference available>
        at kg.apc.jmeter.timers.VariableThroughputTimer.delay(VariableThroughputTimer.java:98)
        - waiting to re-lock in wait() <merged>(a kg.apc.jmeter.timers.VariableThroughputTimer)
        at org.apache.jmeter.threads.JMeterThread.delay(JMeterThread.java:982)
        at org.apache.jmeter.threads.JMeterThread.executeSamplePackage(JMeterThread.java:554)
        at org.apache.jmeter.threads.JMeterThread.processSampler(JMeterThread.java:489)
        at org.apache.jmeter.threads.JMeterThread.run(JMeterThread.java:256)
        at java.lang.Thread.run(java...@11.0.14/Thread.java:829)
   Locked ownable synchronizers:        - None

Variables for this "extra time":
rps = 0.0;
cndDelayd = 2;

this values provide this effect:

int delayMs = getDelay(millisSinceLastSecond); = return (int) (1 + 1000.0 * (cntDelayed + 1) / rps); = return (int) (1 + 1000.0 * (2 + 1) / 0.0); = MAX_INT

And delayMs = MAX_INT;
Jmeter.Time.Hang.png

Vyacheslav Smirnov

не прочитано,
6 мая 2022 г., 07:22:3306.05.2022
– jmeter-plugins
Could you please create hard code constants or properties for maxDelayMs or minumumRps?

double minumumRps = 0.01;
int maxDelayMs = 10 * 60 * 1000;

if (rps < minumumRps) { rps = minumumRps; }
if (delayMs > maxDelayMs) { delayMs = maxDelayMs; }

for this code:
kg/apc/jmeter/timers/VariableThroughputTimer.java
public synchronized long delay()
private int getDelay(long millisSinceLastSecond)

Thank you

Vyacheslav Smirnov

не прочитано,
6 мая 2022 г., 07:24:2206.05.2022
– jmeter-plugins
Workaround - do not use rps 0.0 for Throughput Shaping Timer 2.5, never.

Vyacheslav Smirnov

не прочитано,
6 мая 2022 г., 09:59:0106.05.2022
– jmeter-plugins
Documentation describe work with zero:

Few Important Notes
  1. JMeter threads of Thread Groups in scope of the Element will be stopped when RPS schedule finishes.
  2. provide enough working threads for your RPS, JMeter timers can only delay threads (and limit RPS). You may pair this plugin with Concurrency Thread Group using Schedule Feedback Function to dynamically maintain thread count required to achieve target RPS.
  3. if you're using versions of JMeter lower than 3.3 and if you have RPS that lower at the end of test, make threads to lower also. Оtherwise you'll have a spike in last second.
  4. avoid using zero RPS value as start of test, this produce spike also
  5. avoid zero RPS during the test, this may lead to nasty effects
But documentation contain Image with zero rps ))) :
(rumpUp from 1500 to 0 rps in the end of test)

Ответить всем
Отправить сообщение автору
Переслать
0 новых сообщений