Java数据库连接池 BoneCP

Java数据库连接池 BoneCP

srcurl:http://blog.163.com/xing_mu_1/blog/static/661429020091029112556280/

BoneCP 是一个开源的快速的 JDBC 连接池。那么 BoneCP 到底有什么突出的地方呢,请看看下面的性能测试报告:

Single Thread
  • 1,000,000 get connection / release connection requests
  • No delay between getting/releasing connection.
  • Pool size range: 20-50.
  • Acquire increment: 5
  • Helper threads: 1
  • Partition count: 1

Multi-Thread
  • 500 threads each attempting 100 get/release connection
  • No delay between getting/releasing connection.
  • Pool size range: 50-200.
  • Acquire increment: 5
  • Helper threads: 5

Multi-Thread 10ms delay
  • 500 threads each attempting 100 get/release connection
  • We introduce a 10ms delay (Thread.sleep()) between the acquire connection and the release connection to simulate work being done with the connection.
  • Pool size range: 50-200.
  • Acquire increment: 5
  • Helper threads: 5

Multi-Thread 25ms delay
  • 500 threads each attempting 100 get/release connection
  • We introduce a 25ms delay (Thread.sleep()) between the acquire connection and the release connection to simulate work being done with the connection.
  • Pool size range: 50-200.
  • Acquire increment: 5
  • Helper threads: 5

Multi-Thread 50ms delay
  • 500 threads each attempting 100 get/release connection
  • We introduce a 50ms delay (Thread.sleep()) between the acquire connection and the release connection to simulate work being done with the connection.
  • Pool size range: 50-200.
  • Acquire increment: 5
  • Helper threads: 5

Multi-Thread 75ms delay
  • 500 threads each attempting 100 get/release connection
  • We introduce a 75ms delay (Thread.sleep()) between the acquire connection and the release connection to simulate work being done with the connection.
  • Pool size range: 50-200.
  • Acquire increment: 5
  • Helper threads: 5

pic5

Prepared Statement (single threaded)
  • Fetches a single connection then calls 1,000,000 connection.prepareStatement(...) followed by an immediate statement close.
  • No delay between calls
  • Max statements: 30
  • Max statements per connection: 30
  • Helper threads: 5

pic6

Prepared Statement (multi-threaded)
  • 500 Threads each attempting 100 get/release connection with no delays. After obtaining a connection, make a call to connection.prepareStatement(...) followed by a close statement request.
  • No delay between calls
  • Pool size range: 50-200.
  • Acquire increment: 5.
  • Helper threads: 5

pic7

Prepared Statement (multi-threaded, 10ms delay)
  • 500 Threads each attempting 100 get/release connection with no delays. After obtaining a connection, make a call to connection.prepareStatement(...) followed by a close statement request.
  • 10ms delay between open connection/release connection to simulate work done by the application.
  • Pool size range: 50-200.
  • Acquire increment: 5.
  • Helper threads: 5

pic8

Prepared Statement (multi-threaded, 25ms delay)
  • 500 Threads each attempting 100 get/release connection with no delays. After obtaining a connection, make a call to connection.prepareStatement(...) followed by a close statement request.
  • 25ms delay between open connection/release connection to simulate work done by the application.
  • Pool size range: 50-200.
  • Acquire increment: 5.
  • Helper threads: 5

Prepared Statement (multi-threaded, 50ms delay)
  • 500 Threads each attempting 100 get/release connection with no delays. After obtaining a connection, make a call to connection.prepareStatement(...) followed by a close statement request.
  • 50ms delay between open connection/release connection to simulate work done by the application.
  • Pool size range: 50-200.
  • Acquire increment: 5.
  • Helper threads: 5

Prepared Statement (multi-threaded, 75ms delay)
  • 500 Threads each attempting 100 get/release connection with no delays. After obtaining a connection, make a call to connection.prepareStatement(...) followed by a close statement request.
  • 75ms delay between open connection/release connection to simulate work done by the application.
  • Pool size range: 50-200.
  • Acquire increment: 5.
  • Helper threads: 5

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值