https://bz.apache.org/bugzilla/show_bug.cgi?id=58183
Bug ID: 58183
Summary: Threads continue to build post ramp up time.
Product: JMeter
Version: 2.13
Hardware: PC
OS: Linux
Status: NEW
Severity: normal
Priority: P2
Component: Main
Assignee: [email protected]
Reporter: [email protected]
We have noticed a persistent problem with JMeter. Threads continue to build
past the ramp-up period.
Below are the logs for one group.
$ grep "Starting thread group number 1" *.log
2015/07/21 12:21:10 INFO - jmeter.threads.ThreadGroup: Starting thread group
number 1 threads 39 ramp-up 300 perThread 7692.3076 delayedStart=false
$ grep "Thread started: Group1" *.log
2015/07/21 12:21:13 INFO - jmeter.threads.JMeterThread: Thread started: Group1
1-1
2015/07/21 12:21:23 INFO - jmeter.threads.JMeterThread: Thread started: Group1
1-2
2015/07/21 12:21:33 INFO - jmeter.threads.JMeterThread: Thread started: Group1
1-3
2015/07/21 12:21:43 INFO - jmeter.threads.JMeterThread: Thread started: Group1
1-4
2015/07/21 12:21:53 INFO - jmeter.threads.JMeterThread: Thread started: Group1
1-5
2015/07/21 12:22:03 INFO - jmeter.threads.JMeterThread: Thread started: Group1
1-6
2015/07/21 12:22:13 INFO - jmeter.threads.JMeterThread: Thread started: Group1
1-7
2015/07/21 12:22:23 INFO - jmeter.threads.JMeterThread: Thread started: Group1
1-8
2015/07/21 12:22:32 INFO - jmeter.threads.JMeterThread: Thread started: Group1
1-9
2015/07/21 12:22:42 INFO - jmeter.threads.JMeterThread: Thread started: Group1
1-10
2015/07/21 12:22:52 INFO - jmeter.threads.JMeterThread: Thread started: Group1
1-11
2015/07/21 12:23:02 INFO - jmeter.threads.JMeterThread: Thread started: Group1
1-12
2015/07/21 12:23:12 INFO - jmeter.threads.JMeterThread: Thread started: Group1
1-13
2015/07/21 12:23:22 INFO - jmeter.threads.JMeterThread: Thread started: Group1
1-14
2015/07/21 12:23:31 INFO - jmeter.threads.JMeterThread: Thread started: Group1
1-15
2015/07/21 12:23:41 INFO - jmeter.threads.JMeterThread: Thread started: Group1
1-16
2015/07/21 12:23:51 INFO - jmeter.threads.JMeterThread: Thread started: Group1
1-17
2015/07/21 12:24:01 INFO - jmeter.threads.JMeterThread: Thread started: Group1
1-18
2015/07/21 12:24:11 INFO - jmeter.threads.JMeterThread: Thread started: Group1
1-19
2015/07/21 12:24:21 INFO - jmeter.threads.JMeterThread: Thread started: Group1
1-20
2015/07/21 12:24:30 INFO - jmeter.threads.JMeterThread: Thread started: Group1
1-21
2015/07/21 12:24:40 INFO - jmeter.threads.JMeterThread: Thread started: Group1
1-22
2015/07/21 12:24:50 INFO - jmeter.threads.JMeterThread: Thread started: Group1
1-23
2015/07/21 12:25:04 INFO - jmeter.threads.JMeterThread: Thread started: Group1
1-24
2015/07/21 12:25:10 INFO - jmeter.threads.JMeterThread: Thread started: Group1
1-25
2015/07/21 12:25:20 INFO - jmeter.threads.JMeterThread: Thread started: Group1
1-26
2015/07/21 12:25:30 INFO - jmeter.threads.JMeterThread: Thread started: Group1
1-27
2015/07/21 12:25:40 INFO - jmeter.threads.JMeterThread: Thread started: Group1
1-28
2015/07/21 12:25:50 INFO - jmeter.threads.JMeterThread: Thread started: Group1
1-29
2015/07/21 12:26:00 INFO - jmeter.threads.JMeterThread: Thread started: Group1
1-30
2015/07/21 12:26:10 INFO - jmeter.threads.JMeterThread: Thread started: Group1
1-31
2015/07/21 12:26:19 INFO - jmeter.threads.JMeterThread: Thread started: Group1
1-32
2015/07/21 12:26:29 INFO - jmeter.threads.JMeterThread: Thread started: Group1
1-33
2015/07/21 12:26:39 INFO - jmeter.threads.JMeterThread: Thread started: Group1
1-34
2015/07/21 12:26:49 INFO - jmeter.threads.JMeterThread: Thread started: Group1
1-35
2015/07/21 12:26:59 INFO - jmeter.threads.JMeterThread: Thread started: Group1
1-36
2015/07/21 12:27:09 INFO - jmeter.threads.JMeterThread: Thread started: Group1
1-37
2015/07/21 12:27:19 INFO - jmeter.threads.JMeterThread: Thread started: Group1
1-38
2015/07/21 12:27:29 INFO - jmeter.threads.JMeterThread: Thread started: Group1
1-39
1) Here time between two threads is 10 seconds instead of 7692.3076(8 seconds
if we use ceil).
2) These threads are stared in loop. So total time taken to launch all threads
will be Ramp time + loop time(time to makeThread). Please check blow source.
org.apache.jmeter.threads.ThreadGroup#start()
final int numThreads = getNumThreads();
final int perTthreadDelay = Math.round(((float) (getRampUp() *
1000) / (float) numThreads));
for (int i = 0; running && i < numThreads; i++) {
if (i > 0) {
pause(perTthreadDelay); // ramp-up delay (except first)
}
if (usingScheduler && System.currentTimeMillis() > endtime) {
break; // no point continuing beyond the end time
}
.
.
newThread.start();
}
}
We can modify perThreadDelay for each iteration instead of fixed value.
final float rampUpOrg = (float) (getRampUp() * 1000);
final long currentTime = System.currentTimeMillis();
for (int i = 0; running && i < numThreads; i++) {
if (i > 0) {
final float elapsed = System.currentTimeMillis() -
currentTime;
final int perThreadDelay = Math.round(((float) (rampUpOrg -
elapsed) / (float) (numThreads - i)));
pause(perThreadDelay); // ramp-up delay (except first)
}
.
.
newThread.start();
}
}
--
You are receiving this mail because:
You are the assignee for the bug.