Average time displayed by JMeter doesn't matches the Elapsed time in Fiddler for a HTTP request - jmeter

Scenario:
A JMeter script for a single user with a single HTTP request is configured to run via localhost port 8888 (port sniffed by Fiddler).
The request travels properly to the server and a successful response is received.
The issue is, the Average time displayed in the Listener for the HTTP response in not matching with the overal elapsed time of Fiddler for that request.
e.g. If the Average time displayed is of 24 millisecond, Fiddler reports 15 millisecond (Note: high-resolution timers enabled in Fiddler)
I am trying to figure out why is JMeter consuming a small bit of extra time for each request, what network or system processing element its considering additional to those of Fiddler.

JMeter consumes a bit of extra time when you run in GUI mode. In Non- GUI the response is better. The details on response time can be read here JMeter - response time calculation

Related

Apache JMeter not getting response

I'm testing several functions and in some I'm having problems increasing the number of requests. For example, I was testing the factors function with 32 requests in 30 seconds and I had no problem, but when increasing to 64 requests I had the following problem:
open requests
Requests open normally
completed requests
but after they finish their execution i don't get any response in jmeter. It seems that the connection was lost and it is waiting for the timeout .
I'm testing a weak VM, only 1 vCPU and 2Gb.
If you're using HTTP Request sampler by default it will wait for response "forever" (unless the TCP timeout is set somewhere in underlying JDK or OS)
So if your application gets overloaded and fails to respond JMeter will wait for the response infinitely, in order to avoid the situation with "hanging" test consider setting reasonable connect and response timeouts, the setting live under "Advanced" tab of the HTTP Request sampler (or HTTP Request Defaults if you have more than one HTTP Request sampler in your Test Plan)

What does jmeter do if no response is received?

i send 10 requests to the server which was recorded by blazemeter chrome plugin.
some of them are signalr requests that have connection token values created runtime.
signalr requests are
signalr/negotiate?..
signalr/connect?
signalr/start?
signalr/abort?
if i dont use regular expression extractor for correlation, the signalr request has wrong responses and test will fail.
if i use correlation, some interesting results are present.
if i use it only in signalr/start it will pass, the other signalr's will fail.
if i add the connectionParameter to the signalr/connect... request. it will do nothing and test will not continue and not finished. So, i wonder if Jmeter dont send the request or any response is received. in view result tree listener, the request is not seen in this case.
What will Jmeter do if a response is not send by server?
or any other information that i dont know related to signalr/connect.. issue?
What will Jmeter do if a response is not send by server
When it comes to HTTP Request samplers JMeter will wait for response for the time defined in the "Timeouts" section of the aforementioned HTTP Request sampler
Blank values mean "no timeout" so JMeter will wait either forever or until the socket timeout defined in the underlying JVM or OS is exceeded.
With regards to SignalR most probably you need to use WebSocket Samplers plugin, I don't think there is a way to record these requests using whatever JMeter recording solution currently available in the market so consider inspecting the traffic from your browser to the backend using either browser developer tools or a 3rd-party sniffer tool like Wireshark.

JMeter - How to modify/increase response timeout

When we send a file and after processing if response time is more than 60 seconds the request is timing out. Is there any way to increase it?
We have tried following steps to resolve it.
For HTTP request under advanced tab we have tried setting connect and response timeout to 5 minutes.
Also updated http client timeout in jmeter.properties as well.
Used Sample Timeout with value 5 minutes
For JMeter the relevant setting lives under "Advanced" tab of the HTTP Request sampler (or even better use HTTP Request Defaults, this way the setting will apply to all HTTP Request sampler in the HTTP Request Defaults scope)
The setting is in milliseconds so for 5 minutes it will be 300000 milliseconds
However even by default leaving empty values means no timeout so it doesn't make sense to "increase" the value, normally people use these settings to decrease the time JMeter waits for response so it wouldn't wait too long or even forever.
If you're getting timeout after 60 seconds it means that:
your system under test has its own timeout and it breaks the connection from its end after 60 seconds. Check your application or application server or load balancer or reverse proxy or whatever configuration and see how you can increase the response timeout there. Here is the setting for Apache web server, look for the documentation specific for your backend for more details.
your operating system is "cutting" the connection due to its own timeout, here is an example for Linux
the connection is being broken by an interim router or switch or firewall

How to send http request without waiting for response from server

We are planning to do load testing of our server and we need to generate heavy load from Jmeter tool. But as per i know, jmeter waits for the response to create another request thread. Is there a way to create http request without waiting for response from the server using jmeter? if not, what are the available work around to generate heavy load keeping number of threads fixed?
Define a very small timeout in the HTTP Request sampler (or even better in HTTP Request Defaults so the setting would be applied to all HTTP Request samplers) like 1 millisecond so JMeter will close the connection right after sending the request
(Optional) To avoid JMeter marking requests as failed add Response Assertion and tick Ignore Status box
You can set in HTTP Request in the Advanced tab Timeout of Connect and Response with 1 ms
Connect Timeout Connection Timeout. Number of milliseconds to wait for a connection to open.
Response Timeout Response Timeout. Number of milliseconds to wait for a response. Note that this applies to each wait for a response.
If you need to return always success you can add with JSR223 PostProcessor and use prev variable:
prev.setSuccessful(true)

What do the colored bars in the Firefox net panel represent?

In the firefox developer tools, under the "Net" panel, resources that are loaded have their load time split into different colors/categories. These are:
DNS Lookup
Connecting
Blocking
Sending
Waiting
Receiving
What do each of these represent, and more specifically, does any of them accurately represent the amount of time that the server is thinking (accessing the database, running algorithms, etc)?
Thanks.
You couldn't accurately determine what the server is doing as such, I'm afraid.
You can discount most of them except Waiting, however, as the rest occur before and after the server handles your request. What it actually does while you wait will be a 'black box'.
There may be some asynchronous operations taking place during Sending and Receiving, so again it's hard to be accurate but you can get a ballpark figure of the time the server is working and the time the request spends travelling back and forth.
EDIT
Rough Definitions:
DNS Lookup: Translating the web address into a destination IP address by using a DNS server
Connecting: Establishing a connection with the web server
Blocking: Previously known as 'queueing', this is explained in more detail here
Sending: Sending your HTTP Request to the server
Waiting: Waiting for a response from the server - this is where it's probably doing all the work
Receiving: Getting the HTTP response back from the server
The firebug wiki also explains these (see the Timeline section).
Blocking Time spent in a browser queue waiting for a network
connection (formerly called Queueing). For SSL connections this includes the SSL Handshake and the OCSP validation step.
DNS Lookup DNS resolution time
Connection Elapsed time required to create a TCP connection
Waiting Waiting for a response from the server
Receiving Time required to read the entire response from the server
(and/or time required to read from cache)
'DOMContentLoaded' (event) Point in time when DOMContentLoaded event was fired (since the beginning of the request, can be negative if the request has been
started after the event)
'load' (event) Point in time when the page load event was fired (since the beginning of the request, can be negative if the request has been started after the event)
There's a pretty good article with time charts and a protocol level explanation of what's happening at each stage here.I found it pretty helpful as they also visually demonstrate the impact of using persistent and parallel connections versus serial connections.

Resources