SlideShare a Scribd company logo
1 of 64
Download to read offline
Copyright © 2017, Oracle and/or its affiliates. All rights reserved. |
Connection Pool Sizing Concepts
Why SmartDB Doesn’t Require Large Connection Pool
Toon Koppelaars
Real-World Performance
Oracle Server Technologies
Copyright © 2017, Oracle and/or its affiliates. All rights reserved. |
Safe Harbor Statement
The following is intended to outline our general product direction. It is intended for
information purposes only, and may not be incorporated into any contract. It is not a
commitment to deliver any material, code, or functionality, and should not be relied upon
in making purchasing decisions. The development, release, and timing of any features or
functionality described for Oracle’s products remains at the sole discretion of Oracle.
Copyright © 2017, Oracle and/or its affiliates. All rights reserved. |
Topics
• Web Application Architecture
– Connection Reservation and Connection Queueing
• The Issue of Too Large Connection Pools
– From CPU Oversubscription to Database Oversubscription
• Sizing Your Connection Pool
– %Idle-Time in Foreground Processes
• Recommendations
3
Copyright © 2017, Oracle and/or its affiliates. All rights reserved. |
Web Application Architecture
• Architecture involves:
– Browsers with html (and JavaScript)
– Web server that takes care of http(s) traffic
– Application server that runs application code
– Database server that provides data persistency services
4
Copyright © 2017, Oracle and/or its affiliates. All rights reserved. |
Web: Past 15 Years
5
Database Server
H
T
T
P
-
S
R
V
Application Server
Dedicated Server
Dedicated Server
Dedicated Server
JVM
C1
Connection pool
C2
C3
Number of pre-
spawned connection
objects each with a
login into database
Each connection object is
logged into database
using dedicated server
aka foreground process
Multi-threaded JVM
(has thread pool)
Pre-loaded
application code
(ear/jar/war files)
Copyright © 2017, Oracle and/or its affiliates. All rights reserved. |
Connection Pool Configuration (UCP)
6
Console->Services->Data Sources
• When you start application server, WLS will initialize connection
pool in JVM
Copyright © 2017, Oracle and/or its affiliates. All rights reserved. |
Doing This Programmatically Yourself
7
Copyright © 2017, Oracle and/or its affiliates. All rights reserved. |
Web: Past 15 Years
8
Database Server
H
T
T
P
-
S
R
V
Application Server
Dedicated Server
Dedicated Server
Dedicated Server
JVM
C1
Connection pool
C2
C3
Much fewer connections/
processes/sessions will be shared
over much more (browser) clients
Lots of browsers sharing only a
few connections into database:
how does that work?
These are
time-shared
Copyright © 2017, Oracle and/or its affiliates. All rights reserved. |
Browser Requests Cause Working Application Threads
9
Eight threads currently
processing requests on
application server
Eight browsers
currently waiting for
request to complete
Copyright © 2017, Oracle and/or its affiliates. All rights reserved. |
Introducing Term: Connection Reservation
• Time during which thread has claimed one of the connections from
pool to do database work
10
Copyright © 2017, Oracle and/or its affiliates. All rights reserved. |
Connection Reservation
11
JVM
C1 C2 C3
JDBC
S1 S2 S3
Thread 6 services request from browser client
T1 T2 T3 T4 T5 T6 T7 T8
Connection pool
Timeline T6
Java thread on CPU
On network
Foreground on CPU
Copyright © 2017, Oracle and/or its affiliates. All rights reserved. |
Connection Reservation
12
JVM
C1 C2 C3
JDBC
S1 S2 S3
Executes business logic and
needs to call database
T1 T2 T3 T4 T5 T6 T7 T8
Connection pool
Timeline T6
Java thread on CPU
On network
Foreground on CPU
Copyright © 2017, Oracle and/or its affiliates. All rights reserved. |
Connection Reservation
13
JVM
C1
C2
C3
JDBC
S1 S2 S3
T1 T2 T3 T4 T5 T6 T7 T8
Connection pool
C2 now unavailable for
other threads
Thread 6 requests and acquires
arbitrary free connection from pool
Timeline T6
Acquire
connection
Java thread on CPU
On network
Foreground on CPU
Copyright © 2017, Oracle and/or its affiliates. All rights reserved. |
Connection Reservation
14
JVM
C1
C2
C3
JDBC
S1 S2 S3
T1 T2 T3 T4 T5 T6 T7 T8
Connection pool
Thread 6 submits SQL via C2
(T6 now blocked on method call of C2)
DB session S2 wakes up
from idle state and
starts work on SQL
Timeline T6
Acquire
connection
Java thread on CPU
On network
Foreground on CPU
Copyright © 2017, Oracle and/or its affiliates. All rights reserved. |
Connection Reservation
15
JVM
C1
C2
C3
JDBC
S1 S2 S3
T1 T2 T3 T4 T5 T6 T7 T8
Connection pool
S2 executes SQL
statement
Timeline T6
Acquire
connection
Java thread on CPU
On network
Foreground on CPU
Copyright © 2017, Oracle and/or its affiliates. All rights reserved. |
Connection Reservation
16
JVM
C1
C2
C3
JDBC
S1 S2 S3
T1 T2 T3 T4 T5 T6 T7 T8
Connection pool
S2 sends result
back to C2
S2 idle again
TimelineT6
Acquire
connection
Java thread on CPU
On network
Foreground on CPU
Copyright © 2017, Oracle and/or its affiliates. All rights reserved. |
Connection Reservation
17
JVM
C1
C2
C3
JDBC
S1 S2 S3
T1 T2 T3 T4 T5 T6 T7 T8
Connection pool
T6 wakes up, gets
results from C2
Timeline T6
Acquire
connection
Java thread on CPU
On network
Foreground on CPU
Copyright © 2017, Oracle and/or its affiliates. All rights reserved. |
Connection Reservation
18
JVM
C1 C2 C3
JDBC
S1 S2 S3
T1 T2 T3 T4 T5 T6 T7 T8
Connection pool
T6 releases C2
back to pool
C2 available again for
other browser’s threads
Timeline T6
Acquire
connection
Release
connection
Java thread on CPU
On network
Foreground on CPU
Copyright © 2017, Oracle and/or its affiliates. All rights reserved. |
Connection Reservation
19
JVM
C1 C2 C3
JDBC
S1 S2 S3
T1 T2 T3 T4 T5 T6 T7 T8
Connection pool
Timeline T6
Acquire
connection
Release
connection
Java thread on CPU
On network
Foreground on CPU
Sends results
back to browser
Copyright © 2017, Oracle and/or its affiliates. All rights reserved. |
Connection Reservation
20
JVM
C1 C2 C3
JDBC
S1 S2 S3
T1 T2 T3 T4 T5 T6 T7 T8
Connection pool
Timeline T6
Acquire
connection
Release
connection
Java thread on CPU
On network
Foreground on CPU
T6 ready for other
browser request
Copyright © 2017, Oracle and/or its affiliates. All rights reserved. |
Timesharing Connections / Foregrounds
21
Timeline T6
Acquire
Release
S2
S2 exclusively
in use by T6
JVM
C1 C2 C3
JDBC
S1 S2 S3
T1 T2 T3 T4 T5 T6 T7 T8
Connection pool
Copyright © 2017, Oracle and/or its affiliates. All rights reserved. |
Timesharing Connections / Foregrounds
22
Copyright © 2017, Oracle and/or its affiliates. All rights reserved. |
Are Durations Proportionally OK?
23
Time-in-database
dominant?
Time-on-wire
dominant?
Time-in-JVM
dominant?
Copyright © 2017, Oracle and/or its affiliates. All rights reserved. |
Are Durations Proportionally OK?
• Network latency between two servers inside same
data center:
– 0.5 ms – 1.5 ms (* 2)
• Time to execute single-row database call:
– 10 µs – 1ms
• Time to descend/ascend persistency framework and
JDBC layers:
– 5 µs – 50 µs? (*2)
24
Copyright © 2017, Oracle and/or its affiliates. All rights reserved. |
Was Only Showing One Database Call
25
In real world,
application will do
multiple calls per
reservation
Copyright © 2017, Oracle and/or its affiliates. All rights reserved. |
Connection Pool At Full Capacity
26
JVM
C1 C2 C3
JDBC
S1 S2 S3
T1 T2 T3 T4 T5 T6 T7 T8
Connection pool
What if thread T1
wants to do DB
work?
Copyright © 2017, Oracle and/or its affiliates. All rights reserved. |
What If 4th Thread Wants to Do Database Work?
• Depends on how you have configured your connection pool
A. Your pool is configured to dynamically grow (or, max # of
connections is not yet reached)
1. New 4th connection created and handed out to thread T1
B. Your pool has reached max # of connections configured
Two options:
2. Your thread will get Java exception
3. Your thread will be put to sleep, until connection becomes available
27
Copyright © 2017, Oracle and/or its affiliates. All rights reserved. |
Connection Pool Configuration (UCP)
28
Console->Services->Data Sources
Copyright © 2017, Oracle and/or its affiliates. All rights reserved. |
Doing This Programmatically Yourself
29
Copyright © 2017, Oracle and/or its affiliates. All rights reserved. |
In Real World:
• Developers do not want:
– Their threads to receive an exception from connection pool manager
– Their thread to be put “on-hold” by connection pool manager
• So we nearly always see connection pools that can grow to very large
# of connections
• We call these: dynamic connection pools
– These can cause database to become CPU-oversubscribed
30
This potentially
breaks the app
This won’t
It may cause
“stuck threads”
Copyright © 2017, Oracle and/or its affiliates. All rights reserved. |
Topics
• Web Application Architecture
– Application Threads, Connection Pool, Connection Queueing
• The Issue of Too Large Connection Pools
– From CPU Oversubscription to Database Oversubscription
• Sizing Your Connection Pool
– %Idle-Time in Foreground Processes
• Recommendations
31
Copyright © 2017, Oracle and/or its affiliates. All rights reserved. |
#1 Issue in Real-World: Database Oversubscription
• Caused by dynamic connection pools
• Majority of customers that come to us with escalations, experience this
• You might be having this problem without knowing it
32
Copyright © 2017, Oracle and/or its affiliates. All rights reserved. |
CPU Oversubscription
33
DB Time
User CPU
Run-queue waits
Contention in DB
#cores in
DB server
Sys CPU # active sessions
Copyright © 2017, Oracle and/or its affiliates. All rights reserved. |
Database Oversubscription: Likely Scenario
34
# active sessions
DB Time
#cores
User CPU
Run-queue waits
Contention in DB
#cores in
DB server
Sys CPU
Waits increase
disproportionally
under CPU starvation
Copyright © 2017, Oracle and/or its affiliates. All rights reserved. |
Database Oversubscription: Likely Scenario
35
# active sessions
DB Time
#cores
CPU overhead in OS
CPU overhead in DBMS
Ever increasing
waits in DBMS
Adding sessions
won't increase DB-
CPUUser CPU
Run-queue waits
Status quo here
Observation: CPU available!
And lots of DB-waits
DB-waits will lead you
down wrong path
Available CPU will invite you
to further increase #threads
and connection pool
Contention in DB
#cores in
DB server
Sys CPU
Waits increase
disproportionally
under CPU starvation
Copyright © 2017, Oracle and/or its affiliates. All rights reserved. |
Only One Thing You Should Do
36
# active sessions
#cores
Useful work done
Run-queue waits
Contention in DB
#cores in
DB server
Decrease and cap
#connections to get
more useful work
done
DB Time
Copyright © 2017, Oracle and/or its affiliates. All rights reserved. |
Example Database Oversubscription
37
Copyright © 2017, Oracle and/or its affiliates. All rights reserved. |
Moral of This Story
• It is far better to have threads queue for pooled connection
on application server
Than,
It is for database to be oversubscribed, or
To have threads wait for DB-calls to be serviced terribly slow
38
Copyright © 2017, Oracle and/or its affiliates. All rights reserved. |
The Big Question
• What is the appropriate (maximum) size for my connection pool?
• So that:
– When load increases you won’t enter database oversubscription land
– And application threads are willing to queue
• Too small  database has unused capacity
• Too large  database becomes inefficient in servicing your calls
39
Copyright © 2017, Oracle and/or its affiliates. All rights reserved. |
Network Network Database
What Is Your Foreground Doing?
Application
End User
Breakdown during connection reservation
Time Line
Query
Query
Update
Update
Update
commit
conn = Datasource.getConnection
conn.close()
Fast (simple SQL)SlowNoticeable
Copyright © 2017, Oracle and/or its affiliates. All rights reserved. |
Breakdown of Your Foreground Session Time
41
Breakdown during connection reservation
Time Line
SQL
Application-server code Network
15% busy
85% idle
2% busy
98% idle
We see this more in real world:
very high %idle-time in foregrounds
Copyright © 2017, Oracle and/or its affiliates. All rights reserved. |
Implication of High %Idle Time in Foreground Session
• So your SW-architecture keeps database session busy only 2% of time
• What does that imply?
– You would need 50 sessions to get one DB-core busy (= 50 connections in conn.pool)
– If you have 32 cores in your database server:
 You would need 1600 sessions to get all cores busy
• This is assuming that all your DB Time is DB CPU!
– You likely need even more connections/sessions
42
Copyright © 2017, Oracle and/or its affiliates. All rights reserved. |
Connection Pool Sizing
• 0% FG idle time inside reservation  1 connection per core required
• 80% FG idle time inside reservation  5 connections per core required
• 90% FG idle time inside reservation  10 connections per core required
• 95% FG idle time inside reservation  20 connections per core required
• 98% FG idle time inside reservation  50 connections per core required
• Appropriate connection pool size := * #cores
X = % FG Idle Time inside reservation
43
100
100- X
This drives
connection pool size!
Copyright © 2017, Oracle and/or its affiliates. All rights reserved. |
Waiting in Mid-Tier Versus Waiting in DB-Tier
• Again:
You need to configure threads are willing to queue for connection
otherwise you break the application
• The formula is good starting point for appropriate connection pool size
• Let’s plot that curve
44
Copyright © 2017, Oracle and/or its affiliates. All rights reserved. |
Basic Formula Upper Bound Connection Pool Size
10 Core Database Server
45
Sizing connection
pool above curve
just introduces
more overhead Sizing connection
pool under curve
introduces server
idle time
Copyright © 2017, Oracle and/or its affiliates. All rights reserved. |
Connection Pool Sizes in Real-World
46
What we often see
Copyright © 2017, Oracle and/or its affiliates. All rights reserved. |
Layered Software Architectures
• Since these architectures use database as persistence layer (bit-bucket), all
SQL is single row CRUD SQL
• Which execute in tens of micro seconds
• Causing high %Idle Times in foreground sessions
• Requiring large connection pools
47
Copyright © 2017, Oracle and/or its affiliates. All rights reserved. |
Our Rule-of-Thumb: <10 Times Number of Cores
48
We assume your average % idle time
inside reservation is anywhere
between 0% and 90%
Copyright © 2017, Oracle and/or its affiliates. All rights reserved. |
Why Our Rule-of-Thumb Won't Always Work
• If you have substantial %idle time inside connection
reservation
And you are not aware of that
– Eg. A REST call is executed during connection reservation
– Taking couple of milliseconds easily
• Shrinking might disable full use of available CPU power
on DB-server
– As your %Idle Time during reservation is extremely high
– Your only option then is to change the application and decrease
%Idle Time during reservation
49
Copyright © 2017, Oracle and/or its affiliates. All rights reserved. |
That’s All Very Interesting, But …
• What the heck is the “%Idle Time Inside Reservation” for my application?
50
Copyright © 2017, Oracle and/or its affiliates. All rights reserved. |
A Challenge For You
• Ideally you’d want this to be instrumented by Java developers in their code
• To create awareness with them too
• However, can you as DBA get a clue?
51
Copyright © 2017, Oracle and/or its affiliates. All rights reserved. |
Finding %Idle Time Inside Reservation
• Assuming you’re still in the safe zone
– Use test-system, or “quiet” prod-system
• Just do SQL-trace of one of connection-pool sessions for minute during
representative workload and investigate trace-file
• Likely you’ll be able to spot “acquire” and “release” events via some repetitive
pattern. For example:
– “Release” typically would be XCTEND (commit or rollback)
– “Acquire” typically starts with “timestamp” during quiet period
Or immediately after XCTEND
Or you can spot it via some initialization statement
52
Copyright © 2017, Oracle and/or its affiliates. All rights reserved. |
Example Trace File
53
Acquire connection object
Release
Acquire
Release
Copyright © 2017, Oracle and/or its affiliates. All rights reserved. |
Approximating %Idle Time Inside Reservation
• Investigate one acquire-release block in trace-file
– Determine DB-time by summing all ”e=“ values (dep=0 only)
– Determine Elapsed time from difference between first and last “tim=“ values
• Add e-value from first tim value, as tim values represent “time when completed”
• %Idle-Time-inside-reservation is: ((Elapsed – DB-Time)/Elapsed) * 100
54
Copyright © 2017, Oracle and/or its affiliates. All rights reserved. |
Approximating %Idle Time Inside Reservation
55
Difference is:
2,237us
Difference is:
2,237us + 17us
= 2,254us
Sum is:
1,053us
((2,254 – 1,053)/2,254)*100% =
53% approximate idle time inside reservation
 Connection pool size about 2X number of cores
Copyright © 2017, Oracle and/or its affiliates. All rights reserved. |
A Word on Batch Programs
• Context so far has been: web applications with many browser users
• Batch programs:
– Developers usually create some kind of do-it-yourself parallelism
– Configurable number of threads to get work done
– We see comparable behavior of these threads wrt. connection pool usage
• They loop and do a transaction per iteration
• For each transaction they acquire/release a connection
– Same math applies
56
Copyright © 2017, Oracle and/or its affiliates. All rights reserved. |
SmartDB Doesn’t Require Large Connection Pool
• SmartDB uses database as processing engine: database calls are far from
single row CRUD SQL
 call typically does much work in one go
• Which execute in couple of milliseconds
• Causing low %Idle Times in foreground sessions
• Requiring small connection pool
57
Copyright © 2017, Oracle and/or its affiliates. All rights reserved. |
Recommendations Connection Pool Sizing
• It all starts by knowing your average %Idle Time of foregrounds
58
Copyright © 2017, Oracle and/or its affiliates. All rights reserved. |
Recommendations Connection Pool Sizing
• It all starts by knowing your average %Idle Time of foregrounds
• Assuming CPU-bound, formula is a good starting point
• Set minimum/maximum/initial # of connections, all to same value
– And configure threads to wait for connection to become available
59
Copyright © 2017, Oracle and/or its affiliates. All rights reserved. |
Recommendations Connection Pool Sizing
• It all starts by knowing your average %Idle Time of foregrounds
• Assuming CPU-bound, formula is a good starting point
• Set minimum/maximum/initial # of connections, all to same value
– And configure threads to wait for connection to become available
• As DBA you can maybe decrease network-time component?
60
Copyright © 2017, Oracle and/or its affiliates. All rights reserved. |
Recommendations Connection Pool Sizing
• It all starts by knowing your average %Idle Time of foregrounds
• Assuming CPU-bound, formula is a good starting point
• Set minimum/maximum/initial # of connections, all to same value
– And configure threads to wait for connection to become available
• As DBA you can maybe decrease network-time component?
• On your next application development effort try to be aware, or better in
control, of Acquire/Release cycles, and (Java) code execution during these
cycles
• Your solution should minimize %Idle Time of foregrounds during
reservation
61
Copyright © 2017, Oracle and/or its affiliates. All rights reserved. |
Questions?
62
Twitter: @ToonKoppelaars
Copyright © 2019, Oracle and/or its affiliates. All rights reserved. | 63
Copyright © 2017, Oracle and/or its affiliates. All rights reserved. | 64

More Related Content

What's hot

Delta Lake OSS: Create reliable and performant Data Lake by Quentin Ambard
Delta Lake OSS: Create reliable and performant Data Lake by Quentin AmbardDelta Lake OSS: Create reliable and performant Data Lake by Quentin Ambard
Delta Lake OSS: Create reliable and performant Data Lake by Quentin AmbardParis Data Engineers !
 
Oracle RAC 12c Practical Performance Management and Tuning OOW13 [CON8825]
Oracle RAC 12c Practical Performance Management and Tuning OOW13 [CON8825]Oracle RAC 12c Practical Performance Management and Tuning OOW13 [CON8825]
Oracle RAC 12c Practical Performance Management and Tuning OOW13 [CON8825]Markus Michalewicz
 
[Meetup] a successful migration from elastic search to clickhouse
[Meetup] a successful migration from elastic search to clickhouse[Meetup] a successful migration from elastic search to clickhouse
[Meetup] a successful migration from elastic search to clickhouseVianney FOUCAULT
 
Oracle 10g Performance: chapter 02 aas
Oracle 10g Performance: chapter 02 aasOracle 10g Performance: chapter 02 aas
Oracle 10g Performance: chapter 02 aasKyle Hailey
 
Hudi architecture, fundamentals and capabilities
Hudi architecture, fundamentals and capabilitiesHudi architecture, fundamentals and capabilities
Hudi architecture, fundamentals and capabilitiesNishith Agarwal
 
Performance Tuning With Oracle ASH and AWR. Part 1 How And What
Performance Tuning With Oracle ASH and AWR. Part 1 How And WhatPerformance Tuning With Oracle ASH and AWR. Part 1 How And What
Performance Tuning With Oracle ASH and AWR. Part 1 How And Whatudaymoogala
 
EM12c: Capacity Planning with OEM Metrics
EM12c: Capacity Planning with OEM MetricsEM12c: Capacity Planning with OEM Metrics
EM12c: Capacity Planning with OEM MetricsMaaz Anjum
 
Oracle Real Application Clusters 19c- Best Practices and Internals- EMEA Tour...
Oracle Real Application Clusters 19c- Best Practices and Internals- EMEA Tour...Oracle Real Application Clusters 19c- Best Practices and Internals- EMEA Tour...
Oracle Real Application Clusters 19c- Best Practices and Internals- EMEA Tour...Sandesh Rao
 
Machine Learning and AI at Oracle
Machine Learning and AI at OracleMachine Learning and AI at Oracle
Machine Learning and AI at OracleSandesh Rao
 
Oak, the architecture of Apache Jackrabbit 3
Oak, the architecture of Apache Jackrabbit 3Oak, the architecture of Apache Jackrabbit 3
Oak, the architecture of Apache Jackrabbit 3Jukka Zitting
 
Oracle Enterprise Manager Cloud Control 13c for DBAs
Oracle Enterprise Manager Cloud Control 13c for DBAsOracle Enterprise Manager Cloud Control 13c for DBAs
Oracle Enterprise Manager Cloud Control 13c for DBAsGokhan Atil
 
Productizing Structured Streaming Jobs
Productizing Structured Streaming JobsProductizing Structured Streaming Jobs
Productizing Structured Streaming JobsDatabricks
 
Building large scale transactional data lake using apache hudi
Building large scale transactional data lake using apache hudiBuilding large scale transactional data lake using apache hudi
Building large scale transactional data lake using apache hudiBill Liu
 
[Pgday.Seoul 2017] 3. PostgreSQL WAL Buffers, Clog Buffers Deep Dive - 이근오
[Pgday.Seoul 2017] 3. PostgreSQL WAL Buffers, Clog Buffers Deep Dive - 이근오[Pgday.Seoul 2017] 3. PostgreSQL WAL Buffers, Clog Buffers Deep Dive - 이근오
[Pgday.Seoul 2017] 3. PostgreSQL WAL Buffers, Clog Buffers Deep Dive - 이근오PgDay.Seoul
 
Fine Tuning and Enhancing Performance of Apache Spark Jobs
Fine Tuning and Enhancing Performance of Apache Spark JobsFine Tuning and Enhancing Performance of Apache Spark Jobs
Fine Tuning and Enhancing Performance of Apache Spark JobsDatabricks
 
Oracle RAC 19c and Later - Best Practices #OOWLON
Oracle RAC 19c and Later - Best Practices #OOWLONOracle RAC 19c and Later - Best Practices #OOWLON
Oracle RAC 19c and Later - Best Practices #OOWLONMarkus Michalewicz
 
SQL Analytics Powering Telemetry Analysis at Comcast
SQL Analytics Powering Telemetry Analysis at ComcastSQL Analytics Powering Telemetry Analysis at Comcast
SQL Analytics Powering Telemetry Analysis at ComcastDatabricks
 
Designing Structured Streaming Pipelines—How to Architect Things Right
Designing Structured Streaming Pipelines—How to Architect Things RightDesigning Structured Streaming Pipelines—How to Architect Things Right
Designing Structured Streaming Pipelines—How to Architect Things RightDatabricks
 

What's hot (20)

Delta Lake OSS: Create reliable and performant Data Lake by Quentin Ambard
Delta Lake OSS: Create reliable and performant Data Lake by Quentin AmbardDelta Lake OSS: Create reliable and performant Data Lake by Quentin Ambard
Delta Lake OSS: Create reliable and performant Data Lake by Quentin Ambard
 
Oracle RAC 12c Practical Performance Management and Tuning OOW13 [CON8825]
Oracle RAC 12c Practical Performance Management and Tuning OOW13 [CON8825]Oracle RAC 12c Practical Performance Management and Tuning OOW13 [CON8825]
Oracle RAC 12c Practical Performance Management and Tuning OOW13 [CON8825]
 
[Meetup] a successful migration from elastic search to clickhouse
[Meetup] a successful migration from elastic search to clickhouse[Meetup] a successful migration from elastic search to clickhouse
[Meetup] a successful migration from elastic search to clickhouse
 
Oracle 10g Performance: chapter 02 aas
Oracle 10g Performance: chapter 02 aasOracle 10g Performance: chapter 02 aas
Oracle 10g Performance: chapter 02 aas
 
Hudi architecture, fundamentals and capabilities
Hudi architecture, fundamentals and capabilitiesHudi architecture, fundamentals and capabilities
Hudi architecture, fundamentals and capabilities
 
Performance Tuning With Oracle ASH and AWR. Part 1 How And What
Performance Tuning With Oracle ASH and AWR. Part 1 How And WhatPerformance Tuning With Oracle ASH and AWR. Part 1 How And What
Performance Tuning With Oracle ASH and AWR. Part 1 How And What
 
EM12c: Capacity Planning with OEM Metrics
EM12c: Capacity Planning with OEM MetricsEM12c: Capacity Planning with OEM Metrics
EM12c: Capacity Planning with OEM Metrics
 
ELK Stack
ELK StackELK Stack
ELK Stack
 
Oracle Real Application Clusters 19c- Best Practices and Internals- EMEA Tour...
Oracle Real Application Clusters 19c- Best Practices and Internals- EMEA Tour...Oracle Real Application Clusters 19c- Best Practices and Internals- EMEA Tour...
Oracle Real Application Clusters 19c- Best Practices and Internals- EMEA Tour...
 
Machine Learning and AI at Oracle
Machine Learning and AI at OracleMachine Learning and AI at Oracle
Machine Learning and AI at Oracle
 
Oak, the architecture of Apache Jackrabbit 3
Oak, the architecture of Apache Jackrabbit 3Oak, the architecture of Apache Jackrabbit 3
Oak, the architecture of Apache Jackrabbit 3
 
Oracle Enterprise Manager Cloud Control 13c for DBAs
Oracle Enterprise Manager Cloud Control 13c for DBAsOracle Enterprise Manager Cloud Control 13c for DBAs
Oracle Enterprise Manager Cloud Control 13c for DBAs
 
High Performance PL/SQL
High Performance PL/SQLHigh Performance PL/SQL
High Performance PL/SQL
 
Productizing Structured Streaming Jobs
Productizing Structured Streaming JobsProductizing Structured Streaming Jobs
Productizing Structured Streaming Jobs
 
Building large scale transactional data lake using apache hudi
Building large scale transactional data lake using apache hudiBuilding large scale transactional data lake using apache hudi
Building large scale transactional data lake using apache hudi
 
[Pgday.Seoul 2017] 3. PostgreSQL WAL Buffers, Clog Buffers Deep Dive - 이근오
[Pgday.Seoul 2017] 3. PostgreSQL WAL Buffers, Clog Buffers Deep Dive - 이근오[Pgday.Seoul 2017] 3. PostgreSQL WAL Buffers, Clog Buffers Deep Dive - 이근오
[Pgday.Seoul 2017] 3. PostgreSQL WAL Buffers, Clog Buffers Deep Dive - 이근오
 
Fine Tuning and Enhancing Performance of Apache Spark Jobs
Fine Tuning and Enhancing Performance of Apache Spark JobsFine Tuning and Enhancing Performance of Apache Spark Jobs
Fine Tuning and Enhancing Performance of Apache Spark Jobs
 
Oracle RAC 19c and Later - Best Practices #OOWLON
Oracle RAC 19c and Later - Best Practices #OOWLONOracle RAC 19c and Later - Best Practices #OOWLON
Oracle RAC 19c and Later - Best Practices #OOWLON
 
SQL Analytics Powering Telemetry Analysis at Comcast
SQL Analytics Powering Telemetry Analysis at ComcastSQL Analytics Powering Telemetry Analysis at Comcast
SQL Analytics Powering Telemetry Analysis at Comcast
 
Designing Structured Streaming Pipelines—How to Architect Things Right
Designing Structured Streaming Pipelines—How to Architect Things RightDesigning Structured Streaming Pipelines—How to Architect Things Right
Designing Structured Streaming Pipelines—How to Architect Things Right
 

Similar to Optimize Connection Pool Sizing to Avoid Database Oversubscription

Aioug connection poolsizingconcepts
Aioug connection poolsizingconceptsAioug connection poolsizingconcepts
Aioug connection poolsizingconceptsToon Koppelaars
 
Node.js and Oracle Database: New Development Techniques
Node.js and Oracle Database: New Development TechniquesNode.js and Oracle Database: New Development Techniques
Node.js and Oracle Database: New Development TechniquesChristopher Jones
 
3 Ways to Connect to the Oracle Cloud
3 Ways to Connect to the Oracle Cloud3 Ways to Connect to the Oracle Cloud
3 Ways to Connect to the Oracle CloudSimon Haslam
 
New availability features in oracle rac 12c release 2 anair ss
New availability features in oracle rac 12c release 2 anair   ssNew availability features in oracle rac 12c release 2 anair   ss
New availability features in oracle rac 12c release 2 anair ssAnil Nair
 
HTTP/2 Comes to Java: Servlet 4.0 and what it means for the Java/Jakarta EE e...
HTTP/2 Comes to Java: Servlet 4.0 and what it means for the Java/Jakarta EE e...HTTP/2 Comes to Java: Servlet 4.0 and what it means for the Java/Jakarta EE e...
HTTP/2 Comes to Java: Servlet 4.0 and what it means for the Java/Jakarta EE e...Edward Burns
 
Oracle WebLogic Server 12c: Seamless Oracle Database Integration (with NEC, O...
Oracle WebLogic Server 12c: Seamless Oracle Database Integration (with NEC, O...Oracle WebLogic Server 12c: Seamless Oracle Database Integration (with NEC, O...
Oracle WebLogic Server 12c: Seamless Oracle Database Integration (with NEC, O...jeckels
 
Desayuno Tecnico OVN - Xsigo
Desayuno Tecnico OVN - XsigoDesayuno Tecnico OVN - Xsigo
Desayuno Tecnico OVN - XsigoFran Navarro
 
OUG Scotland 2014 - NoSQL and MySQL - The best of both worlds
OUG Scotland 2014 - NoSQL and MySQL - The best of both worldsOUG Scotland 2014 - NoSQL and MySQL - The best of both worlds
OUG Scotland 2014 - NoSQL and MySQL - The best of both worldsAndrew Morgan
 
Mysql NDB Cluster's Asynchronous Parallel Design for High Performance
Mysql NDB Cluster's Asynchronous Parallel Design for High PerformanceMysql NDB Cluster's Asynchronous Parallel Design for High Performance
Mysql NDB Cluster's Asynchronous Parallel Design for High PerformanceBernd Ocklin
 
The Top Outages of 2022: Analysis and Takeaways
The Top Outages of 2022: Analysis and TakeawaysThe Top Outages of 2022: Analysis and Takeaways
The Top Outages of 2022: Analysis and TakeawaysThousandEyes
 
BRKSEC-3771 - WSA with wccp.pdf
BRKSEC-3771 - WSA with wccp.pdfBRKSEC-3771 - WSA with wccp.pdf
BRKSEC-3771 - WSA with wccp.pdfMenakaDevi14
 
Cassandra Adoption on Cisco UCS & Open stack
Cassandra Adoption on Cisco UCS & Open stackCassandra Adoption on Cisco UCS & Open stack
Cassandra Adoption on Cisco UCS & Open stackDataStax Academy
 
Meetup Oracle Database: 3 Analizar, Aconsejar, Automatizar… las nuevas funcio...
Meetup Oracle Database: 3 Analizar, Aconsejar, Automatizar… las nuevas funcio...Meetup Oracle Database: 3 Analizar, Aconsejar, Automatizar… las nuevas funcio...
Meetup Oracle Database: 3 Analizar, Aconsejar, Automatizar… las nuevas funcio...avanttic Consultoría Tecnológica
 
New lessons in connection management
New lessons in connection managementNew lessons in connection management
New lessons in connection managementToon Koppelaars
 
MySQL Performance Tuning 101
MySQL Performance Tuning 101MySQL Performance Tuning 101
MySQL Performance Tuning 101Mirko Ortensi
 
SOA & WebLogic - Lift & Shift to the Cloud
SOA & WebLogic - Lift & Shift to the CloudSOA & WebLogic - Lift & Shift to the Cloud
SOA & WebLogic - Lift & Shift to the CloudSimon Haslam
 
Using Databases and Containers From Development to Deployment
Using Databases and Containers  From Development to DeploymentUsing Databases and Containers  From Development to Deployment
Using Databases and Containers From Development to DeploymentAerospike, Inc.
 
Some Oracle AWR observations
Some Oracle AWR observationsSome Oracle AWR observations
Some Oracle AWR observationsConnor McDonald
 

Similar to Optimize Connection Pool Sizing to Avoid Database Oversubscription (20)

Aioug connection poolsizingconcepts
Aioug connection poolsizingconceptsAioug connection poolsizingconcepts
Aioug connection poolsizingconcepts
 
Node.js and Oracle Database: New Development Techniques
Node.js and Oracle Database: New Development TechniquesNode.js and Oracle Database: New Development Techniques
Node.js and Oracle Database: New Development Techniques
 
3 Ways to Connect to the Oracle Cloud
3 Ways to Connect to the Oracle Cloud3 Ways to Connect to the Oracle Cloud
3 Ways to Connect to the Oracle Cloud
 
New availability features in oracle rac 12c release 2 anair ss
New availability features in oracle rac 12c release 2 anair   ssNew availability features in oracle rac 12c release 2 anair   ss
New availability features in oracle rac 12c release 2 anair ss
 
Novinky v Oracle Database 18c
Novinky v Oracle Database 18cNovinky v Oracle Database 18c
Novinky v Oracle Database 18c
 
HTTP/2 Comes to Java: Servlet 4.0 and what it means for the Java/Jakarta EE e...
HTTP/2 Comes to Java: Servlet 4.0 and what it means for the Java/Jakarta EE e...HTTP/2 Comes to Java: Servlet 4.0 and what it means for the Java/Jakarta EE e...
HTTP/2 Comes to Java: Servlet 4.0 and what it means for the Java/Jakarta EE e...
 
Oracle WebLogic Server 12c: Seamless Oracle Database Integration (with NEC, O...
Oracle WebLogic Server 12c: Seamless Oracle Database Integration (with NEC, O...Oracle WebLogic Server 12c: Seamless Oracle Database Integration (with NEC, O...
Oracle WebLogic Server 12c: Seamless Oracle Database Integration (with NEC, O...
 
Desayuno Tecnico OVN - Xsigo
Desayuno Tecnico OVN - XsigoDesayuno Tecnico OVN - Xsigo
Desayuno Tecnico OVN - Xsigo
 
OUG Scotland 2014 - NoSQL and MySQL - The best of both worlds
OUG Scotland 2014 - NoSQL and MySQL - The best of both worldsOUG Scotland 2014 - NoSQL and MySQL - The best of both worlds
OUG Scotland 2014 - NoSQL and MySQL - The best of both worlds
 
Mysql NDB Cluster's Asynchronous Parallel Design for High Performance
Mysql NDB Cluster's Asynchronous Parallel Design for High PerformanceMysql NDB Cluster's Asynchronous Parallel Design for High Performance
Mysql NDB Cluster's Asynchronous Parallel Design for High Performance
 
The Top Outages of 2022: Analysis and Takeaways
The Top Outages of 2022: Analysis and TakeawaysThe Top Outages of 2022: Analysis and Takeaways
The Top Outages of 2022: Analysis and Takeaways
 
BRKSEC-3771 - WSA with wccp.pdf
BRKSEC-3771 - WSA with wccp.pdfBRKSEC-3771 - WSA with wccp.pdf
BRKSEC-3771 - WSA with wccp.pdf
 
Cassandra Adoption on Cisco UCS & Open stack
Cassandra Adoption on Cisco UCS & Open stackCassandra Adoption on Cisco UCS & Open stack
Cassandra Adoption on Cisco UCS & Open stack
 
Meetup Oracle Database: 3 Analizar, Aconsejar, Automatizar… las nuevas funcio...
Meetup Oracle Database: 3 Analizar, Aconsejar, Automatizar… las nuevas funcio...Meetup Oracle Database: 3 Analizar, Aconsejar, Automatizar… las nuevas funcio...
Meetup Oracle Database: 3 Analizar, Aconsejar, Automatizar… las nuevas funcio...
 
New lessons in connection management
New lessons in connection managementNew lessons in connection management
New lessons in connection management
 
SD Times - Docker v2
SD Times - Docker v2SD Times - Docker v2
SD Times - Docker v2
 
MySQL Performance Tuning 101
MySQL Performance Tuning 101MySQL Performance Tuning 101
MySQL Performance Tuning 101
 
SOA & WebLogic - Lift & Shift to the Cloud
SOA & WebLogic - Lift & Shift to the CloudSOA & WebLogic - Lift & Shift to the Cloud
SOA & WebLogic - Lift & Shift to the Cloud
 
Using Databases and Containers From Development to Deployment
Using Databases and Containers  From Development to DeploymentUsing Databases and Containers  From Development to Deployment
Using Databases and Containers From Development to Deployment
 
Some Oracle AWR observations
Some Oracle AWR observationsSome Oracle AWR observations
Some Oracle AWR observations
 

Recently uploaded

Factors to Consider When Choosing Accounts Payable Services Providers.pptx
Factors to Consider When Choosing Accounts Payable Services Providers.pptxFactors to Consider When Choosing Accounts Payable Services Providers.pptx
Factors to Consider When Choosing Accounts Payable Services Providers.pptxKatpro Technologies
 
Boost Fertility New Invention Ups Success Rates.pdf
Boost Fertility New Invention Ups Success Rates.pdfBoost Fertility New Invention Ups Success Rates.pdf
Boost Fertility New Invention Ups Success Rates.pdfsudhanshuwaghmare1
 
Boost PC performance: How more available memory can improve productivity
Boost PC performance: How more available memory can improve productivityBoost PC performance: How more available memory can improve productivity
Boost PC performance: How more available memory can improve productivityPrincipled Technologies
 
2024: Domino Containers - The Next Step. News from the Domino Container commu...
2024: Domino Containers - The Next Step. News from the Domino Container commu...2024: Domino Containers - The Next Step. News from the Domino Container commu...
2024: Domino Containers - The Next Step. News from the Domino Container commu...Martijn de Jong
 
Scaling API-first – The story of a global engineering organization
Scaling API-first – The story of a global engineering organizationScaling API-first – The story of a global engineering organization
Scaling API-first – The story of a global engineering organizationRadu Cotescu
 
The Role of Taxonomy and Ontology in Semantic Layers - Heather Hedden.pdf
The Role of Taxonomy and Ontology in Semantic Layers - Heather Hedden.pdfThe Role of Taxonomy and Ontology in Semantic Layers - Heather Hedden.pdf
The Role of Taxonomy and Ontology in Semantic Layers - Heather Hedden.pdfEnterprise Knowledge
 
EIS-Webinar-Prompt-Knowledge-Eng-2024-04-08.pptx
EIS-Webinar-Prompt-Knowledge-Eng-2024-04-08.pptxEIS-Webinar-Prompt-Knowledge-Eng-2024-04-08.pptx
EIS-Webinar-Prompt-Knowledge-Eng-2024-04-08.pptxEarley Information Science
 
Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL R...
Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL R...Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL R...
Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL R...Miguel Araújo
 
Slack Application Development 101 Slides
Slack Application Development 101 SlidesSlack Application Development 101 Slides
Slack Application Development 101 Slidespraypatel2
 
08448380779 Call Girls In Diplomatic Enclave Women Seeking Men
08448380779 Call Girls In Diplomatic Enclave Women Seeking Men08448380779 Call Girls In Diplomatic Enclave Women Seeking Men
08448380779 Call Girls In Diplomatic Enclave Women Seeking MenDelhi Call girls
 
Understanding Discord NSFW Servers A Guide for Responsible Users.pdf
Understanding Discord NSFW Servers A Guide for Responsible Users.pdfUnderstanding Discord NSFW Servers A Guide for Responsible Users.pdf
Understanding Discord NSFW Servers A Guide for Responsible Users.pdfUK Journal
 
A Year of the Servo Reboot: Where Are We Now?
A Year of the Servo Reboot: Where Are We Now?A Year of the Servo Reboot: Where Are We Now?
A Year of the Servo Reboot: Where Are We Now?Igalia
 
How to Troubleshoot Apps for the Modern Connected Worker
How to Troubleshoot Apps for the Modern Connected WorkerHow to Troubleshoot Apps for the Modern Connected Worker
How to Troubleshoot Apps for the Modern Connected WorkerThousandEyes
 
Driving Behavioral Change for Information Management through Data-Driven Gree...
Driving Behavioral Change for Information Management through Data-Driven Gree...Driving Behavioral Change for Information Management through Data-Driven Gree...
Driving Behavioral Change for Information Management through Data-Driven Gree...Enterprise Knowledge
 
04-2024-HHUG-Sales-and-Marketing-Alignment.pptx
04-2024-HHUG-Sales-and-Marketing-Alignment.pptx04-2024-HHUG-Sales-and-Marketing-Alignment.pptx
04-2024-HHUG-Sales-and-Marketing-Alignment.pptxHampshireHUG
 
The Codex of Business Writing Software for Real-World Solutions 2.pptx
The Codex of Business Writing Software for Real-World Solutions 2.pptxThe Codex of Business Writing Software for Real-World Solutions 2.pptx
The Codex of Business Writing Software for Real-World Solutions 2.pptxMalak Abu Hammad
 
TrustArc Webinar - Stay Ahead of US State Data Privacy Law Developments
TrustArc Webinar - Stay Ahead of US State Data Privacy Law DevelopmentsTrustArc Webinar - Stay Ahead of US State Data Privacy Law Developments
TrustArc Webinar - Stay Ahead of US State Data Privacy Law DevelopmentsTrustArc
 
Presentation on how to chat with PDF using ChatGPT code interpreter
Presentation on how to chat with PDF using ChatGPT code interpreterPresentation on how to chat with PDF using ChatGPT code interpreter
Presentation on how to chat with PDF using ChatGPT code interpreternaman860154
 
Artificial Intelligence: Facts and Myths
Artificial Intelligence: Facts and MythsArtificial Intelligence: Facts and Myths
Artificial Intelligence: Facts and MythsJoaquim Jorge
 
Advantages of Hiring UIUX Design Service Providers for Your Business
Advantages of Hiring UIUX Design Service Providers for Your BusinessAdvantages of Hiring UIUX Design Service Providers for Your Business
Advantages of Hiring UIUX Design Service Providers for Your BusinessPixlogix Infotech
 

Recently uploaded (20)

Factors to Consider When Choosing Accounts Payable Services Providers.pptx
Factors to Consider When Choosing Accounts Payable Services Providers.pptxFactors to Consider When Choosing Accounts Payable Services Providers.pptx
Factors to Consider When Choosing Accounts Payable Services Providers.pptx
 
Boost Fertility New Invention Ups Success Rates.pdf
Boost Fertility New Invention Ups Success Rates.pdfBoost Fertility New Invention Ups Success Rates.pdf
Boost Fertility New Invention Ups Success Rates.pdf
 
Boost PC performance: How more available memory can improve productivity
Boost PC performance: How more available memory can improve productivityBoost PC performance: How more available memory can improve productivity
Boost PC performance: How more available memory can improve productivity
 
2024: Domino Containers - The Next Step. News from the Domino Container commu...
2024: Domino Containers - The Next Step. News from the Domino Container commu...2024: Domino Containers - The Next Step. News from the Domino Container commu...
2024: Domino Containers - The Next Step. News from the Domino Container commu...
 
Scaling API-first – The story of a global engineering organization
Scaling API-first – The story of a global engineering organizationScaling API-first – The story of a global engineering organization
Scaling API-first – The story of a global engineering organization
 
The Role of Taxonomy and Ontology in Semantic Layers - Heather Hedden.pdf
The Role of Taxonomy and Ontology in Semantic Layers - Heather Hedden.pdfThe Role of Taxonomy and Ontology in Semantic Layers - Heather Hedden.pdf
The Role of Taxonomy and Ontology in Semantic Layers - Heather Hedden.pdf
 
EIS-Webinar-Prompt-Knowledge-Eng-2024-04-08.pptx
EIS-Webinar-Prompt-Knowledge-Eng-2024-04-08.pptxEIS-Webinar-Prompt-Knowledge-Eng-2024-04-08.pptx
EIS-Webinar-Prompt-Knowledge-Eng-2024-04-08.pptx
 
Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL R...
Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL R...Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL R...
Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL R...
 
Slack Application Development 101 Slides
Slack Application Development 101 SlidesSlack Application Development 101 Slides
Slack Application Development 101 Slides
 
08448380779 Call Girls In Diplomatic Enclave Women Seeking Men
08448380779 Call Girls In Diplomatic Enclave Women Seeking Men08448380779 Call Girls In Diplomatic Enclave Women Seeking Men
08448380779 Call Girls In Diplomatic Enclave Women Seeking Men
 
Understanding Discord NSFW Servers A Guide for Responsible Users.pdf
Understanding Discord NSFW Servers A Guide for Responsible Users.pdfUnderstanding Discord NSFW Servers A Guide for Responsible Users.pdf
Understanding Discord NSFW Servers A Guide for Responsible Users.pdf
 
A Year of the Servo Reboot: Where Are We Now?
A Year of the Servo Reboot: Where Are We Now?A Year of the Servo Reboot: Where Are We Now?
A Year of the Servo Reboot: Where Are We Now?
 
How to Troubleshoot Apps for the Modern Connected Worker
How to Troubleshoot Apps for the Modern Connected WorkerHow to Troubleshoot Apps for the Modern Connected Worker
How to Troubleshoot Apps for the Modern Connected Worker
 
Driving Behavioral Change for Information Management through Data-Driven Gree...
Driving Behavioral Change for Information Management through Data-Driven Gree...Driving Behavioral Change for Information Management through Data-Driven Gree...
Driving Behavioral Change for Information Management through Data-Driven Gree...
 
04-2024-HHUG-Sales-and-Marketing-Alignment.pptx
04-2024-HHUG-Sales-and-Marketing-Alignment.pptx04-2024-HHUG-Sales-and-Marketing-Alignment.pptx
04-2024-HHUG-Sales-and-Marketing-Alignment.pptx
 
The Codex of Business Writing Software for Real-World Solutions 2.pptx
The Codex of Business Writing Software for Real-World Solutions 2.pptxThe Codex of Business Writing Software for Real-World Solutions 2.pptx
The Codex of Business Writing Software for Real-World Solutions 2.pptx
 
TrustArc Webinar - Stay Ahead of US State Data Privacy Law Developments
TrustArc Webinar - Stay Ahead of US State Data Privacy Law DevelopmentsTrustArc Webinar - Stay Ahead of US State Data Privacy Law Developments
TrustArc Webinar - Stay Ahead of US State Data Privacy Law Developments
 
Presentation on how to chat with PDF using ChatGPT code interpreter
Presentation on how to chat with PDF using ChatGPT code interpreterPresentation on how to chat with PDF using ChatGPT code interpreter
Presentation on how to chat with PDF using ChatGPT code interpreter
 
Artificial Intelligence: Facts and Myths
Artificial Intelligence: Facts and MythsArtificial Intelligence: Facts and Myths
Artificial Intelligence: Facts and Myths
 
Advantages of Hiring UIUX Design Service Providers for Your Business
Advantages of Hiring UIUX Design Service Providers for Your BusinessAdvantages of Hiring UIUX Design Service Providers for Your Business
Advantages of Hiring UIUX Design Service Providers for Your Business
 

Optimize Connection Pool Sizing to Avoid Database Oversubscription

  • 1. Copyright © 2017, Oracle and/or its affiliates. All rights reserved. | Connection Pool Sizing Concepts Why SmartDB Doesn’t Require Large Connection Pool Toon Koppelaars Real-World Performance Oracle Server Technologies
  • 2. Copyright © 2017, Oracle and/or its affiliates. All rights reserved. | Safe Harbor Statement The following is intended to outline our general product direction. It is intended for information purposes only, and may not be incorporated into any contract. It is not a commitment to deliver any material, code, or functionality, and should not be relied upon in making purchasing decisions. The development, release, and timing of any features or functionality described for Oracle’s products remains at the sole discretion of Oracle.
  • 3. Copyright © 2017, Oracle and/or its affiliates. All rights reserved. | Topics • Web Application Architecture – Connection Reservation and Connection Queueing • The Issue of Too Large Connection Pools – From CPU Oversubscription to Database Oversubscription • Sizing Your Connection Pool – %Idle-Time in Foreground Processes • Recommendations 3
  • 4. Copyright © 2017, Oracle and/or its affiliates. All rights reserved. | Web Application Architecture • Architecture involves: – Browsers with html (and JavaScript) – Web server that takes care of http(s) traffic – Application server that runs application code – Database server that provides data persistency services 4
  • 5. Copyright © 2017, Oracle and/or its affiliates. All rights reserved. | Web: Past 15 Years 5 Database Server H T T P - S R V Application Server Dedicated Server Dedicated Server Dedicated Server JVM C1 Connection pool C2 C3 Number of pre- spawned connection objects each with a login into database Each connection object is logged into database using dedicated server aka foreground process Multi-threaded JVM (has thread pool) Pre-loaded application code (ear/jar/war files)
  • 6. Copyright © 2017, Oracle and/or its affiliates. All rights reserved. | Connection Pool Configuration (UCP) 6 Console->Services->Data Sources • When you start application server, WLS will initialize connection pool in JVM
  • 7. Copyright © 2017, Oracle and/or its affiliates. All rights reserved. | Doing This Programmatically Yourself 7
  • 8. Copyright © 2017, Oracle and/or its affiliates. All rights reserved. | Web: Past 15 Years 8 Database Server H T T P - S R V Application Server Dedicated Server Dedicated Server Dedicated Server JVM C1 Connection pool C2 C3 Much fewer connections/ processes/sessions will be shared over much more (browser) clients Lots of browsers sharing only a few connections into database: how does that work? These are time-shared
  • 9. Copyright © 2017, Oracle and/or its affiliates. All rights reserved. | Browser Requests Cause Working Application Threads 9 Eight threads currently processing requests on application server Eight browsers currently waiting for request to complete
  • 10. Copyright © 2017, Oracle and/or its affiliates. All rights reserved. | Introducing Term: Connection Reservation • Time during which thread has claimed one of the connections from pool to do database work 10
  • 11. Copyright © 2017, Oracle and/or its affiliates. All rights reserved. | Connection Reservation 11 JVM C1 C2 C3 JDBC S1 S2 S3 Thread 6 services request from browser client T1 T2 T3 T4 T5 T6 T7 T8 Connection pool Timeline T6 Java thread on CPU On network Foreground on CPU
  • 12. Copyright © 2017, Oracle and/or its affiliates. All rights reserved. | Connection Reservation 12 JVM C1 C2 C3 JDBC S1 S2 S3 Executes business logic and needs to call database T1 T2 T3 T4 T5 T6 T7 T8 Connection pool Timeline T6 Java thread on CPU On network Foreground on CPU
  • 13. Copyright © 2017, Oracle and/or its affiliates. All rights reserved. | Connection Reservation 13 JVM C1 C2 C3 JDBC S1 S2 S3 T1 T2 T3 T4 T5 T6 T7 T8 Connection pool C2 now unavailable for other threads Thread 6 requests and acquires arbitrary free connection from pool Timeline T6 Acquire connection Java thread on CPU On network Foreground on CPU
  • 14. Copyright © 2017, Oracle and/or its affiliates. All rights reserved. | Connection Reservation 14 JVM C1 C2 C3 JDBC S1 S2 S3 T1 T2 T3 T4 T5 T6 T7 T8 Connection pool Thread 6 submits SQL via C2 (T6 now blocked on method call of C2) DB session S2 wakes up from idle state and starts work on SQL Timeline T6 Acquire connection Java thread on CPU On network Foreground on CPU
  • 15. Copyright © 2017, Oracle and/or its affiliates. All rights reserved. | Connection Reservation 15 JVM C1 C2 C3 JDBC S1 S2 S3 T1 T2 T3 T4 T5 T6 T7 T8 Connection pool S2 executes SQL statement Timeline T6 Acquire connection Java thread on CPU On network Foreground on CPU
  • 16. Copyright © 2017, Oracle and/or its affiliates. All rights reserved. | Connection Reservation 16 JVM C1 C2 C3 JDBC S1 S2 S3 T1 T2 T3 T4 T5 T6 T7 T8 Connection pool S2 sends result back to C2 S2 idle again TimelineT6 Acquire connection Java thread on CPU On network Foreground on CPU
  • 17. Copyright © 2017, Oracle and/or its affiliates. All rights reserved. | Connection Reservation 17 JVM C1 C2 C3 JDBC S1 S2 S3 T1 T2 T3 T4 T5 T6 T7 T8 Connection pool T6 wakes up, gets results from C2 Timeline T6 Acquire connection Java thread on CPU On network Foreground on CPU
  • 18. Copyright © 2017, Oracle and/or its affiliates. All rights reserved. | Connection Reservation 18 JVM C1 C2 C3 JDBC S1 S2 S3 T1 T2 T3 T4 T5 T6 T7 T8 Connection pool T6 releases C2 back to pool C2 available again for other browser’s threads Timeline T6 Acquire connection Release connection Java thread on CPU On network Foreground on CPU
  • 19. Copyright © 2017, Oracle and/or its affiliates. All rights reserved. | Connection Reservation 19 JVM C1 C2 C3 JDBC S1 S2 S3 T1 T2 T3 T4 T5 T6 T7 T8 Connection pool Timeline T6 Acquire connection Release connection Java thread on CPU On network Foreground on CPU Sends results back to browser
  • 20. Copyright © 2017, Oracle and/or its affiliates. All rights reserved. | Connection Reservation 20 JVM C1 C2 C3 JDBC S1 S2 S3 T1 T2 T3 T4 T5 T6 T7 T8 Connection pool Timeline T6 Acquire connection Release connection Java thread on CPU On network Foreground on CPU T6 ready for other browser request
  • 21. Copyright © 2017, Oracle and/or its affiliates. All rights reserved. | Timesharing Connections / Foregrounds 21 Timeline T6 Acquire Release S2 S2 exclusively in use by T6 JVM C1 C2 C3 JDBC S1 S2 S3 T1 T2 T3 T4 T5 T6 T7 T8 Connection pool
  • 22. Copyright © 2017, Oracle and/or its affiliates. All rights reserved. | Timesharing Connections / Foregrounds 22
  • 23. Copyright © 2017, Oracle and/or its affiliates. All rights reserved. | Are Durations Proportionally OK? 23 Time-in-database dominant? Time-on-wire dominant? Time-in-JVM dominant?
  • 24. Copyright © 2017, Oracle and/or its affiliates. All rights reserved. | Are Durations Proportionally OK? • Network latency between two servers inside same data center: – 0.5 ms – 1.5 ms (* 2) • Time to execute single-row database call: – 10 µs – 1ms • Time to descend/ascend persistency framework and JDBC layers: – 5 µs – 50 µs? (*2) 24
  • 25. Copyright © 2017, Oracle and/or its affiliates. All rights reserved. | Was Only Showing One Database Call 25 In real world, application will do multiple calls per reservation
  • 26. Copyright © 2017, Oracle and/or its affiliates. All rights reserved. | Connection Pool At Full Capacity 26 JVM C1 C2 C3 JDBC S1 S2 S3 T1 T2 T3 T4 T5 T6 T7 T8 Connection pool What if thread T1 wants to do DB work?
  • 27. Copyright © 2017, Oracle and/or its affiliates. All rights reserved. | What If 4th Thread Wants to Do Database Work? • Depends on how you have configured your connection pool A. Your pool is configured to dynamically grow (or, max # of connections is not yet reached) 1. New 4th connection created and handed out to thread T1 B. Your pool has reached max # of connections configured Two options: 2. Your thread will get Java exception 3. Your thread will be put to sleep, until connection becomes available 27
  • 28. Copyright © 2017, Oracle and/or its affiliates. All rights reserved. | Connection Pool Configuration (UCP) 28 Console->Services->Data Sources
  • 29. Copyright © 2017, Oracle and/or its affiliates. All rights reserved. | Doing This Programmatically Yourself 29
  • 30. Copyright © 2017, Oracle and/or its affiliates. All rights reserved. | In Real World: • Developers do not want: – Their threads to receive an exception from connection pool manager – Their thread to be put “on-hold” by connection pool manager • So we nearly always see connection pools that can grow to very large # of connections • We call these: dynamic connection pools – These can cause database to become CPU-oversubscribed 30 This potentially breaks the app This won’t It may cause “stuck threads”
  • 31. Copyright © 2017, Oracle and/or its affiliates. All rights reserved. | Topics • Web Application Architecture – Application Threads, Connection Pool, Connection Queueing • The Issue of Too Large Connection Pools – From CPU Oversubscription to Database Oversubscription • Sizing Your Connection Pool – %Idle-Time in Foreground Processes • Recommendations 31
  • 32. Copyright © 2017, Oracle and/or its affiliates. All rights reserved. | #1 Issue in Real-World: Database Oversubscription • Caused by dynamic connection pools • Majority of customers that come to us with escalations, experience this • You might be having this problem without knowing it 32
  • 33. Copyright © 2017, Oracle and/or its affiliates. All rights reserved. | CPU Oversubscription 33 DB Time User CPU Run-queue waits Contention in DB #cores in DB server Sys CPU # active sessions
  • 34. Copyright © 2017, Oracle and/or its affiliates. All rights reserved. | Database Oversubscription: Likely Scenario 34 # active sessions DB Time #cores User CPU Run-queue waits Contention in DB #cores in DB server Sys CPU Waits increase disproportionally under CPU starvation
  • 35. Copyright © 2017, Oracle and/or its affiliates. All rights reserved. | Database Oversubscription: Likely Scenario 35 # active sessions DB Time #cores CPU overhead in OS CPU overhead in DBMS Ever increasing waits in DBMS Adding sessions won't increase DB- CPUUser CPU Run-queue waits Status quo here Observation: CPU available! And lots of DB-waits DB-waits will lead you down wrong path Available CPU will invite you to further increase #threads and connection pool Contention in DB #cores in DB server Sys CPU Waits increase disproportionally under CPU starvation
  • 36. Copyright © 2017, Oracle and/or its affiliates. All rights reserved. | Only One Thing You Should Do 36 # active sessions #cores Useful work done Run-queue waits Contention in DB #cores in DB server Decrease and cap #connections to get more useful work done DB Time
  • 37. Copyright © 2017, Oracle and/or its affiliates. All rights reserved. | Example Database Oversubscription 37
  • 38. Copyright © 2017, Oracle and/or its affiliates. All rights reserved. | Moral of This Story • It is far better to have threads queue for pooled connection on application server Than, It is for database to be oversubscribed, or To have threads wait for DB-calls to be serviced terribly slow 38
  • 39. Copyright © 2017, Oracle and/or its affiliates. All rights reserved. | The Big Question • What is the appropriate (maximum) size for my connection pool? • So that: – When load increases you won’t enter database oversubscription land – And application threads are willing to queue • Too small  database has unused capacity • Too large  database becomes inefficient in servicing your calls 39
  • 40. Copyright © 2017, Oracle and/or its affiliates. All rights reserved. | Network Network Database What Is Your Foreground Doing? Application End User Breakdown during connection reservation Time Line Query Query Update Update Update commit conn = Datasource.getConnection conn.close() Fast (simple SQL)SlowNoticeable
  • 41. Copyright © 2017, Oracle and/or its affiliates. All rights reserved. | Breakdown of Your Foreground Session Time 41 Breakdown during connection reservation Time Line SQL Application-server code Network 15% busy 85% idle 2% busy 98% idle We see this more in real world: very high %idle-time in foregrounds
  • 42. Copyright © 2017, Oracle and/or its affiliates. All rights reserved. | Implication of High %Idle Time in Foreground Session • So your SW-architecture keeps database session busy only 2% of time • What does that imply? – You would need 50 sessions to get one DB-core busy (= 50 connections in conn.pool) – If you have 32 cores in your database server:  You would need 1600 sessions to get all cores busy • This is assuming that all your DB Time is DB CPU! – You likely need even more connections/sessions 42
  • 43. Copyright © 2017, Oracle and/or its affiliates. All rights reserved. | Connection Pool Sizing • 0% FG idle time inside reservation  1 connection per core required • 80% FG idle time inside reservation  5 connections per core required • 90% FG idle time inside reservation  10 connections per core required • 95% FG idle time inside reservation  20 connections per core required • 98% FG idle time inside reservation  50 connections per core required • Appropriate connection pool size := * #cores X = % FG Idle Time inside reservation 43 100 100- X This drives connection pool size!
  • 44. Copyright © 2017, Oracle and/or its affiliates. All rights reserved. | Waiting in Mid-Tier Versus Waiting in DB-Tier • Again: You need to configure threads are willing to queue for connection otherwise you break the application • The formula is good starting point for appropriate connection pool size • Let’s plot that curve 44
  • 45. Copyright © 2017, Oracle and/or its affiliates. All rights reserved. | Basic Formula Upper Bound Connection Pool Size 10 Core Database Server 45 Sizing connection pool above curve just introduces more overhead Sizing connection pool under curve introduces server idle time
  • 46. Copyright © 2017, Oracle and/or its affiliates. All rights reserved. | Connection Pool Sizes in Real-World 46 What we often see
  • 47. Copyright © 2017, Oracle and/or its affiliates. All rights reserved. | Layered Software Architectures • Since these architectures use database as persistence layer (bit-bucket), all SQL is single row CRUD SQL • Which execute in tens of micro seconds • Causing high %Idle Times in foreground sessions • Requiring large connection pools 47
  • 48. Copyright © 2017, Oracle and/or its affiliates. All rights reserved. | Our Rule-of-Thumb: <10 Times Number of Cores 48 We assume your average % idle time inside reservation is anywhere between 0% and 90%
  • 49. Copyright © 2017, Oracle and/or its affiliates. All rights reserved. | Why Our Rule-of-Thumb Won't Always Work • If you have substantial %idle time inside connection reservation And you are not aware of that – Eg. A REST call is executed during connection reservation – Taking couple of milliseconds easily • Shrinking might disable full use of available CPU power on DB-server – As your %Idle Time during reservation is extremely high – Your only option then is to change the application and decrease %Idle Time during reservation 49
  • 50. Copyright © 2017, Oracle and/or its affiliates. All rights reserved. | That’s All Very Interesting, But … • What the heck is the “%Idle Time Inside Reservation” for my application? 50
  • 51. Copyright © 2017, Oracle and/or its affiliates. All rights reserved. | A Challenge For You • Ideally you’d want this to be instrumented by Java developers in their code • To create awareness with them too • However, can you as DBA get a clue? 51
  • 52. Copyright © 2017, Oracle and/or its affiliates. All rights reserved. | Finding %Idle Time Inside Reservation • Assuming you’re still in the safe zone – Use test-system, or “quiet” prod-system • Just do SQL-trace of one of connection-pool sessions for minute during representative workload and investigate trace-file • Likely you’ll be able to spot “acquire” and “release” events via some repetitive pattern. For example: – “Release” typically would be XCTEND (commit or rollback) – “Acquire” typically starts with “timestamp” during quiet period Or immediately after XCTEND Or you can spot it via some initialization statement 52
  • 53. Copyright © 2017, Oracle and/or its affiliates. All rights reserved. | Example Trace File 53 Acquire connection object Release Acquire Release
  • 54. Copyright © 2017, Oracle and/or its affiliates. All rights reserved. | Approximating %Idle Time Inside Reservation • Investigate one acquire-release block in trace-file – Determine DB-time by summing all ”e=“ values (dep=0 only) – Determine Elapsed time from difference between first and last “tim=“ values • Add e-value from first tim value, as tim values represent “time when completed” • %Idle-Time-inside-reservation is: ((Elapsed – DB-Time)/Elapsed) * 100 54
  • 55. Copyright © 2017, Oracle and/or its affiliates. All rights reserved. | Approximating %Idle Time Inside Reservation 55 Difference is: 2,237us Difference is: 2,237us + 17us = 2,254us Sum is: 1,053us ((2,254 – 1,053)/2,254)*100% = 53% approximate idle time inside reservation  Connection pool size about 2X number of cores
  • 56. Copyright © 2017, Oracle and/or its affiliates. All rights reserved. | A Word on Batch Programs • Context so far has been: web applications with many browser users • Batch programs: – Developers usually create some kind of do-it-yourself parallelism – Configurable number of threads to get work done – We see comparable behavior of these threads wrt. connection pool usage • They loop and do a transaction per iteration • For each transaction they acquire/release a connection – Same math applies 56
  • 57. Copyright © 2017, Oracle and/or its affiliates. All rights reserved. | SmartDB Doesn’t Require Large Connection Pool • SmartDB uses database as processing engine: database calls are far from single row CRUD SQL  call typically does much work in one go • Which execute in couple of milliseconds • Causing low %Idle Times in foreground sessions • Requiring small connection pool 57
  • 58. Copyright © 2017, Oracle and/or its affiliates. All rights reserved. | Recommendations Connection Pool Sizing • It all starts by knowing your average %Idle Time of foregrounds 58
  • 59. Copyright © 2017, Oracle and/or its affiliates. All rights reserved. | Recommendations Connection Pool Sizing • It all starts by knowing your average %Idle Time of foregrounds • Assuming CPU-bound, formula is a good starting point • Set minimum/maximum/initial # of connections, all to same value – And configure threads to wait for connection to become available 59
  • 60. Copyright © 2017, Oracle and/or its affiliates. All rights reserved. | Recommendations Connection Pool Sizing • It all starts by knowing your average %Idle Time of foregrounds • Assuming CPU-bound, formula is a good starting point • Set minimum/maximum/initial # of connections, all to same value – And configure threads to wait for connection to become available • As DBA you can maybe decrease network-time component? 60
  • 61. Copyright © 2017, Oracle and/or its affiliates. All rights reserved. | Recommendations Connection Pool Sizing • It all starts by knowing your average %Idle Time of foregrounds • Assuming CPU-bound, formula is a good starting point • Set minimum/maximum/initial # of connections, all to same value – And configure threads to wait for connection to become available • As DBA you can maybe decrease network-time component? • On your next application development effort try to be aware, or better in control, of Acquire/Release cycles, and (Java) code execution during these cycles • Your solution should minimize %Idle Time of foregrounds during reservation 61
  • 62. Copyright © 2017, Oracle and/or its affiliates. All rights reserved. | Questions? 62 Twitter: @ToonKoppelaars
  • 63. Copyright © 2019, Oracle and/or its affiliates. All rights reserved. | 63
  • 64. Copyright © 2017, Oracle and/or its affiliates. All rights reserved. | 64