How good is Oracle Universal Connection Pool (UCP)

31,090

Solution 1

I evaluated UCP 11.2.0.1 as a replacement for our legacy connection pool and I cannot recommend it:

  • it does not fully support jdk 6 / ojdbc6.jar. For example the use of statement caching and jmx-support does not work with java 6 and throws exceptions.
  • no internal statement cache - it relies on the jdbc driver's statement cache (setPoolable())
  • I submitted both issues to oracle, they confirmed it and will probably fix it when oracle 12.0 will be released. But even that's not for sure.
  • Too few releases (2 releases in 3 years), too less community support.
  • Not Open-Source
  • Hardly extensible. Only a few callbacks with an horrible interface design.
    Example: You want to be notified when a Connection exceeds its TTL? Prepare for a wrapper DataSource and a mass usage of internal/proprietary UCP APIs. The official documentation (last update: 2008) remains silent how to achive this.
  • Fat design (almost a 0,5 MB jar) - many classes with similar names/function (e.g. there's a PoolDataSource and a ConnectionPool - both are related but invoked differently and provide slightly different functionality.)
  • java.util.logging only


UPDATE 1 (April 2014):
Although slightly off-topic: As a result of my evaluation I decided to go with the new tomcat jdbc-pool - and it is working almost perfectly since a year in several production systems. It's very well designed, updated regularly, extensible and the apache tomcat team does a good job in responding to questions/fixing issues.

UPDATE 2 (July 2016):
I can now highly recommend HikariCP which I'm currently favoring over all other connection pools.
Its architecture, focus on correctness and performance is just amazing.

Solution 2

I have used UCP in a system with around 10 transactions per seconds (mean) and 360 transactions per seconds peak, and no problems yet. (Number is per app server with 8 servers)

However the main benefits you get from UCP is when you are using Oracle RAC and the TAF/FAN functionality, UCP with Dataguard or if you are running something outside an appserver.

Solution 3

I have described the performance/scalability issues I have observed with UCP compared to implicit connection caching here: https://stackoverflow.com/a/27512252/676877

Solution 4

I've seen multiple customers using UCP in production. I've seen none of the issues you are concerned about. It performs quite well under load. And can handle reconnects. The reconnect policy is configurable. It also supports RAC quite well.

But the real upside to using a commercial connection pool is that someone is responsible for any problems you have. You would be surprised how many people try to develop and maintain their own connection pool.

Solution 5

I have just tried UCP with our Eclipse Link based application and I run into ORA-0100: Maximum open cursors exceeded every time. I have set the parameter MaxStatements to 10 but that had no effect. I have inspected the Heap and there were hundreds of T4CPreparedStatement objects alive but less than 10 wrapped statements. So there is a huge statement cache somewhere that I can not control.

Tomcat jdbc pool works like a charm.

Share:
31,090
Andrey Ashikhmin
Author by

Andrey Ashikhmin

Updated on December 01, 2020

Comments

  • Andrey Ashikhmin
    Andrey Ashikhmin over 3 years

    Does anybody have experience with using Oracle UCP under real production load? Does it handle database reconnects well? Are there any multi-threading issues? Has anybody compared it with C3P0 or Apache DBCP?