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: Performance problems when using multi-threads in Oracle 9i

Re: Performance problems when using multi-threads in Oracle 9i

From: Loai Garelnabi <gloai_at_hotmail.com>
Date: 16 Apr 2002 03:11:45 -0700
Message-ID: <804a1aa9.0204160211.4b390a77@posting.google.com>


Problem solved......
The problem turned out to be that I'm calling EXEC SQL ENABLE THREADS at the begining of every thread execution. When I changed that to calling it only once at the beginnig of the program, everything worked out fine.
Does anybode know what this statement does exactly ?

gloai_at_hotmail.com (Loai Garelnabi) wrote in message news:<804a1aa9.0204150328.58fb7f03_at_posting.google.com>...
> I have tried to comment the EXEC SQL ENABLE THREADS statement in my
> program. The load on the machines dropped considerably. However, it
> experiences some core dumps in unrelated places during execution.
> However, this was a trial.
> My threads don't have much processing load in them. Each thread calls
> a stored procedure that does a few selects in the database.
> There is someting fishy about EXEC SQL ENABLE THREADS !!!
> Any ideas .... ?
>
>
> >"Chris Bevan" <chris.bevan_at_ieee.org> wrote in message news:<Nlou8.382$Tt6.47359_at_news-binary.blueyonder.co.uk>...
> > The law of diminishing returns applies with threads. Give your program some
> > way of putting an upper bound on the threads you start. Test it with
> > 1,2,4,8... threads and compare your results. Find a way of starting threads
> > once then giving the work to the first idle thread (I used a message queue
> > worked nicely for this). I found that 4-8 threads worked well on 8cpu Sun
> > ES10000 when inserting into Oracle (8.0.5), 9-12 threads had no improvement
> > in throughput, more than this and performance degraded.
> >
> > Hope this helps,
> >
> >
> >
> > "Loai Garelnabi" <gloai_at_hotmail.com> wrote in message
> > news:804a1aa9.0204140441.25f0e01a_at_posting.google.com...
> > > I have a program that creates many threads. Each thread has its own
> > > context. The thread will connect to the database, execute a stored
> > > procedure and then exits.
> > > I have followed exactly what is required by the Oracle Documentation.
> > > I included:
> > > EXEC SQL ENABLE THREADS;
> > > EXEC SQL CONTEXT ALLOCATE :ctx;
> > > EXEC SQL CONTEXT USE :ctx;
> > > EXEC SQL CONTEXT FREE :ctx;
> > >
> > > This process is generating a huge load on the sever machine (100 %)
> > > and the program is very very slow. I'm using a Sun Fire 880, 2 800 MHZ
> > > CPUs and 4GB RAM, running Oracle 9i with RAC !!
> > >
> > > The program would use less load if I comment out the thread related
> > > statements.
> > >
> > > I would appreciate any suggestions on how to solve this probelm.
Received on Tue Apr 16 2002 - 05:11:45 CDT

Original text of this message

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