1

I want to do (distributed) performance/load testing using jmeter on an Aspnet core 3.1 application on linux but I'm not satisfied with the results I had so far.

To make sure the environment is well configured, I tried to run some tests on the basic api sample created by visual studio: "WeatherForecast". (It consists of a simple api controller that returns random temperatures for the next five days)

The test

The test consists of a concurrency thread group that calls the api while ramping-up from 1 to 30 threads during 15 minutes. Monitoring CPU, response time and response codes over time.

I omitted RAM, Disk IO, and network metrics after making sure they're not stressing considerably (they only make the perfmon tool consume more cpu)

The result

I'm not able to have the CPU at 100%. It increases by ~15% every ramp during the first 5 threads, then settles at around 70% and only slightly increases to reach ~85% at the end of the test. the response time remains stable at around 2ms, and slightly start growing to 6ms from the 10th thread.

Tuning attempts

  • sudo sysctl -w net.ipv4.tcp_tw_reuse=1 : Enabled the reuse of sockets
  • echo 1024 65000 > /proc/sys/net/ipv4/ip_local_port_range : Increased the range of local ports
  • ulimit -n 65000 : Increased the max open files count
  • -Xms4g -Xmx8g: Increased Jmeter's heap size
  • Tried distributed testings: 1 master 1 slave and 1 master 2 slaves : same results
  • Ran the tests with & without the gui

Some of these attempts slightly improved the cpu usage, but the trend/behavior is always the same.

What may i have missed ?

1 Answer 1

1

Not knowing the hardware specifications of your machine it's hard to tell whether you will be able to stress it with 30 virtual users, most probably not.

If you're trying to conduct a stress test, to wit identify the first bottleneck of your application you need to increase the load unless response time start exceeding acceptable thresholds or errors start occurring, whatever comes the first.

With 30 threads basically requesting random numbers from -20 to 55 you won't even make my 10 years old Intel Atom laptop with 2 GB of RAM to turn on its fans.

Either kick off several thousands of virtual users or go for a more CPU intensive algorithm, i.e. calculating Fibonacci sequence

More information: How to Run a Stress Test in JMeter

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge that you have read and understand our privacy policy and code of conduct.

Not the answer you're looking for? Browse other questions tagged or ask your own question.