I have a problem with one of the performance tests. I am using jmeter 5.4.1 with docker. Everything is behind f5, proxy, firewall etc but that is not the problem. My "headache" is that after about 30 minutes my throughput drops to almost zero. I'm looking for a solution to this situation and my question is : Does jmeter have the ability to count/summarize all requests sent, even if it doesn't get a response? The destination server gets everything that jmeter has sent, but I'm not sure if jmeter doesn't save requests only when it gets responses to them. example of my tests:
Update:
Active thread over time :
Transactions per second:
I don't have any timeouts set in my script and the response time is ok. No extended response times and yet the number of transactions is so mediocre....
JMeter writes all executed Sample Results into its .jtl results file so you if you have only HTTP Request samplers in your test plan - the number of rows in the .jtl file will be the number of requests sent by JMeter (minus one header row)
You can also track the requests which were sent by JMeter by loading the aforementioned .jtl results file into a listener like Transactions per Second or Server Hits per Second (the latter guy will display calls to embedded resources as well)
Ok, I found the cause. I exhausted all the threads on the JVM and that's why everything started to throttle... thank you for your help.
Related
I run a performance test with load 25 users with jmeter integrated with jenkins.Once the build is triggered all my thread groups are completed but the console process is running for close to 2 hours.
image here
In your image I see 500 users, not 25.
Also I see that 498 users have finished and 2 are still running.
I cannot state for sure why they are running, it's more a question to you. I can think of the following reasons:
You're not following JMeter Best Practices
JMeter lacks resources and got stuck i.e. in endless garbage collection (which is a subset of point 1)
JMeter waits for response from the server and the server fails to respond. By default JMeter's HTTP Request samplers don't have any timeout defined and it means that JMeter will wait forever, so make sure to set reasonable connect/response timeouts, the setting lives under "Advanced" tab of the HTTP Request sampler (or better use HTTP Request Defaults so you could set the timeout for all the HTTP Request samplers in one shot)
If nothing helps you can check what exactly threads are doing and where they're stuck by taking a thread dump
I'm trying to setup a performance test for a websocket application, using JMeter.
The request is {"type":"subscribe_rq","id":1,"ts":"2018-10-16T00:00:00","data":{"sinceSeq":0}}.
Response is multipart and sequential; initial response and an update every second, as long as the connection is open. (I checked this with "WebSocket Test Client", a chrome extension).
Currently, I only get the first main response, but not the updates. Rather not sure how to get these updates. How to achieve this in JMeter? That is, how to keep the connection open for a specified period (say 5 secs) and receive the multiple responses during that period and assert it?
To keep the connection open I have a Constant Timer with 5 secs in Thread Delay. Not sure if this will work...
Going forward please remember to include essential parts of your query into the question itself, i.e. output from the "Network" tab of the browser developer tools or screenshot of this WebSocket Test Client (whatever it is) could tell the full story.
In the mean time, there is a project: JMeter WebSocket Samplers by Peter Doornbosch which has many useful sample JMeter Test Plans including the one which you can use as the basis: Single read sample.jmx which queries the data in the loop over the single WebSocket Connection.
Check out JMeter WebSocket Samplers - A Practical Guide article to get started with the WebSocket Samplers.
I am trying to stress test a web application which is composed of login,view page,other pages and log out. The full flow contains 14 request and I have created 300 users to complete the flow.
I have the following Thread Group configuration:
According to the online resources since I have 300 users and the ramp up period is 6, for each 1 second there will be 50 thread added. Therefore all the 300 thread will be up and running after 6 second.
So can I conclude that after 6 second Jmeter will have 300 active thread accessing the website at the same time?
My second question is when I execute the load test of more than 100 users when I view the Result Tree Listener in the Sampler Result tab the following error is triggered only for js and css files but when I open the response data tab for that request it is displayed correctly.
Response code: 200
Response message: Embedded resource download
javax.net.ssl.SSLHandshakeException message:Non HTTP response message: Remote host closed connection during handshake,
Is it a performance issue of my website or Jmeter cannot download all the js/css files?
Thanks in advance
With regards to your Threads configuration, the actual concurrency will depend on your application response time. JMeter acts as follows:
Each 1 second JMeter will start 50 users
Each of 50 users will start executing your 14 requests upside down
When a user will finish executing all requests it will be shut down
So given your application average response time for all 14 requests is > 500 ms you should have 300 concurrent users. You can always check how many users were online using Active Threads Over Time listener. See JMeter Test Results: Why the Actual Users Number is Lower than Expected article for more detailed information on the topic
Too little information to provide the answer check jmeter.log and your application under test logs for any clues. One thing is obvious: you should definitely NOT be running JMeter in GUI mode especially with View Results Tree listener enabled as it is too resource intensive and side effects might be unpredictable. So repeat your test in non-GUI mode with all listeners disabled and if the issue will remain - inspect log files.
Using jmeter, I have 10000 users need to hit the server and to respond back with in 40 sec.
During execution (in distributed mode) only 600 users really hitting (Checked in db) in server.
But in AGGREGATE REPORT it shows all requests hits the server.
What is the issue behind this? why the number of requests hits the server isn't consistent between db and jmeter listener?
Probably your test configuration is a little bit wrong.
JMeter acts as follows:
JMeter starts all the threads (virtual users) within the bounds of ramp-up period specified in the Thread Group configuration
Each thread (virtual user) starts executing samplers upside down
When there are no more samplers to execute and no more loops to iterate the thread is being shut down.
You can check how many threads were actually active using Active Threads Over Time Listener or the same chart of the HTML Reporting Dashboard
So you may run into a situation when some samplers have already done their work and some haven't been yet started. Basically you need to provide enough loops to make sure all 10k threads will be up and running for the required test duration.
See JMeter Test Results: Why the Actual Users Number is Lower than Expected guide for more information.
There is Jmeter response time difference between Jmeter run results and manually captured the response time from the local system using stop watch on the web application.
Browse the web app from local windows system and use stop watch to see the response time to load the page.
Run the Jmeter in non-gui/gui mode and observe the response time (used Listeners only to debug, when run the script no listener was added)
Can see there is a difference in both. Please suggest how to know if Jmeter has captured the correct response time.
Given you properly configure JMeter you should get the same or similar response time for the same request. "Proper" configuration stands for:
You should configure JMeter to retrieve embedded resources and use parallel thread pool of ~5 threads for this
This options "tells" JMeter to fetch images, styles and scripts referenced in the main HTML page and do it in parallel like real browsers do
Add HTTP Cache Manager to your Test Plan. Real browsers download embedded resources but do it only once, on subsequent requests the resources are being returned from disk cache, no actual request is being made. HTTP Cache Manager enables cache simulation and cache-control headers handling.
Add HTTP Cookie Manager to represent cookies/sessions and deal with cookie-based authentication
Add HTTP Header Manager to your test plan to represent browser headers. It might be important as i.e. missing Accept-Encoding header may disable server-side compression therefore client will receive much more data and it will take more time.
Assuming "good" JMeter configuration you should see more or less same behavior
If there are still differences - capture the requests sent by JMeter and the browser using a sniffer tool like Wireshark and amend JMeter configuration to eliminate the differences
JMeter have three basic measurements it captures per request:
Elapsed Time (which is overall timespan from the point when it just starts sending request to the last bit received)
Latency (which starts the same point in time and ends when server starts responding)
And Connect time (which is included in latency and is basically the time for handshakes with server, including SSL/TLS negotiations)
So if you set a data writer among your listeners (e.g SimpleDataWriter, although AggregateReport & SummaryReport can do it as well), you'll see these metrics in your data file (while standard listeners/visualisers/aggregators stuck to elapsed time only).
But mind that these metrics doesn't include response rendering, and especially any code to be executed by browser.
JMeter just doesn't do it at all: obviously, it measures just the combined performance of Server + Network, skipping everything on the client side (except for bare necessities, like protocol negotiations).
That might explain the difference you've experienced.
As well as the difference between logged server processing times & the response times measured by JMeter: server just doesn't count what the network brings in.
PS And you don't have to sit and click on stopwatch with your browser: modern ones have a Dev Tools capable of showing you the precision timings divided by stages. E.g., just call Ctrl+Shift+I in Chrome, switch to network tab & behold the timings right there as you doing your requests.