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: How should I do the load testing?

Re: How should I do the load testing?

From: <emdproduction_at_hotmail.com>
Date: 25 Aug 2006 07:02:01 -0700
Message-ID: <1156514521.001222.12680@m79g2000cwm.googlegroups.com>


Brian Peasland wrote:
> emdproduction_at_hotmail.com wrote:
> > Brian Peasland wrote:
> >> emdproduction_at_hotmail.com wrote:
> >>> Group,
> >>>
> >>> We are using a new database link to a remote database. Most of the job
> >>> will be select data from this remote database.
> >>>
> >>> I need to run some load testing, simulating about 80 people to select
> >>> against this remote database at the same time, what is the best way to
> >>> do it? Open up 80 sqlplus sessions to run an dead loop pl/sql?
> >>>
> >>> Any better way of doing it? Or is there any software/script to do
> >>> this?
> >>>
> >>> Thanks for your help
> >>>
> >> Use SQL Trace to capture your application's SQL statements into a trace
> >> file. You might want to use the 10046 trace with level 4 in order to
> >> capture bind variable values as well. You can start a level 4 10046
> >> trace with the following:
> >>
> >> alter session set events '10046 trace name context forever, level 4';
> >>
> >> Once you have your SQL statements captured in the dump file, you can
> >> mimic the application usage. Put all of these SQL statements in a
> >> script. Then you can run a shell script that does something similar to
> >> the following:
> >>
> >> conn="scott/tiger"
> >> participants=100
> >> while [ "$participants" -gt 0 ]
> >> do
> >> sqlplus $conn @$scriptname &
> >> participants=`expr $participants - 1`
> >> done
> >>
> >>
> >> The script above will run your SQL script for 100 participants, all in
> >> the background. That way, you can run them simultaneously. The variable
> >> "conn" contains the username/password.
> >>
> >> HTH,
> >> Brian
> >>
> >>
> >> --
> >
> > Brian,
> >
> > Thanks for your help.
> >
> > I just did what you suggested. But it is not simutaneously, it is
> > sequencial. It will connect, disconnect, and then 2nd connect,
> > disconnect.
> >
> > Joe
> >

>

> Notice that my line which spawns the sqlplus executable is as follows:
>

> sqlplus $conn @$scriptname &
>

> Did you include the '&' at the end? This cases the process to be started
> in the background. At that point, your shell script goes to the next
> line of execution. It does not wait for the background process to finish.
>

> HTH,
> Brian
>
>

> --
> ===================================================================
>

> Brian Peasland
> dba_at_nospam.peasland.net
> http://www.peasland.net
>

> Remove the "nospam." from the email address to email me.
>
>

> "I can give it to you cheap, quick, and good.
> Now pick two out of the three" - Unknown

Works like a charm, thanks very much.

Joe Received on Fri Aug 25 2006 - 09:02:01 CDT

Original text of this message

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