Jmeter: Why increasing number of threads did not change latency? - jmeter

How is this possible that in Jmetetr increasing number of users (threads) in my test did not changed the latency (Response time)?
I got the same latency for 100 threads and for 300 threads.

Latency is the difference between the time when a request was sent and time when the response has started to be received.
As per JMeter Glossary
JMeter measures the latency from just before sending the
request to just after the first response has been received. Thus the
time includes all the processing needed to assemble the request as
well as assembling the first part of the response, which in general
will be longer than one byte. Protocol analysers (such as Wireshark)
measure the time when bytes are actually sent/received over the
interface. The JMeter time should be closer to that which is
experienced by a browser or other application client.
Response time (= Sample time = Load time = Elapsed time) is a difference between the time when the request was sent and time when the response has been fully received.
As per JMeter Glossary
JMeter measures the elapsed time from just before sending the request
to just after the last response has been received. JMeter does not
include the time needed to render the response, nor does JMeter
process any client code, for example, Javascript.
So Response time always >= latency.
So it is possible that you may have same Latency for 100 and 300 threads but Response time will be different or increased.

If you have stable network connectivity between JMeter and Application Under Test it is expected that Latency wouldn't change not matter how many threads you kick off. It is "pure" network metric which tells how long did it take for the request to reach to the server.
Check out How to Analyze the Results of a Load Test article to see the impact of Latency for the end user

Related

Effect of slow/unstable network connection in JMETER

Is network connection can affect the connection between servers and JMeter? Are there any way to reduced the number of error percentage and high average response time?
Of course it can, looking into JMeter Glossary:
Elapsed time. JMeter measures the elapsed time from just before sending the request to just after the last response has been received. JMeter does not include the time needed to render the response, nor does JMeter process any client code, for example Javascript.
Latency. JMeter measures the latency from just before sending the request to just after the first response has been received. Thus the time includes all the processing needed to assemble the request as well as assembling the first part of the response, which in general will be longer than one byte. Protocol analysers (such as Wireshark) measure the time when bytes are actually sent/received over the interface. The JMeter time should be closer to that which is experienced by a browser or other application client.
Connect Time. JMeter measures the time it took to establish the connection, including SSL handshake. Note that connect time is not automatically subtracted from latency. In case of connection error, the metric will be equal to the time it took to face the error, for example in case of Timeout, it should be equal to connection timeout.
So the formula is:
Response time = Connect Time + Latency + actual server response time
If there are networking problems - it will have direct impact on the response time. Check out How to Analyze the Results of a Load Test Using BlazeMeter article to see how networking issues affect test results. So if you want to get more "clear" picture it's recommended to have JMeter load generator(s) having direct access to the application under test, to wit use LAN instead of Wi-Fi, make sure that NIC cards (as well as routers/switches) have enough bandwidth to serve the anticipated data volumes.

Mean Response Time vs Mean Turnaround Time (DIN_IEC_25023) Difference?

What is the Difference between Mean response time and Mean turnaround time in a Microservices environment?
ISO Description:
Mean Response Time:
How long is the mean time taken by the system to respond to a user task or system task?
Mean Turnaround Time
What is the mean time taken for completion of a job or asynchronous process?
I am currently measuring the Mean Response Time by Calculating the Average of the Latency Times of the Responses. Is the difference maybe that am just sending 1 (Synchronous) Request while measuring Mean Response Time and maybe using multiple Threads and hitting the Service with multiple Request when measuring Mean Turnaround Time?
Or is the difference that Mean Response time just measures the time the Systems needs to response and the Response itself doesn't matter?
How would the measurements of both Times (in a Microservices Environment) differ? I don't use any Asynchronous Responses.
Would the difference maybe be
MRT = Latency,
MTT = Elapsed time?
Elapsed time. JMeter measures the elapsed time from just before sending the request to just after the last response has been received.
JMeter does not include the time needed to render the response, nor
does JMeter process any client code, for example Javascript.
Latency. JMeter measures the latency from just before sending the request to just after the first response has been received. Thus the
time includes all the processing needed to assemble the request as
well as assembling the first part of the response, which in general
will be longer than one byte. Protocol analysers (such as Wireshark)
measure the time when bytes are actually sent/received over the
interface. The JMeter time should be closer to that which is
experienced by a browser or other application client.
https://jmeter.apache.org/usermanual/glossary.html
As far as I know, the response time is the time it takes the system to generate a response for a received petition. It is measured from the moment the system receives the petition to the moment it sends out the response.
On the other hand, the turnaround time is the time it takes for the petition to be fulfilled. It is measured from the moment the petition is sent to the moment the response is received.
MRT and MTT are just the corresponding means for these times across several petitions.
Using a client - server example:
PS: Petition Sent
PR: Petition Received
RS: Response Sent
RR: Response Received
[client] [ network ] [ server ] [ network ] [client]
PS ---------------- PR ------------ RS ------------------- RR
0 ms 730 ms 940 ms 1620 ms
\ \________________/ /
\ response time /
\______________________________________________________/
turnaround time
The response time is 940 - 730 = 210 milliseconds, the time it took the server to generate a response.
The turnaround time is 1620 milliseconds, the time it took for the client to receive a response.
JMeter's "elapsed time" would be the same as turnaround time here, while "latency" would be the time it takes for the client to start receiving the response. If the response is a 10 MB chunk of data over a 1000 Mbps line, it'd take roughly 80 ms to be completely received, so elapsed time would be latency + 80.

How Throughput and Response time are related

I ran a JMeter test for 193 samples
where I could see my average response time as 5915ms and Throghput as 1.19832.
I just want to know how are they exactly related
All the answers are in JMeter Glossary
Elapsed time. JMeter measures the elapsed time from just before sending the request to just after the last response has been received.
Throughput is calculated as requests/unit of time. The time is calculated from the start of the first sample to the end of the last sample. This includes any intervals between samples, as it is supposed to represent the load on the server.
The formula is: Throughput = (number of requests) / (total time).
The relationship is: higher response time - lower throughput and vice versa.
You can use charts like Transactions per Second for throughput and Response Times Over Time for response times to get them plotted on your test timeline and Composite Graph to put them together. This way you will be able to track the trends.
All 3 charts can be installed using JMeter Plugins Manager
TL;DR
No, but yes.
Both aren't related directly, but when increasing Throughput, it will probably affect server response time due to load/stress on server.
If there are timeout errors response time will probably increase.
But for validation or firewall errors - response time will probably decrease.
There's a long explanation in JMeter archive, last is using Disney to demonstrate:
Think of your last trip to disney or your favorite amusement park. Lets define capacity of the ride to be the number of people that can sit on the ride per turn (think roller coaster). Throughput will be the number of people that exit the ride per unit of time. Lets define service time the the amount of time you get to sit on the ride. Lets define response time or latency to be your time queuing for the ride (dead time) plus service time.
In terms of load/Performance testing. Throughput and Response times are inversely proportional. i.e
With increase in response time throughput should decrease.
With increase in Throughput response time should decrease.
You can get more detailed definitions in this blog:
https://nirajrules.wordpress.com/2009/09/17/measuring-performance-response-vs-latency-vs-throughput-vs-load-vs-scalability-vs-stress-vs-robustness/
Throughout increases to some extent and remains stable when all the resources becomes busy. Now, if user requests increases further at this point response time would increase. But if response time increase is only because of internal queuing then due to the fact that system is taking more requests in at the same time response time is also increasing, throughout doesn't change. When queues are full more requests should fail. If response increase is due to some delay in processing or serving the request, for example running a query on database then due to the fact that system is not accepting more request and at the same time response time is also increasing, consequently throughout would drop.
Just a general explaination.
Respose Time : It is the time calculated when user send the request till request gets finnished.
Throughput : It is server property that number of transaction or request can be made during certain amount of time. here 1.19832 /minute means server cand hadle 1.19832 sample per minute.
As Respose Time increses Throughput increases.

jmeter latency vs actual browser load test

Is this a valid testing for checking of how much time to load a web under test with 500 concurrent user.
I run jmeter with a 500 thread user , ramp-up period = 50 and loop count forever. with a listener with "results in table" that also record the latency.
While jmeter is running, i try to load/browse the web under test using actual browser(in my case IE8) ,
and it loads in 7 secs. but based on the latency the majority of result is 50k++.
is the 7 secs load time in actual browser is consider a "response time result"? since it is load in actual browser.
another question:
is the latency 50k is converted to sec? means 50secs. to load the web under test if we based on the jmeter result?
kindly clarify this to me please :)
In simple words, Latency is network delay (time taken by network while transferring data)
In JMeter latency is time between, when request is sent to server till first byte of response reaches the client/Jmeter. If response time is very low enough then you wont get precise measure of latency. If Response time is high then probably you will get correct measure.
In Jmeter Latency shares the measure as response time i.e. ms/seconds.
Your 7sec in browser is (Response time (Processing time + Latency) + Rendering time). In Jmeter rendering time is not present (As it is not a browser). Though your rendering is very low as compared to response time but in cases heavy content websites rendering time is comparable. Thus should be considered.
I hope this clears your doubts :)

What is JMeter throughput

My website is hosted on cloud. I am running JMeter from my office. Now I want to know if the throughput that I get in Summary Report contain network latency also.
I have this kind of API details in my log file.
GET mywebsite/getBday 200 67
So for all getBday requests it gives me processing time of 67ms. But my JMeter show throughput 1.20 reqs/sec and latency here is 8.5 secs (latency = Average field from Summary Report).
Can you tell me if the throughput that I get in Summary Report contain network latency also. If so, how can I exclude it?
Response time includes network latency. It measures the time the request was made to the time the response was received.
How can jmeter know how long the request spent in transit, unless the server can respond with a time the request was received?
The only way to exclude network latency from jmeter results is to measure it at the server and send back the information in the response (or by some other method).
Most servers should have monitoring software running anyway, like carbon/graphite. You can use that to measure the true server response times, and show network latency.
As I am most testing Java stacks, I use jconsole as well on the same machine as jmeter for side by side comparison of graphs to determine real server capability.
"Can you tell me if the throughput that I get in Summary Report contain network latency also."?
The answer is no - throughput is a measure of the completion rate of requests and the formula for calculating it does not include latency. See below.
Probably worth looking up a definition for throughput. JMeter provides its own :
"Throughput is calculated as requests/unit of time. The time is calculated from the start of the first sample to the end of the last sample. This includes any intervals between samples, as it is supposed to represent the load on the server. The formula is: Throughput = (number of requests) / (total time)."
https://jmeter.apache.org/usermanual/glossary.html

Resources