-->
These old forums are deprecated now and set to read-only. We are waiting for you on our new forums!
More modern, Discourse-based and with GitHub/Google/Twitter authentication built-in.

All times are UTC - 5 hours [ DST ]



Forum locked This topic is locked, you cannot edit posts or make further replies.  [ 2 posts ] 
Author Message
 Post subject: problems of concurrency of hibernate
PostPosted: Sun Feb 05, 2006 10:00 am 
Newbie

Joined: Thu Dec 22, 2005 11:15 pm
Posts: 13
Hi,
I use hibernate 3.1. My configuration of connection pool is following:

Code:
hibernate.connection.pool_size 1
And I use c3p0 as connection provider.


When I start two web clients from two terminal, hibernate's performace is very slow. But after I set the pool_size to be larger than 2, the performace improve a lot.

Does it mean that if I have millions of clients, then I have to the pool_size to be larger than one million to support millions of clients to concurrently acess DB using hibernate?

And what is the maximum pool_size that hibernate support?

Thanks.


Top
 Profile  
 
 Post subject:
PostPosted: Sun Feb 05, 2006 6:02 pm 
Hibernate Team
Hibernate Team

Joined: Tue Aug 26, 2003 7:19 pm
Posts: 2364
Location: Brisbane, Australia
Pool size of 1 means you only allow one client to access the resource at any one time. The result is all requests to the database will be serialised. Yes clients can be very slow and I would suggest yuou have atleast 2 for development (I tend to have 4).

Production pool size depends on your application. The pooling scales well so no you do not need 1 connection-per-client You will find if you test it. Pool of 2 will handle more than 2 clients and it scales further the greater the pool. If you have millions of clients and they don't have much concurrency then 10 might do or maybe 100 is necessary. Monitoring the application is the key to getting the sizing of resources correct.

The DB connection pooling is performed by support libraries. In youre case CP30 check their docs for any limits and sizing of pools eg min max and resource recovery semantics.


Top
 Profile  
 
Display posts from previous:  Sort by  
Forum locked This topic is locked, you cannot edit posts or make further replies.  [ 2 posts ] 

All times are UTC - 5 hours [ DST ]


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum

Search for:
© Copyright 2014, Red Hat Inc. All rights reserved. JBoss and Hibernate are registered trademarks and servicemarks of Red Hat, Inc.