SQL Server JMeter creates a lot of compilations during database testing

v1uwarro  于 2023-10-15  发布在  其他
关注(0)|答案(1)|浏览(86)

I'm using a JMeter for MS SQL server performance testing.

  1. I've been monitoring the SQL throughput metrics while manually clicking on elements on GUI - I've noticed that database is making close to 0 compilations during that.
  2. Then I've used SQL profiler during these clicks to record the database calls being made and put them to JMeter test plan.
  3. I've ran the JMeter test plan, and displayed the metrics and here the JMeter creates a huge amount of compilations compared (it seems like it's almost copying batch requests).

Any ideas how to prevent these compilations from being made, please?

I tried to isolate the queries to single ones - to be able to better monitor it. Also I tried to play with JMeter pooling options, however nothing seemed to help.

Thank you for your help! :)

7hiiyaii

7hiiyaii1#

I think when you manually "click on elements" you don't do this non-stop, there are pauses between operations while you move the mouse or wait for the page to load.

JMeter executes JDBC Request as fast as it can (as fast as the database responds) so you should mimic the delays between queries using i.e. Constant Timer or other suitable one, see A Comprehensive Guide to Using JMeter Timers

Also your approach might be not the best, I think you should test the database directly only if you're sure that the database is the bottleneck. You should rather simulate a real user using a real browser as there might be other bottlenecks in API or backend before the database query so it could be a better idea to configure JMeter to behave like a real browser in terms of handling embedded resources, cookies and other headers , cache , AJAX requests and so on.

相关问题