This Bugzilla instance is deprecated, and most Eclipse projects now use GitHub or Eclipse GitLab. Please see the deprecation plan for details.
Bug 270802 - Improve default connection pooling
Summary: Improve default connection pooling
Status: CLOSED FIXED
Alias: None
Product: z_Archived
Classification: Eclipse Foundation
Component: Eclipselink (show other bugs)
Version: unspecified   Edit
Hardware: PC Windows XP
: P3 enhancement (vote)
Target Milestone: ---   Edit
Assignee: Nobody - feel free to take it CLA
QA Contact:
URL:
Whiteboard:
Keywords: performance
Depends on:
Blocks:
 
Reported: 2009-04-01 10:55 EDT by James Sutherland CLA
Modified: 2022-06-09 10:29 EDT (History)
0 users

See Also:


Attachments
patch (116.54 KB, patch)
2009-04-06 11:11 EDT, James Sutherland CLA
no flags Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description James Sutherland CLA 2009-04-01 10:55:32 EDT
By default we currently use,
- read pool with 2 connections
- write pool with 5-10 connections

This has the following issues
- 7 connections connected at startup adding to startup cost and useability
- only 2 read connections gives poor concurrency (can't scale past 2 threads)
- 5-10 write connections also give poor conurrency > 10 threads, and at > 5 threads start thrasing connections (connect/disconnect each access)
- the split read/write pools make for an in-efficient usage of connections, if you have 32 threads you need to allocate 32+32=64 connections instead of just 32 with a shared pool

Enhancement is to add:
- Support for initial size on ConnectionPool, this is number of connections used at startup (will then grow to min and wait at max)
- Use a shared (exclusive) read/write connection pool by default, use a single pool for the read and default write conneciton pool
- When add/reomving connections, always use the tail, not the head of the queue, this is more efficient, and gives better performance because it uses a "hot" connection
Comment 1 James Sutherland CLA 2009-04-01 10:57:25 EDT
This new default pool with have 1 initial, 32 min/max connections.
Comment 2 James Sutherland CLA 2009-04-01 16:04:52 EDT
Changes:
- changed ConnectionPool queues to use List and generics, not Vector
- updated some tests
- added persistence.xml properties for connection pool sizes, initial size and sequence connection pool
- added reset to Accessor
- added support to set ConnectionPool, initialSize in SequenceManager
- changed reflection weaving to use valueOf for primitives
- changed ConnectionPool to default 1 initial, 32 min/max connections
- changed ConnectionPool to acquire last connection to first (hot/more efficient)
- added initial connections to ConnectionPool
- simplified ServerSession constructors
- updated Project, Server, ServerSession API/comments
Comment 3 James Sutherland CLA 2009-04-06 11:11:21 EDT
Created attachment 131003 [details]
patch
Comment 4 James Sutherland CLA 2009-04-06 11:17:19 EDT
Fixed

Comment 5 James Sutherland CLA 2009-05-12 15:19:03 EDT
Closing
Comment 6 Peter Krogh CLA 2009-08-26 09:50:41 EDT
Mass update to change fixed in target.
Comment 7 Peter Krogh CLA 2009-08-26 09:53:52 EDT
Mass update to change fixed in target.
Comment 8 Peter Krogh CLA 2009-08-26 09:59:41 EDT
Mass update to change fixed in target.
Comment 9 Peter Krogh CLA 2009-08-26 10:01:53 EDT
Mass update to change fixed in target.
Comment 10 Eclipse Webmaster CLA 2022-06-09 10:16:27 EDT
The Eclipselink project has moved to Github: https://github.com/eclipse-ee4j/eclipselink
Comment 11 Eclipse Webmaster CLA 2022-06-09 10:29:32 EDT
The Eclipselink project has moved to Github: https://github.com/eclipse-ee4j/eclipselink