micronaut-projects / micronaut-data

Ahead of Time Data Repositories
Apache License 2.0
465 stars 197 forks source link

Extreme low troughput using MySQL + micronaut Data JDBC #382

Closed PedroEsnaola closed 4 years ago

PedroEsnaola commented 4 years ago

Thanks for reporting an issue for Micronaut Data, please review the task list below before submitting the issue. Your issue report will be closed if the issue is incomplete and the below tasks not completed.

NOTE: If you are unsure about something and the issue is more of a question a better place to ask questions is on Stack Overflow (http://stackoverflow.com/tags/micronaut) or Gitter (https://gitter.im/micronautfw/). DO NOT use the issue tracker to ask questions.

Task List

Steps to Reproduce

  1. run project with graddle run
  2. start mysql database on docker container
  3. run jmeter test

Expected Behaviour

i expect one acceptable troughput, between 2k and 5k req/s

Actual Behaviour

run any Jmeter Load test, when accessing the database, the troughput should be on average 60 req/s

Environment Information

Example Application

graemerocher commented 4 years ago

Micronaut Data JDBC (as per the name) uses JDBC which is based on blocking I/O. Your example is doing all blocking I/O on a single thread hence why you are getting low throughput.