Jmeter stress test openresty multilevel cache

Posted May 26, 20202 min read

Jmeter stress test openresty multilevel cache

  1. Quick use

  2. Download Apache JMeter 5.3(Requires Java 8+) from Jmeter official website ;

  3. Unzip apache-jmeter-5.3.zip and open apache-jmeter-5.3binjmeter.bat, provided that the JDK environment variables are configured and the version meets the requirements;

  4. After entering the GUI interface, the default is English, click the [Options]button in the menu bar, and then click [Choose language]> [Chinese(simplified)];

  5. If you don't like the dark theme, select the first appearance under the menu bar [Options]

  6. New Pressure Test Example

Refer to the previous article OpenResty + lua + redis to achieve multi-level cache. I stress-test the multi-level cache, first warm up the cache, and then pressure-test it; although the local pressure test is not standard, the thread group has 200 cycles 10 times, the sql query throughput of ordinary tomcat is about TPS100/sec, and the redis cache is about 250/sec. OpenResty can view the report and it is about 9800/sec(thread 2000, loop 10 times); in order to improve the pressure test results, you can choose Increase the maximum connection number and initial connection number of the database connection pool and tomcat, as well as the buffer size optimization; the advanced method uses a lot of testing for machine learning to find a relatively excellent configuration combination.

  • Add this test plan(Right Click Test Plan-> Add-> Threads(Users)-> Thread Group)
  • Set the number of threads(number of concurrent users) and the number of cycles

ThreadsGroup.png

  • Add Http request protocol and related configuration information(right click of Thread Group-> add-> sampler-> Http request)

jemter-http.png

  • Add listeners to threads-view the result tree, aggregate reports and graphical results

jmeter-report.png

  • Start test plan, view test report

jmeter-getReport.png

  1. Reference materials

  2. How to set the language of jmeter to Chinese

  3. Analyze the indicators in the JMeter aggregation report

Related Posts