Oracle FAQ Your Portal to the Oracle Knowledge Grid
HOME | ASK QUESTION | ADD INFO | SEARCH | E-MAIL US
 

Home -> Community -> Usenet -> c.d.o.server -> Re: shared server vs. connection pooling - speed, scalability - some questions

Re: shared server vs. connection pooling - speed, scalability - some questions

From: hpuxrac <johnbhurley_at_sbcglobal.net>
Date: 28 Feb 2007 05:36:31 -0800
Message-ID: <1172669791.703896.18380@p10g2000cwp.googlegroups.com>


On Feb 27, 11:06 pm, Jim Hayter <see.reply..._at_nowhere.invalid> wrote:
> MTNorman wrote:

First note is that the comments that MTNorman already provided are exactly on target.

> > If your apps create a new connection for every query - then you
> > already know your biggest performance and scalability issue.
>
> Yes. That's why we went to mod-perl with apache in order to cache
> connections. This allows us to re-use a connection for the lifetime of
> the apache child process - many pages without having to create a connection.
>
> > Shared server works very well for transaction processing type
> > connections. Remember the connection pool is built at the time the
> > session is created. As long as no connection in the pool actively
> > uses the connection for any lengthy duration, every thing works
> > well.
>
> > What you probably discovered in your earlier implementation effort is
> > that shared server does not work at all well if any one connection in
> > the pool is active for any duration of more than 1 second. All the
> > other connections in the pool are effectively shut off from database
> > resources while they wait for the long running transaction to
> > complete. Batch processes (including any reports that run more than
> > 1-2 seconds) should use dedicated connections.
>
> Yes, I found references to this in my reading. I intend to discuss this
> with our dba.

It is very common to have a special config for batch dedicated server sessions. If the batch is running directly on the database server you will want to make sure it is using bequeath type connections. Often this is done by exporting the ORACLE_SID value to specify a connection string ... whether that results in bequeath connections varies somewhat by database release level and operating system.

>
> > You can use the sqlnet.ora file to set the shared or dedicated
> > connection mode, or you can define multiple service names for the
> > database to allow most connections to use shared server and your batch
> > and reporting processes to run on dedicated connections.
>
> > In my experience, a good shared server implementation (where all the
> > long running processes are correctly running on dedicated connections)
> > has better overall performance than a dedicated server setup that is
> > nearly at the hardware and OS limits.

Perhaps you have seen a good shared server implementation. Possible yes ... likely ... maybe not.

>
> > BTW - you don't state how many connections are driving the shared
> > server consideration. Many DBAs do not even consider shared server
> > until at least 1,000 concurrent connections are reached - assuming
> > adequate RAM is available on a dedicated database server. You won't
> > find as many articles on shared server as you could find on the former
> > MTS (multi threaded server). Cheaper RAM, high OS process limits, and
> > application server connection pooling have made this option much less
> > needed than it was when 8i was the latest and greatest.
>
> We've upped the max connections to somewhere around 1500. We only have
> a problem when something causes the database to respond slowly
> (conflicts, bad indices, etc.) As requests to the database back up, the
> web server processes have to wait, which causes more web server
> processes to be spawned to handle page requests, which leads to more
> database requests and eventually, things go to hell :-)

Depending on hardware and memory config 1500 connections is still relatively modest. I personally don't find much here so far to argue for shared server.

"Only have a problem when something causes the database to respond slowly " ...

Is there enough cpu capacity on the machine? Multiple things running simultaneously for a while demands multiple cpu's for efficient process ... that's one thing to check out. How many exactly ... varies by application load ... etc.

Conflicts sounds like locking problems? That's in the application design area and if you are having problems limiting scalability there that can be more of a problem than the type of connection into the database.

>
> Thanks for your comments. They are quite useful to help me understand
> what I'm dealing with.
>
> Jim- Hide quoted text -
>
> - Show quoted text -
Received on Wed Feb 28 2007 - 07:36:31 CST

Original text of this message

HOME | ASK QUESTION | ADD INFO | SEARCH | E-MAIL US