How to find out root cause analysis using JMeter integration with Prometheus and Grafana? - performance

Requirements is to find out root cause analysis using Prometheus and Grafana and also need to know which method is taking more time, CPU and Memory Utilisation also?
Can anyone pls help me

Integrate Prometheus client library into your app
Configure Grafana dashboard to visualize the metrics you want to monitor from your app
Additionally you can integrate JMeter with Prometheus Listener for JMeter plugin (can be installed using JMeter Plugins Manager)
Come up with a test plan which simulates a real life usage of your application
Run a stress test (start with 1 user and gradually increase the load until response time starts exceeding acceptable threshold or errors start occurring)
Inspect Grafana dashboard to see what is the reason of the application being slow, i.e. trace down the "slow" request to the underlying function. Additionally you can use a profiler tool which can provide a better picture

Related

Can I use only Dynatrace for performance testing in place pf Apache JMeter (or other Testing tools)

Can I use only Dynatrace for Load testing/Soak Testing/Capacity Testing etc. in place pf Apache JMeter (or other Testing tools)?
I can see load testing reports in Dynatrace but is Dynatrace alternative to Apache JMeter (or other JMeter alike testing tools)?
Dynatrace is an APM tool, it will not create any load but it can be used for collecting various metrics from the system under test like CPU, RAM, Network, Disk, Swap usage, HTTP calls, database calls, application-specific metrics, etc.
JMeter is the tool which generates the load by simulating behaviour of real user, but it doesn't collect any metrics from the system under test (unless you use a special plugin like JMeter PerfMon Plugin), it just sends requests, waits for response and measures time in-between as well as other metrics like connect time and latency, after that it calculates average response times and percentiles so you can correlate increasing load (number of active threads - virtual users) with the changing response time or errors per second or transactions per second
So:
JMeter (or other load testing tool) is used for generating the load
Dynatrace (or other APM tool) is used for monitoring the application while it is under the load to figure out the root cause of the perf

Why it is recommended to run load test in non gui mode in jmeter

I'm monitoring the connect time and latency to connect from jmeter machine while running in GUI mode and that is in within acceptable limit.
Should we strictly follow non GUI mode even though I can able to perform load test with GUI mode?
I'm targeting 250 TPS and able to achieve that ..I have increased my memory and monitoring CPU and memory of load generator is below 60%.
Should I go for non GUI mode ?
The main limitation is that each event in the queue is being handled by a single event dispatch thread which will act as the bottleneck on your JMeter side.
My expectation is that your "250 TPS" look like:
while it should look like:
So check how does your load pattern look like using i.e. Transactions per Second listener (installable via JMeter Plugins Manager)
Also check how does your JVM look like especially when it comes to garbage collection, it can be done via i.e. JVisualVM, most probably you will see the same "chainsaw" pattern
You don't need to follow JMeter best practices, but
you may encounter issues to achieve specifc goals (as TPS)
your machine can't execute GUI or have low resources
you execute JMeter using a script or build tool as Jenkins
Also it's better to be familiar with JMeter CLI (non GUI) and its report capabilities
JMeter supports dashboard report generation to get graphs and statistics from a test plan.
Also it will be needed for using distributed testing
consider running multiple CLI JMeter instances on multiple machines using distributed mode (or not)
CLI also useful for Parameterising tests
The "loops" property can then be defined on the JMeter command-line:
jmeter … -Jloops=12

Performance Testing Non Restful SpringBoot

I have a spring boot app that listens to a queue so it is non restful. Is there any easy way to get a time breakdown for the amount of time spent in each service?
The options are in:
Use a Profiler tool when running your application, this way you will be able to trace down the time even to a single function call
If you have an APM tool in place you can collect the same information plus metrics from the operating system, database, message broker, etc.
Just in case you need to generate messages and "feed" them to your application it could be done using i.e. Apache JMeter tool, see Building a JMS Testing Plan article for more information if needed

Live User monitoring by jmeter

I am looking to monitor live user responses through jmeter. Can the backend listener in jmeter used to record live users(end users)? I am not talking about virtual users that we set up in jmeter. But the real end users.How can this be achieved?
Editing to add more details:
Our requirement is to monitor the real users, in 2-3 geographical locations, all through out the business hours..say from 8 to 5.
For this purpose, do you think, I need to have a dedicated machine with jmeter, grafana and influxdb for monitoring alone? I have other testing going on using jmeter and I don't want to use the same machine to do both monitoring and testing. DO you think this is achievable by jmeter? ANy suggestions?
you can use the following tools in combination to achieve live monitoring:
JMeter backend Listener - to send results to influxDB
influxdb - store the results sent by backend listener
grafana - run continuous queries for metrics and plot graphs like average response times etc.
Follow the steps mentioned here:
http://jmeter.apache.org/usermanual/realtime-results.html - First Option
https://www.linkedin.com/pulse/jmeter-live-performance-monitoring-dashboard-grafana-influxdb-sarker
http://www.testautomationguru.com/jmeter-real-time-results-influxdb-grafana/
http://techblogsearch.com/a/live-performance-result-monitoring-with-jmeter-grafana-influxdb.html
We use to perform general production app (here- Scada-LTS) monitoring by javamelody. But this will give You general statistics. For per user monitoring it seems You should use log4j + ELK or other simpler syslog analyzing tool.
Jmeter should be used rather for test environment for stress tests.

Using Grafana with Jmeter

I am trying to make Grafana display all my metrics (CPU, Memory, etc).
I have already configured Grafana on my server and have configured influxdb and of course I have configured Jmeter listener (Backend Listener) but still I cannot display all grpahas, any idea what should I do in order to make it work ?
It seems like that system metrics (CPU/Memory, etc.) are not in the scope of the JMeter Backend Listener implementation. Actually capturing those KPIs is a part of PerfMon plugin, which currently doesn't seem to support dumping the metrics to InfluxDB/Graphite (at least it doesn't seem to work for me). It might be a good idea to raise such a request at https://groups.google.com/forum/#!forum/jmeter-plugins. Until this gets done, I guess you also have the option of using some alternative metric-collection tools to feed data in InfluxDB/Graphite. Those would depend on the server OS you want to monitor (e.g. Graphite-PowerShell-Functions for Windows or collectd for everything else)
Are you sure that JMeter posts the data to InfluxDB? Did you see the default measurements created in influxDB?
I am able to send the data using backend listener to influxdb. I have given the steps in this site.
http://www.testautomationguru.com/jmeter-real-time-results-influxdb-grafana/

Resources