Skip to Main Content
  • Questions
  • Connection Pool from App Server and RAM usage in Database Server

Breadcrumb

Question and Answer

Connor McDonald

Thanks for the question, Sandeep.

Asked: October 09, 2015 - 5:11 am UTC

Last updated: June 08, 2017 - 1:42 am UTC

Version: 11.2.0.4.0

Viewed 1000+ times

You Asked

Hi Tom,

Configuration:-
---------------------
1) Oracle weblogic app server is used
2) The connection pool in side weblogic is set as MIN=1200 INITIAL=1200 MAX=1200
3) 8 managed + 1 admin servers inside weblogic
4) so total number sessions established with the database server is [1200 * 9 = 10800 ]
5) The RAM available inside database server is 128 GB
6) SGA=32GB, PGA=16GB AMM is in place and not ASMM
7) Number of CPU is 32

Observation:-
----------------
1) When all the app server is shut down, there are no connections
the os command out put is as below

free -g
total used free shared buffers cached
Mem: 125 26 99 0 0 13
-/+ buffers/cache: 13 112
Swap: 23 9 14

2) When all the app server is up, and there are 108000 sessions established

free -g
total used free shared buffers cached
Mem: 125 110 15 0 0 14
-/+ buffers/cache: 95 30
Swap: 25 0 25

3) As the load increases the number of sessions are increasing beyond 108000 and the free RAM is getting reduced further
RESOURCE_NAME CURRENT_UTILIZATION MAX_UTILIZATION INITIAL_AL LIMIT_VALU
------------------------------ ------------------- --------------- ---------- ----------
processes 10852 10871 20000 20000
sessions 10865 12454 30048 30048

4) But when there are no workload sessions are not aging out and the free memory is not increasing, the memory is not getting freed up.

5) Is this behavior is The Design ? then each session is nearly consuming 8MB of RAM outside of SGA+PGA, is this OK ?

6) If it is ok, then I have only one option instead of sting high values in the connection pool have to reduce to some lower and optimal value.

Thanks and Regards,
Sandeep

and Connor said...

You *really* want to have a good look at the following videos:

https://www.youtube.com/watch?v=Oo-tBpVewP4

https://www.youtube.com/watch?v=XzN8Rp6glEo

You'll be amazed as how LITTLE the number of connections you should be using.

You'll get

- better response time
- less CPU
- less memory
- more work done


Rating

  (3 ratings)

Is this answer out of date? If it is, please let us know via a Comment

Comments

A reader, October 10, 2015 - 4:20 am UTC

Hi Tom,

Many Thanks, leading me into the videos.
I also have tested, with MIN=300 INITIAL=300 MAX=900
and I am getting better throughput and higher TPS, with less RAM utilization.

I have to correct myself, about my understanding of 'free' command as well.
Just mentioning it here, so that other readers will be benefited.

Actual free RAM is 30GB and not 15GB

total used free shared buffers cached
Mem: 125 110 15 0 0 14
-/+ buffers/cache: 95 30
Swap: 25 0 25
Actual used RAM= 110 - (cached 0 + buffers 14) ~ apporx 95gb
Actual free RAM= 125 - 95 = 30 GB

So the second line in the "free" command give actual values of used and free RAM
-/+ buffers/cache: 95 30
and not the first line.

Thanks and Regards,
Sandeep
Connor McDonald
October 10, 2015 - 6:26 am UTC

Thanks for the feedback.


Large Dynamic Connection Pools

Suraj, October 10, 2015 - 7:43 am UTC

Hi Tom,

I want to learn about connection pool
particularly Large Dynamic Connection Pools
the videos are very good,
Can you please oracle documentation or good refrence
regarding the topic

Thanks,
Suraj
Connor McDonald
October 10, 2015 - 10:15 am UTC

Google for "docs.oracle.com connection pool" because there are a LOT of different connection pool technologies, each relevant to particular middle tier etc.

Work from there.

Alex, June 07, 2017 - 7:13 pm UTC

What do you guys think about the connection rate limiter option on the listener as a mitigation to this problem?

http://www.oracle.com/technetwork/database/enterprise-edition/oraclenetservices-connectionratelim-133050.pdf

One of our DBAs found this. I was amazed after reading about this common problem I'd never once seen this feature referenced.
Connor McDonald
June 08, 2017 - 1:42 am UTC

I dont think connection *rate* was the issue for this poster.

Once I got to the sentence

"As the load increases the number of sessions are increasing beyond 108000 ..."

I nearly fell off my chair :-)

But yes, logon storms are a valid concern as well.