Target Concurrency 12
Ramp Up Time(Sec) 48
Ramp up step count 2
Hold Target Rate(sec) 48
Thread Iteration limit is set to 1
I am expecting total user should be 24 i.e.
6 user(as part of 1st step up count) , Next 6 user (as part of 2nd step up count)
Then complete 12 user (as part of Hold Rate Time).
But it is not happening as per above expectation
Related
I'm using NiFi to take in some user data and combine all the JSONs into one record. The MergeRecord processor is working just like I need, except it always leaves out one record (usually the same one every time). The processor is set to run ever 60 seconds. I can't understand why because there are only 56 records to merge. I've included images below for any help y'all may have.
Firstly, you have 56 FlowFiles, that does not necessarily mean 56 Records unless you have 1 Record per FlowFile.
You are using MergeRecord which counts Records, not files.
Your current config is set to Min 50 - Max 1000 Records
If you have 56 files with 1 Record in each, then merging 50 files is enough to meet the Minimum condition and release the bucket.
You also say Merge is set to run every 60 seconds, and perhaps this is not doing what you think it is. In almost all cases, Merge should be left to the default 0 sec schedule.
NiFi has no idea what all means, it takes an input and works on it - it does not know if or when the next input will come.
If every FlowFile is 1 Record, and it is categorically always 56 and that will never change, then your setting could be Min 56 - Max 56 and that will always merge 56 times.
However, that is very inflexible to change - if it suddenly changed to 57, you need to modify the flow.
Instead, you could set the Min-Max to very high numbers, say 10,000-20,000 and then set a Max Bin Age to 60 seconds (and the processor scheduling back to 0 sec). This would have the effect of merging every Record that enters the processor until A) 10-20k Records have been merged, or B) 60 seconds expire.
Example scenarios:
A) All 56 arrives within the first 2 seconds of the flow starting
All 56 are merged into 1 file after 60 seconds of the first file arriving
B) 53 arrive within the first 60 seconds, 3 arrive in the second 60 seconds
The first 53 are merged into 1 file after 60 seconds of the first file arriving, the last 3 are merged into another file after 60 seconds from the frst of the 3 arriving
C) 10,000 arrive in the first 5 seconds
All 10k will merge immediately into 1 file, they will not wait for 60 seconds
Let's say that I have the current configuration :
Number of Threads (users): 150
Ramp-up : 30
Loop Count : None
If I add up a duration of 2 mins so :
Number of Threads (users): 150
Ramp-up : 30
Loop Count : None
Duration (minutes) : 2
How does Jmeter going to react? If each Threads take about 10 seconds to complete
Thanks in advance
Both Loop Count and Duration (if both present) are taken into account, whichever comes first. So in first configuration, you are not limiting loop count or duration, so the script will run "forever". In second case, loop count is still not limited, but duration is. So the test will stop 2 minutes after startup of the very first user, and the time includes ramp-up time. Stopping includes not running new samplers, and hard stop for all running samplers.
In your case, 150 users will finish starting after 30 sec. That means the first thread to run will complete 3 iterations (x10 sec) by the time the last thread just started its first.
Within the remaining 90 sec, all threads will complete roughly 8-9 iterations.
So for the first thread you should expect 11-12 iterations, for the very last thread to start, 8-9 iterations. Remaining threads anywhere between those numbers. Assuming ~30 threads executed same number of iterations, between 8 and 12, you get roughly 1500 iterations in total (could be a little over or under). Last iteration of each thread may be incomplete (e.g. some samplers did not get to run before test ran out of time).
Generally, since duration may leave unfinished iterations, I think it's only good as a fall back or threshold in pipeline automation. For example: run is configured to complete 1000 iterations (should take about 16 min if iteration takes 10 sec). So duration is set to 24 min (gives about 50% slack). It won't be needed if performance is decent, but if execution takes extremely long, we may hard stop it at 24 min, since there's no point to continue: we already know something is wrong.
Whats the difference in JMeter between:
(a) 50 threads 5 second ramp up and 1 loop count
(b) 10 threads 1 second ramp up and 5 loop count
For me (a) and (b) seem to be the same thing, 10 threads will be instantiated every second for a total of 5 seconds.
Am I missing something here?
ramp-up period doesn't effect total number of threads. see user manual:
The ramp-up period tells JMeter how long to take to "ramp-up" to the full number of threads chosen
So both scenarios will be executed 50 times, the difference is the order of the threads. In your case let's assume each thread takes ~5 minutes
Scenario a (without encountering any bottleneck) will take ~5 minutes (+5 seconds ramp up)
While Scenario b will take approximately 5 times more because each loop will start after threads ends. 5 minutes will take for each loop - ~25 minutes (+1 second ramp up)
Also you can have limitation on your server that doesn't allow 50 threads executing in 5 seconds same operation so Scenario a will be impossible to execute.
I am new to Jmeter and confused about those 4 settings:
number of threads,
ramp up period,
loop count,
duration in scheduler.
Thread Group 1: # of threads:1, ramp up period:0, loop count:5, no scheduler
Thread Group 2: # of threads:5, ramp up period:0, loop count:1, no scheduler
Thread Group 3: # of threads:1, ramp up period:1s, loop count:5, no scheduler
Thread Group 4: # of threads:5, ramp up period:5s, loop count:1, no scheduler
Thread Group 5: # of threads:1, ramp up period:1s, loop count:forever, duration in scheduler:5s
Thread Group 6: # of threads:5, ramp up period:5s, loop count:forever, duration in scheduler:5s
Is there any difference between thread group 1 and 2?
How long is the time cap between each loop?
Is there any difference among thread group 3, 4, 5 and 6?
Should group 3, 4, 5 and 6 all take 5 seconds to finish sending all requests? Should the total # of results be 5 in each group?
When I tried thread group 5, I got around 83 responses, why is there not just 5 responses? Does this mean the ramp up period is not working?
I am so confused about the differences between those groups, hoping someone can help me out. Thanks a lot in advance!
Firstly, short definition of each parameter:
Number of Threads: simulates the number of users
Ramp up period : how much time Jmeter takes to get all threads started
Loop count: number of times each thread performs the test case
Duration in scheduler: the duration for which the test is to be run. In this case, the value in the end-time field shall be ignored and the relative end-time will be calculated from the start-time and duration
A important thing to understand here is that the Ramp-up period has no relation to the Loop count. It is only related to the Number of Threads. If there are 10 threads and a ramp-up time of 100 seconds, then each thread will begin 10 seconds after the previous thread started, for a total time of 100 seconds to start all threads in the thread group.
Now the answer to each Thread Group Case:
Thread Group 1: # of threads:1, ramp up period:0, loop count:5, no scheduler
Thread Group 2: # of threads:5, ramp up period:0, loop count:1, no scheduler
Thread Group 3: # of threads:1, ramp up period:1s, loop count:5, no scheduler
Thread Group 4: # of threads:5, ramp up period:5s, loop count:1, no scheduler
Thread Group 5: # of threads:1, ramp up period:1s, loop count:forever, duration in scheduler:5s
Thread Group 6: # of threads:5, ramp up period:5s, loop count:forever, duration in scheduler:5s
Q1. Is there any difference between thread group 1 and 2?
Thread Group 1 has a single thread that will repeat the same test 5 times i.e. as one test finishes repeat the test till a loop count of 5 is reached
Thread Group 2 has 5 threads that will start simultaneously as the Ramp-up Period is 0, so there it shall mock 5 users simultaneously on the system
Q2. How long is the time cap between each loop?
The time cap is a factor of the ramp-up period that is divided equally between the number of threads in the thread group. Loop is a continuous process that shall continue till the loop count is reached. "Time cap" is not a term used in the JMeter docs, but assuming what you mean, it can be set between loops by using Test Action or other JMeter mechanisms if you need fine-grained control.
Q3. Is there any difference among thread group 3, 4, 5 and 6?
Yes, all the parameters are different, so as described above, the behavior is different.
Q4. Should group 3, 4, 5 and 6 all take 5 seconds to finish sending all requests? Should the total # of results be 5 in each group?
No, it is all subjective to each condition.
In Thread Group 3, a single thread shall execute the same thread 5 times, so no control over time
In Thread Group 4, there are 5 thread and based on the ramp-up period, each thread shall start 1 s after the other, so it will take at-least 4-5 seconds to complete the test (after the last test)
Thread Group 5 and 6 shall each only run for a duration for 5 seconds. If the test is completed before that then fine, otherwise the test shall be terminated and stopped
Q5. When I tried thread group 5, I got around 83 responses, why is there not just 5 responses? Does this mean the ramp up period is not working?
Why should there be only 5 responses??? Thread Group 5 shall create a single thread that shall execute the test in loop for ever. If the duration was not defined the test would run in an infinite loop. Since the duration is defined, the test shall only run for the duration period.
Note to All: The loop count is thread specific. It specifies the number of times the test should be repeated for each thread. The ramp-up period is related to the #Thread (User) and has no relation to the loop count
Yes, 1 simulates one user doing 5 times the test scenario inside Thread Group1, 2, simulates 5 users executing test scenario one time
No time if you don't use any Timer
Yes, 3 same as Thread Group 1, 4 same as Thread Group 2 but users are started 1s after each others, 5, same as Thread Group 1 but running for 5 s, so you don't know how many times it will execute. 6 same as Thread Group 2 but runs for 5 s
5 and 6 will run for 5 s, 3 and 4 as explained in 3. No
5.Because it runs for 5 seconds without any pause as you didn't set any timer. As you have only one thread, it starts immediately and runs for 5 seconds.
Read:
http://jmeter.apache.org/usermanual/test_plan.html
I want to run a JMeter test with a number of concurrent threads with each thread sending a request every 10 seconds.
These are my thread properties.
Number of Threads: 10
Ramp-Up Period: 10
Loop Count: 1
Result: 10 requests divided over 10 seconds, so every second a request and exactly what I want.
Now I want to run this test for 3 times(30 seconds). So I set the Loop Count to 3.
But the result is: 30 requests in 10 seconds. This is strange, because I would expect to run this for 30 seconds and get 1 request per second.
How can I achieve this with JMeter?
My final goal is to run this test for a long period and also increase the Number of Threads.
How to do this with JMeter?
I researched this today and came to this conclusion: The Loop Count setting is a complete misnomer. It doesn't actually loop in any sort of chronological sense, even if your Test Plan has Run Thread Groups consecutively checked. What it does do is multiply your thread group and run all multiples concurrently. Therefore, the Ramp-Up Period is only respected once, and NOT once per "loop" - there is no temporal loop!
An explanation with graphs can be found here: http://pro-programmers.blogspot.com/2009/07/jmeter-max-threads-with-rump-up-and.html
Seems that the most simplest ways to control throughput in your tests is using either standard "out-of-box" Constant Throughput Timer or custom Throughput Shaping Timer from jmeter-plugins collection.
In both the cases structure of the test will be like the following:
Thread Group
Number of Threads = N
Ramp-up Period = N
Loop Count = 1
Constant Throughput Timer
Target Throughput = 60
Calculate Throughput based on = "all active threads in current thread group"
. . .
Loop Controller
Loop Count = M
. . .
HTTP Request
. . .
Here Loop Controller defines number of iterations.
Looks like both the timers are not absolutely precise as well as both are a bit differently configurable:
Here is also a kind of practical example how to vary the throughput.
In my experience with Jmeter if you set
Number of Threads: 10
Ramp-Up Period: 10
Loop Count: 1
you create 10 threads into 10 seconds so you create 1 thread every second.
With loop count of 1 you repeat this once.
But if you increase loop count I think that you don't create new threads but repeat jmeter elements procedure in the Thread Group therefore the time beetween the request isn't 30 seconds but just over 10s.
If you want to create 30 threads within 30 seconds you have to set
Number of Threads: 30
Ramp-Up Period: 30
Loop Count: 1
If you want to repeat 10 threads for 3 times with ramp- up of 10 seconds you should insert a Timert->Constant Timer with thread delay of 10000 ms so you obtain 30 requests in 30 seconds (really you should consider the time of executions of the task)
refer link: http://www.testingjournals.com/5-must-know-features-thread-group-jmeter/
scenario 1 :
number of threads = 20
Ramp-up period =100
loop count=1
Every 5 seconds(100/20) 1 request/thread will hit the server,Execution will start with 1 request at a time
scenario 2 :
number of threads = 20
Ramp-up period =100
loop count=4
Every 5 seconds(100/20) 4 request/thread will hit the server, once the 1st request/thread completes , it will start 2nd loop by executing same HTTP request,Execution lasts until all 20 threads executes all HTTP requests 4 times
My understanding of Ramp-Up is that a value of 0 will fire all threads at the same time (concurrently).
You might be able to achieve what you want by setting the following:
Number of Threads: 10
Ramp-Up Period: 0
Loop Count: N
and then using a Controller to determine when to end each loop.
Yup, the Loop Count parameter is not intuitive. From what I figured out it is actually the number of times the thread/user performs a particular test
So if I understand correctly your intention that you want:
to run N number of concurrent threads/users
each of them sends a request every 10 seconds
you want to run this scenario for around 30 seconds
the configuration should be the following:
Number of Threads: N
Ramp-up Period: 0
Loop Count: 3
And in Constant Throughput Timer (within the Thread Group) you should set Target Throughput (samples per minute)=6, which means request every 10 seconds