JMeter JDBC池配置 [英] JMeter JDBC Pool configuration

查看:374
本文介绍了JMeter JDBC池配置的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

JMeter的 JDBC池配置

我尝试使用最大连接数10,这导致Oracle最大连接数出现问题.

I tried to use Max Number of Connections 10 and it caused issues with Oracle max connection reached.

从下面的文档看来,它的用法不受欢迎,所以我仍然想知道是否存在可能有用的方案.

It seems from documentation below that its usage is discourage, so I still wonder if there's scenarios that it could be useful.

最大连接数 水池.在大多数情况下,将此设置为零(0).这意味着每个线程 将获得一个带有单个连接的池,即 线程之间不共享连接.如果您真的想使用 共享池(为什么?),然后将最大计数设置为与 确保线程不会彼此等待的线程数.

Max Number of Connections Maximum number of connections allowed in the pool. In most cases, set this to zero (0). This means that each thread will get its own pool with a single connection in it, i.e. the connections are not shared between threads. If you really want to use shared pooling (why?), then set the max count to the same as the number of threads to ensure threads don't wait on each other.

  • 注意在代码中,我看到它用于连接池org.apache.commons.dbcp2.BasicDataSource.
    • Note In code I see it uses for connection pool org.apache.commons.dbcp2.BasicDataSource.
    • 推荐答案

      实际用途是您应从 JDBC连接配置,它将成为生产JDBC池配置的副本,以具有实际的加载模式.

      The practical use is that you should start with JDBC Connection Configuration which will be a replica of your production JDBC pool configuration in order to have realistic load pattern(s).

      如果检测到数据库性能问题,则可以使用池设置(连接数,事务隔离等)来确定性能最高的配置,一旦有证据证明这些设置或池设置提供了更好的性能,就可以报告它开发人员或开发人员,并根据您的发现修改您的应用程序数据库连接设置.查看在JMeter中使用JDBC Sampler 说明了JMeter连接池的设置.

      If you detect a database performance problem you could play with pool settings (connections number, transaction isolation, etc) to determine the most performing configuration, once you have the evidence that these or that pool settings provide better performance you can report it to developers or devops and amend your application database connectivity settings according to your findings. Check out Using JDBC Sampler in JMeter for JMeter connection pool settings explained.

      从Oracle的角度来看,我相信连接池和缓存高性能Oracle JDBC编程帮助很大.

      From Oracle perspective I believe Connection Pooling and Caching and High-Performance Oracle JDBC Programming will help a lot.

      这篇关于JMeter JDBC池配置的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆