3

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.

UBIK LOAD PACK
  • 33,980
  • 5
  • 71
  • 116
Sunil Kumar S
  • 31
  • 1
  • 2

1 Answers1

1

There are too many possible reasons, I'll list only few most common recommendations:

  1. 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
  2. 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.
  3. 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.
Dmitri T
  • 159,985
  • 5
  • 83
  • 133