Jmeter performance monitoring using perfmon plugin - jmeter

I am trying to use Jmeter perfmon plugin to monitor cpu and memory utilisation of server.
Server is hosted on linux machine and is running apache and postgresql.
I am running serveragent in linux server and added cpu and memory parameters in Jmeter perfmon metrics collector.
Now when I run my Jmeter tests then both apache and postgrelsql are used.I can see some data coming in performance collector.
1)How can I find cpu utilization of apachae and progresql when test are run?
2) I can see memory is coming as a straight line. I read in some other threads its because of JVM constant memory usage.I am not able to understand why this is happening.Server agent should give memory utilization of all processes rather than JVM. How can I get actual memory usage in this case?

Neither apache nor postgres use JVM, are you sure you are running Server Agent on a correct host?
With regards to your question itself: it is possible to track Per-Process metrics, for example you can apply configuration like:
You will need to replace:
localhost with the hostname or IP address of the machine where apache, postgres and JMeter server agent are running
4949 with the real PID of your apache instance
3521 with the real PID of your postgres instance
Once done you should see 4 charts standing for apache CPU usage, apache memory usage, postgres CPU usage and postgres memory usage correspondingly.
See How to Monitor Your Server Health & Performance During a JMeter Load Test article for more information.

Related

Why the throughput of the same Jmeter project differ so much?

I am using Jmeter to test load test my SpringBoot website. The website is deployed in our Linux server.
I tested in my local computer, the throughout is arond 500/sec. I copyed the Jmeter package(including bin, doc...) and jmx file to my collegue's computer. He used the same Jmeter to run the same jmx project, but the through is always under 200/sec.
That is very confusing. We have the same jmx project, and load test the same website, why the throughout differs so much?
Edit: Or maybe the local computer environment will affect this. Do you know where? The JVM config or CPU?
I can think of at least 3 possible issues:
Different Java version. Make sure to have the same JDK or Server JRE version
Different hardware specifications
CPU
RAM
NIC
Different operating system version/setup
Different network connectivity, i.e. if you're connected via Ethernet and your colleague is sitting on Wi-Fi it might matter
I would recommend setting up monitoring of:
JVM health status - you can do this using i.e. JVisualVM
OS health status - you can do this using built-in monitoring tools or JMeter PerfMon Plugin

testing performance on Linux dockers

I have several scripts testing performance of Linux server. there are about 12 dockers containers running inside the Linux.
We are interested on collecting also metrics of containers (right now we are collecting only of the Linux machine itself)
Is there any plugin for this? or can this be done with the Perfmon plugin?
There are several ways of monitoring Docker instance statistics:
Built-in Runtime Metrics
cAdvisor - probably this one will be the easiest to setup and use
Any of built-in Linux monitoring tools
Of course you can normally use JMeter PerfMon Plugin as this way you will get performance monitoring results integrated into your test script and be able to correlate JMeter metrics with server health metrics. Just make sure there is a TCP/UDP connectivity between JMeter and PerfMon Server Agent, default port is 4445 so make sure container exposes this port to the outside world.

JBOSS wildfly 10 Performance Tuning using Jmeter

This is regarding use of JMETER tool to test a REST API and check the throughput.
I am pretty much new to using the JMETER tool.
Coming to my Application, it is a simple REST API which converts an XLS file to JSON formatted data based on few conditions.
This is run on server(WildFly V10).
Configuration in my JMETER:
Number of Threads: 1000
Ramp-up time: 10
Loop Count: 1
The throughput remains constant with 10-12 hits per sec.
I also did few configuration settings for JBOSS wildfly server 10 in the standalone.xml file for different subsystems as shown below:
1) Configuring undertow subsystem:
modified the default max http connections from 10 to 100 till 1000
<http-listener name="default" **max-connections="1000"** socket-binding="http" redirect-socket="https" enable-http2="true" buffer-pipelined-data="true" />
2) Setting io subsystem:
configured io-threads and max-threads from 10 to 100 till 1000
<worker name="default" **io-threads="100" task-max-threads="100"** />
3) Configured standalone.conf file for JAVA VM options
OLD: JAVA_OPTS="-Xms64m -Xmx512m -XX:MetaspaceSize=96M -XX:MaxMetaspaceSize=256m -Djava.net.preferIPv4Stack=true"
NEW: **JAVA_OPTS="-Xms1024m -Xmx1024m -XX:MaxPermSize=256m** -XX:NewRatio=2 -XX:PermSize=64m -Djava.net.preferIPv4Stack=true"
4) Configuring infinispan subsystem:
which has a <cache-container> to configure the thread pool execute in the thread subsystems. It governs the allocation and execution of runnable tasks in the replication queue.
5) Tried running my application on remote system having **64 GB RAM** and the 3rd configuration mentioned above.
6) Configuring high value for core threads in JCA subsystem
**<core-threads count="50"/>** in subsystem urn:jboss:domain:jca:4.0
All these configuration didnt help me increase the throughput.
Can anybody please help me in understanding what actually has to be modified or configured to increase throughput of my server when tested through JMETER.
There are too many possible reasons, I'll list only few most common recommendations:
Your machine running JBoss simply gets overloaded and cannot respond faster due to banal lack of CPU or free RAM or intensive swapping or whatever. Make sure you monitor the application under test resources while your test is running, it will not only allow you to correlate increasing load with increasing utilisation of system resources, but you will also be able to tell if slow response times are connected with the lack of hardware capacity. You can use JMeter PerfMon Plugin to integrate monitoring with the JMeter test, check out How to Monitor Your Server Health & Performance During a JMeter Load Test for more details on the plugin installation and usage
JMeter load generator can suffer from the same with the same impact on the throughput metric: if JMeter is not able to send requests fast enough the application under test won't be able to reply faster so in some situations JMeter itself is the bottleneck so make sure you are following JMeter Best Practices and JMeter has enough headroom to operate from hardware resources perspective. Apply the same monitoring to JMeter load generator(s) and keep an eye on CPU, RAM, Network, Disk usage, when any of metrics exceeds say 90% threshold - this is the maximum load you can achieve with a single JMeter instance.
Re-run your load test but this time having a profiler tool telemetry (for example JProfiler or YourKit), this will allow to see the most resource and time consuming methods so you could identify which part(s) of code need optimisation.

jmeter remote testing different results with different client

I am trying to test a webpage using multiple remotes. The performance results of the webserver vary on jusing jmeter client (jmeter master).
I am testing in non-gui mode just with one remote slave. But I found, that I have different results with the same jmeter remote when using different master.
The slave node is dedicated server Intel(R) Core(TM) i7-4770 CPU # 3.40GHz with 32GB RAM (10GB dedicated for jmeter).
When I am using jmeter master on virtual machine with 2CPU Intel(R) Core(TM)2 Duo CPU T7700 #2.40GHz, 3.7GB RAM from the same provider as the slave node is from, the testing results of my webpage is only 50 transactions/s.
When I switched the jmeter-master to google cloud (n1-standard-1 machine with 1 CPU Intel(R) Xeon(R) CPU # 2.50GHz and 3.75GB RAM) and using the same slave node, the result is 130 transactions/s.
The jmeter master setup is in both cases the same. I really have no clue, why this results are different. From my understanding the jmeter master (client) is only collecting the results from remote slaves and the traffic is generated from remote slave, so the results should be the same.
You are definitely hitting the limits of your local slave, I would suggest measuring the OS-level metrics, i.e. usage of CPU, RAM, Swap, Network and Disk, Java Heap, Java Garbage collections, etc.
You can do it either using built-in tools or consider using JMeter PerfMon plugin which allows monitoring of more than 70 metrics, it should allow to identify the bottleneck which in this case could be connected with JMeter.
See How to Monitor Your Server Health & Performance During a JMeter Load Test article for plugin setup, configuration and usage instructions.

Is perfmon in jemter analysing cpu utilisation of local machine or the server where application is hosted?

Just need to know that perfmon plugin which is used in jmeter tool, does it analyse cpu/memory, disk utilization of local machine or the server where application is hosted?
Because as a user when give IP and port, we give these details of the remote machines when we perform load test.
Please let me know .
As per JMeter Scientist,
The PerfMon listener was implemented in following way: The
Host collects PerfMon, Remote nodes don't collect PerfMon.
So, Master will collect metrics from the Slaves.
This might help
PerfMon Metrics Collector fetches performance metrics from ServerAgent(s) via TCP or UDP. And it's up to you where you want to install the ServerAgent(s), on JMeter or Application Under Test side or both.
Normally ServerAgent(s) is/are installed on Application Under Test side, i.e. web servers, database servers, load balancers, etc. to measure the load on that end, however if you want to collect performance stats from load generators - feel free to install Server Agent(s) on JMeter machine(s).
See How to Monitor Your Server Health & Performance During a JMeter Load Test article for comprehensive information on PerfMon installation and usage

Resources