EnterpriseDB: The Enterprise Postgres Company Postgres Plus Forums: The PostgreSQL Open Source Database from EnterpriseDB
  [Search] Search   [Recent Topics] Recent Topics   [Hottest Topics] Hottest Topics   [Members]  Member Listing   [Groups] Back to home page 

Provide configuration for minSize of JDBCPool in LoaderConnectionPool  XML

Forum Index » GridSQL - Developers
Author Message
Ted_Yu_2

Member

Joined: 27 Aug 2010 17:22:19
Messages: 24
Offline

When client uses gs-loader.sh in multiple processes, we observed high number of connections (over 200) to Postgres DB.
The connections didn't close after 10 minutes (xdb.jdbc.pool.idle)

In ObjectPool.java:
protected synchronized void packBuffer() {
while (buffer.size() > 0 && buffer.size() + out.size() > minSize) {
minSize by default is 1.
This means there would always be at least 1 PoolEntry in the pool which can explain why connection to Postgres isn't closed.

I think we can introduce a new configuration parameter to control minSize for JDBCPool. E.g.
Property.getInt("xdb.jdbc.pool.minsize", 0),
Andrei_M

Senior member

Joined: 19 Dec 2008 01:37:13
Messages: 116
Offline

Pooling of loader connections is a new feature introduced in v. 2.0
We will see feedbacks and decide how to improve it.
Regarding your problem with high number of connections minSize probably would not affect.
First of all it depends on number of nodes: each node establishes at least one connection to each node database.
Next is concurrency: each concurrent query may require own set of loader connections.
You may want to limit maxSize, but you may see poor performance because of lack of available connections and see query timeouts.
Limiting number of GridSQL connections will effectively limit pool size.

Thanks
Andrei
 
Forum Index » GridSQL - Developers
Go to:   
Powered by JForum 2.1.8 © JForum Team