Re: Questions about 'connect' and performance?

From: Allen Kirby <akirby_at_att.com>
Date: 1997/06/04
Message-ID: <3395B208.380A_at_att.com>#1/1


Marc Baime wrote:
>
> Some of the people on my project are of the opinion that doing a
> connect to the database every time one of our database access modules
> is executed (due to modular design decisions our database access is
> done in a sepearate programe. A few questions:
> 1. Are they correct?
> 2. If there is a performance hit associated with a connect does it
> make a difference
> whether it is in a multi threaded or dedicated server environment?
> 3. If there is a performance hit due to numerous connects can you
> make some architectural suggestion(s) as to how we might get relief
> from this particular type of system stress?
>
> Regards...Marc Baime
> please send responses to marc.baime_at_telops.gte.com
> 813-987-1752

Marc,
They are correct, connecting to oracle generally requires forking a new child process (in a 2 task environment) and setting up communications. Forking and execing your own program first only adds to the overhead. Now it may be ok depending on your application, only load testing will tell. But you can reduce that overhead dramatically by having daemon programs (programs that don't exit) that start once, log into the database, then take requests, process them and give back the results. You can do this with messaging products like Tuxedo and MessageQueue (BEA Systems) or build your own using pipes and/or message queues. It's very effective and the only way to build high volume OLTP applications. Fork and Exec is very expensive in the long run, even though it may seem quick enough now. If you want more details, email me.

-- 
---
Allen Kirby			AT&T ITS Production Services
akirby_at_att.com			Alpharetta, GA.
Received on Wed Jun 04 1997 - 00:00:00 CEST

Original text of this message