Loop Count vs Number of Threads

Previous Topic Next Topic
 
classic Classic list List threaded Threaded
37 messages Options
12
Reply | Threaded
Open this post in threaded view
|

Loop Count vs Number of Threads

cal0y
Good day,

I have 10 accounts to use in load testing our application. I just want to know if my Jmeter test will behave in the same manner if:

1. If i put 100 in the number of threads and a loop count of 1
2. If i put 10 in the number of threads and loop count of 10

Thanks!
Reply | Threaded
Open this post in threaded view
|

Re: Loop Count vs Number of Threads

Felix Frank-2
On 11/19/2010 11:49 AM, cal0y wrote:
>
> Good day,
>
> I have 10 accounts to use in load testing our application. I just want to
> know if my Jmeter test will behave in the same manner if:
>
> 1. If i put 100 in the number of threads and a loop count of 1
> 2. If i put 10 in the number of threads and loop count of 10

Assuming you use a UserDefinedVariables element with the 10 accounts
each as a variable value, the two approaches you outline should indeed
reuse the accounts and behave functionally equivalently.

However, when using 100 threads, each accout will be active in 10
simultaneous incarnations, whereas when looping, each does 10
consecutive runs (is this understandable?)

Cheers,
Felix

---------------------------------------------------------------------
To unsubscribe, e-mail: [hidden email]
For additional commands, e-mail: [hidden email]

Reply | Threaded
Open this post in threaded view
|

Re: Loop Count vs Number of Threads

chaitanya bhatt
In reply to this post by cal0y
If you are creating 100 threads with zero latency in the ramp up you will
have more than 20-30 http connection threads created in the server, plus the
concurrency would be very high causing your Database and Application
resources to be locked and/or access to be queued.

Whereas 10 threads with 10 iterations each would have lesser number of
connections or threads on the web/app/db server because of lesser
concurrency and the chances of resource contention (i,e locks) would be
less.

There is huge difference between these two types of tests. Your should
consult your client and find out what type of test they want before your
proceed.

-Chaitanya M Bhatt
http://www.performancecompetence.com
On Fri, Nov 19, 2010 at 4:19 PM, cal0y <[hidden email]>wrote:

>
> Good day,
>
> I have 10 accounts to use in load testing our application. I just want to
> know if my Jmeter test will behave in the same manner if:
>
> 1. If i put 100 in the number of threads and a loop count of 1
> 2. If i put 10 in the number of threads and loop count of 10
>
> Thanks!
>
> --
> View this message in context:
> http://jmeter.512774.n5.nabble.com/Loop-Count-vs-Number-of-Threads-tp3272154p3272154.html
> Sent from the JMeter - User mailing list archive at Nabble.com.
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: [hidden email]
> For additional commands, e-mail: [hidden email]
>
>
Reply | Threaded
Open this post in threaded view
|

Re: Loop Count vs Number of Threads

cal0y
If they have the same ramp up time of 100 seconds, will they behave the same?
Reply | Threaded
Open this post in threaded view
|

Re: Loop Count vs Number of Threads

Felix Frank-2
On 11/19/2010 12:38 PM, cal0y wrote:
>
> If they have the same ramp up time of 100 seconds, will they behave the same?

No. Why would they?

100 threads w. Rampup 100secs: 1 Thread launched per second
10 threads w. Rampup 100secs: 1 Thread launched each 10 seconds

---------------------------------------------------------------------
To unsubscribe, e-mail: [hidden email]
For additional commands, e-mail: [hidden email]

Reply | Threaded
Open this post in threaded view
|

Re: Loop Count vs Number of Threads

cal0y
Sorry, My Mistake. What i meant was:

1. 10 threads, 100secs ramp up, loop count of 10
2. 100 threads, 1000secs ramp up

Thanks.
Reply | Threaded
Open this post in threaded view
|

Re: Loop Count vs Number of Threads

Felix Frank-2
On 11/19/2010 12:53 PM, cal0y wrote:
>
> Sorry, My Mistake. What i meant was:
>
> 1. 10 threads, 100secs ramp up, loop count of 10
> 2. 100 threads, 1000secs ramp up
>
> Thanks.

That's different as well:

(1) after 100 seconds, you have 10 simultaneous threads and that's it
(2) after 100 seconds, you have 10 threads as well, but the load keeps
rising, and after 1000 seconds, you have the full crushing load of 100
threads.

What is the problem you are trying to solve, anyway? Maybe we could give
better advice when knowing some context.

---------------------------------------------------------------------
To unsubscribe, e-mail: [hidden email]
For additional commands, e-mail: [hidden email]

Reply | Threaded
Open this post in threaded view
|

Re: Loop Count vs Number of Threads

cal0y
The first scenario has a loop count of 10, wouldn't that also load 100 threads to the server?

Anyway, my real problem is this:

I use a csv file for the test plan with a format like this:
   usernameA,PasswordA,DataA
   usernameB,PasswordB,DataB
   usernameC,PasswordB,DataC
   .
   .
   usernameJ,PasswordJ,DataC

When i use the 1st scenario where i loop the test plan, there are instances where a thread used usernameA, PasswordA, but used DataC. I don't seem to have this problem when i just increase the number of threads and increase the ramp up time.

Is there something wrong about the way i used the csv file?

Thanks
Reply | Threaded
Open this post in threaded view
|

Re: Loop Count vs Number of Threads

shettyd
> The first scenario has a loop count of 10, wouldn't that also load 100
No . The number of threads in the threadgroup is the maximum number of
connections the server will see at any point. The loop simply iterates but
at any given time not more than 10 requests will be made in parallel.


>there are instances where a thread used usernameA, PasswordA, but used
DataC
Can you print out using a debug sampler + view results tree? Im assuming you
are using a CSV data set config

regards
deepak

On Fri, Nov 19, 2010 at 4:40 AM, cal0y <[hidden email]>wrote:

>
> The first scenario has a loop count of 10, wouldn't that also load 100
> threads to the server?
>
> Anyway, my real problem is this:
>
> I use a csv file for the test plan with a format like this:
>   usernameA,PasswordA,DataA
>   usernameB,PasswordB,DataB
>   usernameC,PasswordB,DataC
>   .
>   .
>   usernameJ,PasswordJ,DataC
>
> When i use the 1st scenario where i loop the test plan, there are instances
> where a thread used usernameA, PasswordA, but used DataC. I don't seem to
> have this problem when i just increase the number of threads and increase
> the ramp up time.
>
> Is there something wrong about the way i used the csv file?
>
> Thanks
> --
> View this message in context:
> http://jmeter.512774.n5.nabble.com/Loop-Count-vs-Number-of-Threads-tp3272154p3272238.html
> Sent from the JMeter - User mailing list archive at Nabble.com.
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: [hidden email]
> For additional commands, e-mail: [hidden email]
>
>
Reply | Threaded
Open this post in threaded view
|

Re: Loop Count vs Number of Threads

guru
I have question regarding loop.. and wondering if anyone could help me out.

Thread group: 250
ramp up: 450
loop: 1

I get no error.

Thread group: 250
ramp up:450
loop:2

I get error

Thread group: 250
ramp up: 450
loop:3

I get error


Thread group: 10
ramp up: 1
loop: 1

No error

Thread group: 10
ramp up: 1
loop: 5

I get error


I am testing SSO login, and our application do not allow user to login in twice. user has to logout.

In my test i have a request for login and logout..

I am reading 250 different users from a file.

But when I have loop, these users are repeated.

My question is when I have loop count = 2 or 3. Do all the loop get started same time or does 2nd loop starts only after the first loop has completed.

I have a feeling this error has to do with loop since i am not getting error in loop count 1. But I do not understand why it is giving me error when loop count is 2 or more. When I have logout request and as well as clear cookies each iteration.

Reply | Threaded
Open this post in threaded view
|

Re: Loop Count vs Number of Threads

guru
My second thought is, if loop is not the issue, is jmeter cookie killer not
clearing my cookies session each iteration??


On Tue, Aug 13, 2013 at 4:03 PM, guru <[hidden email]> wrote:

> I have question regarding loop.. and wondering if anyone could help me out.
>
> Thread group: 250
> ramp up: 450
> loop: 1
>
> I get no error.
>
> Thread group: 250
> ramp up:450
> loop:2
>
> I get error
>
> Thread group: 250
> ramp up: 450
> loop:3
>
> I get error
>
>
> Thread group: 10
> ramp up: 1
> loop: 1
>
> No error
>
> Thread group: 10
> ramp up: 1
> loop: 5
>
> I get error
>
>
> I am testing SSO login, and our application do not allow user to login in
> twice. user has to logout.
>
> In my test i have a request for login and logout..
>
> I am reading 250 different users from a file.
>
> But when I have loop, these users are repeated.
>
> My question is when I have loop count = 2 or 3. Do all the loop get started
> same time or does 2nd loop starts only after the first loop has completed.
>
> I have a feeling this error has to do with loop since i am not getting
> error
> in loop count 1. But I do not understand why it is giving me error when
> loop
> count is 2 or more. When I have logout request and as well as clear cookies
> each iteration.
>
>
>
>
>
> --
> View this message in context:
> http://jmeter.512774.n5.nabble.com/Loop-Count-vs-Number-of-Threads-tp3272154p5717838.html
> Sent from the JMeter - User mailing list archive at Nabble.com.
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: [hidden email]
> For additional commands, e-mail: [hidden email]
>
>
Reply | Threaded
Open this post in threaded view
|

Re: Loop Count vs Number of Threads

Manish Sapariya-2
Does following configuration work?

Thread group: 1
ramp up: 1
loop: 2

Thanks and Regards,
Manish
kPoint wins *Global eLearning
Award<http://www.kpoint.com/kpoint-wins-learntech-global-e-learning-award/>
* in “Learning Technologies Solution”!


On Wed, Aug 14, 2013 at 4:41 AM, umesh prajapati <[hidden email]>wrote:

> My second thought is, if loop is not the issue, is jmeter cookie killer not
> clearing my cookies session each iteration??
>
>
> On Tue, Aug 13, 2013 at 4:03 PM, guru <[hidden email]> wrote:
>
> > I have question regarding loop.. and wondering if anyone could help me
> out.
> >
> > Thread group: 250
> > ramp up: 450
> > loop: 1
> >
> > I get no error.
> >
> > Thread group: 250
> > ramp up:450
> > loop:2
> >
> > I get error
> >
> > Thread group: 250
> > ramp up: 450
> > loop:3
> >
> > I get error
> >
> >
> > Thread group: 10
> > ramp up: 1
> > loop: 1
> >
> > No error
> >
> > Thread group: 10
> > ramp up: 1
> > loop: 5
> >
> > I get error
> >
> >
> > I am testing SSO login, and our application do not allow user to login in
> > twice. user has to logout.
> >
> > In my test i have a request for login and logout..
> >
> > I am reading 250 different users from a file.
> >
> > But when I have loop, these users are repeated.
> >
> > My question is when I have loop count = 2 or 3. Do all the loop get
> started
> > same time or does 2nd loop starts only after the first loop has
> completed.
> >
> > I have a feeling this error has to do with loop since i am not getting
> > error
> > in loop count 1. But I do not understand why it is giving me error when
> > loop
> > count is 2 or more. When I have logout request and as well as clear
> cookies
> > each iteration.
> >
> >
> >
> >
> >
> > --
> > View this message in context:
> >
> http://jmeter.512774.n5.nabble.com/Loop-Count-vs-Number-of-Threads-tp3272154p5717838.html
> > Sent from the JMeter - User mailing list archive at Nabble.com.
> >
> > ---------------------------------------------------------------------
> > To unsubscribe, e-mail: [hidden email]
> > For additional commands, e-mail: [hidden email]
> >
> >
>
Reply | Threaded
Open this post in threaded view
|

Re: Loop Count vs Number of Threads

Flavio Cysne
Just test it here with JMeter 2.9.

Threads Group (threads: 5, rampup: 0, loop: 3)
    - Debug sampler
        - Gaussian Random Timer (deviation: 400, offset: 600)

Thread Group 1-1 started after Thread Group 1-5 second execution

Loop count is for each thread not for all threads together.

In your case, if you want to all threads start together for each loop
you'll have to use a different approach:

Synchronizing Timer using all threads
and to simulate rampup you can use a Constant Timer with this expression:
${__javaScript(${__threadNum()}*300)}
where 300 is the time gap between two threads to start.
with this the first thread will start at 300ms from test start, second at
600ms, third at 900ms, and so on

If you need to use distributed testing with this approach you'll have to
define a system property for every server (or using a property defined in
command line) with distinct values.
For example, if you have 5 machines, the first machine you'll define a
system property called custom.machine.index=1, second machine will have a
value of 2, and so on.
Constant timer expression will change slightly:
${__javaScript(${__threadNum()}*${__P(custom.machine.index,1)}*300)}

Hope it helps you.



2013/8/14 Manish Sapariya <[hidden email]>

> Does following configuration work?
>
> Thread group: 1
> ramp up: 1
> loop: 2
>
> Thanks and Regards,
> Manish
> kPoint wins *Global eLearning
> Award<http://www.kpoint.com/kpoint-wins-learntech-global-e-learning-award/
> >
> * in “Learning Technologies Solution”!
>
>
> On Wed, Aug 14, 2013 at 4:41 AM, umesh prajapati <[hidden email]
> >wrote:
>
> > My second thought is, if loop is not the issue, is jmeter cookie killer
> not
> > clearing my cookies session each iteration??
> >
> >
> > On Tue, Aug 13, 2013 at 4:03 PM, guru <[hidden email]> wrote:
> >
> > > I have question regarding loop.. and wondering if anyone could help me
> > out.
> > >
> > > Thread group: 250
> > > ramp up: 450
> > > loop: 1
> > >
> > > I get no error.
> > >
> > > Thread group: 250
> > > ramp up:450
> > > loop:2
> > >
> > > I get error
> > >
> > > Thread group: 250
> > > ramp up: 450
> > > loop:3
> > >
> > > I get error
> > >
> > >
> > > Thread group: 10
> > > ramp up: 1
> > > loop: 1
> > >
> > > No error
> > >
> > > Thread group: 10
> > > ramp up: 1
> > > loop: 5
> > >
> > > I get error
> > >
> > >
> > > I am testing SSO login, and our application do not allow user to login
> in
> > > twice. user has to logout.
> > >
> > > In my test i have a request for login and logout..
> > >
> > > I am reading 250 different users from a file.
> > >
> > > But when I have loop, these users are repeated.
> > >
> > > My question is when I have loop count = 2 or 3. Do all the loop get
> > started
> > > same time or does 2nd loop starts only after the first loop has
> > completed.
> > >
> > > I have a feeling this error has to do with loop since i am not getting
> > > error
> > > in loop count 1. But I do not understand why it is giving me error when
> > > loop
> > > count is 2 or more. When I have logout request and as well as clear
> > cookies
> > > each iteration.
> > >
> > >
> > >
> > >
> > >
> > > --
> > > View this message in context:
> > >
> >
> http://jmeter.512774.n5.nabble.com/Loop-Count-vs-Number-of-Threads-tp3272154p5717838.html
> > > Sent from the JMeter - User mailing list archive at Nabble.com.
> > >
> > > ---------------------------------------------------------------------
> > > To unsubscribe, e-mail: [hidden email]
> > > For additional commands, e-mail: [hidden email]
> > >
> > >
> >
>
Reply | Threaded
Open this post in threaded view
|

Re: Loop Count vs Number of Threads

guru
when I meant by error, i have assertion on my jmeter test plan. Since it
didnt meet assertion it failed.

@Manish yes that configuration worked when i tried it .

But lets say when i have 250 students and I would like 2000 students to
login in 1 hr. So, basically in 1 minute 33 users login.

Thread group :250
ramp up: 450
loop: 1

If i run the test in this configureation, all the assertion that i have
pass and it shows no error. But If i would like to run this test longer
and I increase the number of loops.


Thread Group: 250
ramp up: 450
loop:3

Now, the assertions that i have do not pass and it shows errror.

I know in my application, one user is not allowed to login multiple times
until the session thats logged in is logged out.

so, I am wondering, when I have loop 3. Does all the loop starts at once?
if so than that is causing my assertion to fail and giving error.

@Flavio I dont need to start all my thread at once, But I would like to
test the real scenario, where 2000 users login in 2 hrs. So, basically 1
min 33 users.


On Wed, Aug 14, 2013 at 5:25 AM, Flavio Cysne <[hidden email]> wrote:

> Just test it here with JMeter 2.9.
>
> Threads Group (threads: 5, rampup: 0, loop: 3)
>     - Debug sampler
>         - Gaussian Random Timer (deviation: 400, offset: 600)
>
> Thread Group 1-1 started after Thread Group 1-5 second execution
>
> Loop count is for each thread not for all threads together.
>
> In your case, if you want to all threads start together for each loop
> you'll have to use a different approach:
>
> Synchronizing Timer using all threads
> and to simulate rampup you can use a Constant Timer with this expression:
> ${__javaScript(${__threadNum()}*300)}
> where 300 is the time gap between two threads to start.
> with this the first thread will start at 300ms from test start, second at
> 600ms, third at 900ms, and so on
>
> If you need to use distributed testing with this approach you'll have to
> define a system property for every server (or using a property defined in
> command line) with distinct values.
> For example, if you have 5 machines, the first machine you'll define a
> system property called custom.machine.index=1, second machine will have a
> value of 2, and so on.
> Constant timer expression will change slightly:
> ${__javaScript(${__threadNum()}*${__P(custom.machine.index,1)}*300)}
>
> Hope it helps you.
>
>
>
> 2013/8/14 Manish Sapariya <[hidden email]>
>
> > Does following configuration work?
> >
> > Thread group: 1
> > ramp up: 1
> > loop: 2
> >
> > Thanks and Regards,
> > Manish
> > kPoint wins *Global eLearning
> > Award<
> http://www.kpoint.com/kpoint-wins-learntech-global-e-learning-award/
> > >
> > * in “Learning Technologies Solution”!
> >
> >
> > On Wed, Aug 14, 2013 at 4:41 AM, umesh prajapati <[hidden email]
> > >wrote:
> >
> > > My second thought is, if loop is not the issue, is jmeter cookie killer
> > not
> > > clearing my cookies session each iteration??
> > >
> > >
> > > On Tue, Aug 13, 2013 at 4:03 PM, guru <[hidden email]> wrote:
> > >
> > > > I have question regarding loop.. and wondering if anyone could help
> me
> > > out.
> > > >
> > > > Thread group: 250
> > > > ramp up: 450
> > > > loop: 1
> > > >
> > > > I get no error.
> > > >
> > > > Thread group: 250
> > > > ramp up:450
> > > > loop:2
> > > >
> > > > I get error
> > > >
> > > > Thread group: 250
> > > > ramp up: 450
> > > > loop:3
> > > >
> > > > I get error
> > > >
> > > >
> > > > Thread group: 10
> > > > ramp up: 1
> > > > loop: 1
> > > >
> > > > No error
> > > >
> > > > Thread group: 10
> > > > ramp up: 1
> > > > loop: 5
> > > >
> > > > I get error
> > > >
> > > >
> > > > I am testing SSO login, and our application do not allow user to
> login
> > in
> > > > twice. user has to logout.
> > > >
> > > > In my test i have a request for login and logout..
> > > >
> > > > I am reading 250 different users from a file.
> > > >
> > > > But when I have loop, these users are repeated.
> > > >
> > > > My question is when I have loop count = 2 or 3. Do all the loop get
> > > started
> > > > same time or does 2nd loop starts only after the first loop has
> > > completed.
> > > >
> > > > I have a feeling this error has to do with loop since i am not
> getting
> > > > error
> > > > in loop count 1. But I do not understand why it is giving me error
> when
> > > > loop
> > > > count is 2 or more. When I have logout request and as well as clear
> > > cookies
> > > > each iteration.
> > > >
> > > >
> > > >
> > > >
> > > >
> > > > --
> > > > View this message in context:
> > > >
> > >
> >
> http://jmeter.512774.n5.nabble.com/Loop-Count-vs-Number-of-Threads-tp3272154p5717838.html
> > > > Sent from the JMeter - User mailing list archive at Nabble.com.
> > > >
> > > > ---------------------------------------------------------------------
> > > > To unsubscribe, e-mail: [hidden email]
> > > > For additional commands, e-mail: [hidden email]
> > > >
> > > >
> > >
> >
>
Reply | Threaded
Open this post in threaded view
|

Re: Loop Count vs Number of Threads

Flavio Cysne
I think you misunderstood me.

"I know in my application, one user is not allowed to login multiple
times until
the session thats logged in is logged out."

Loop 2 threads can't start until all Loop 1 threads are over. Synchronizing
Timer with "Number of simulated users" equal to the number of threads will
ensure this.

"@Flavio I dont need to start all my thread at once,..."

That's why I suggest you to use a Constant timer with an expression.

"...But I would like to test the real scenario, where 2000 users login in 2
hrs. So, basically 1 min 33 users."

Modify that 300 in Constant Timer expression for the value equivalent to
time gap for 33 users within 1 minute. (60000ms / 33 users = ~1818ms/user)

Regards
Reply | Threaded
Open this post in threaded view
|

Re: Loop Count vs Number of Threads

guru
@ flavio Thanks ...will try it out and let you know the result.


On Wed, Aug 14, 2013 at 8:35 AM, Flavio Cysne <[hidden email]> wrote:

> I think you misunderstood me.
>
> "I know in my application, one user is not allowed to login multiple
> times until
> the session thats logged in is logged out."
>
> Loop 2 threads can't start until all Loop 1 threads are over. Synchronizing
> Timer with "Number of simulated users" equal to the number of threads will
> ensure this.
>
> "@Flavio I dont need to start all my thread at once,..."
>
> That's why I suggest you to use a Constant timer with an expression.
>
> "...But I would like to test the real scenario, where 2000 users login in 2
> hrs. So, basically 1 min 33 users."
>
> Modify that 300 in Constant Timer expression for the value equivalent to
> time gap for 33 users within 1 minute. (60000ms / 33 users = ~1818ms/user)
>
> Regards
>
Reply | Threaded
Open this post in threaded view
|

Re: Loop Count vs Number of Threads

guru
one quick question do i add the timer on thread group or the http reques
sampler


On Wed, Aug 14, 2013 at 9:25 AM, umesh prajapati <[hidden email]>wrote:

> @ flavio Thanks ...will try it out and let you know the result.
>
>
> On Wed, Aug 14, 2013 at 8:35 AM, Flavio Cysne <[hidden email]>wrote:
>
>> I think you misunderstood me.
>>
>> "I know in my application, one user is not allowed to login multiple
>> times until
>> the session thats logged in is logged out."
>>
>> Loop 2 threads can't start until all Loop 1 threads are over.
>> Synchronizing
>> Timer with "Number of simulated users" equal to the number of threads will
>> ensure this.
>>
>> "@Flavio I dont need to start all my thread at once,..."
>>
>> That's why I suggest you to use a Constant timer with an expression.
>>
>> "...But I would like to test the real scenario, where 2000 users login in
>> 2
>> hrs. So, basically 1 min 33 users."
>>
>> Modify that 300 in Constant Timer expression for the value equivalent to
>> time gap for 33 users within 1 minute. (60000ms / 33 users = ~1818ms/user)
>>
>> Regards
>>
>
>
Reply | Threaded
Open this post in threaded view
|

Re: Loop Count vs Number of Threads

Flavio Cysne
only in the first http sampler


2013/8/14 umesh prajapati <[hidden email]>

> one quick question do i add the timer on thread group or the http reques
> sampler
>
>
> On Wed, Aug 14, 2013 at 9:25 AM, umesh prajapati <[hidden email]
> >wrote:
>
> > @ flavio Thanks ...will try it out and let you know the result.
> >
> >
> > On Wed, Aug 14, 2013 at 8:35 AM, Flavio Cysne <[hidden email]
> >wrote:
> >
> >> I think you misunderstood me.
> >>
> >> "I know in my application, one user is not allowed to login multiple
> >> times until
> >> the session thats logged in is logged out."
> >>
> >> Loop 2 threads can't start until all Loop 1 threads are over.
> >> Synchronizing
> >> Timer with "Number of simulated users" equal to the number of threads
> will
> >> ensure this.
> >>
> >> "@Flavio I dont need to start all my thread at once,..."
> >>
> >> That's why I suggest you to use a Constant timer with an expression.
> >>
> >> "...But I would like to test the real scenario, where 2000 users login
> in
> >> 2
> >> hrs. So, basically 1 min 33 users."
> >>
> >> Modify that 300 in Constant Timer expression for the value equivalent to
> >> time gap for 33 users within 1 minute. (60000ms / 33 users =
> ~1818ms/user)
> >>
> >> Regards
> >>
> >
> >
>
Reply | Threaded
Open this post in threaded view
|

Re: Loop Count vs Number of Threads

guru
If I put the timer, than it means 2nd request has to wait until the first
request is complete. This means if first request is taking time to process
the request than 2nd request will not start until the first request is
completed.  Which means there won't be a load but I am doing a load test.
On Aug 14, 2013 12:50 PM, "Flavio Cysne" <[hidden email]> wrote:

> only in the first http sampler
>
>
> 2013/8/14 umesh prajapati <[hidden email]>
>
> > one quick question do i add the timer on thread group or the http reques
> > sampler
> >
> >
> > On Wed, Aug 14, 2013 at 9:25 AM, umesh prajapati <[hidden email]
> > >wrote:
> >
> > > @ flavio Thanks ...will try it out and let you know the result.
> > >
> > >
> > > On Wed, Aug 14, 2013 at 8:35 AM, Flavio Cysne <[hidden email]
> > >wrote:
> > >
> > >> I think you misunderstood me.
> > >>
> > >> "I know in my application, one user is not allowed to login multiple
> > >> times until
> > >> the session thats logged in is logged out."
> > >>
> > >> Loop 2 threads can't start until all Loop 1 threads are over.
> > >> Synchronizing
> > >> Timer with "Number of simulated users" equal to the number of threads
> > will
> > >> ensure this.
> > >>
> > >> "@Flavio I dont need to start all my thread at once,..."
> > >>
> > >> That's why I suggest you to use a Constant timer with an expression.
> > >>
> > >> "...But I would like to test the real scenario, where 2000 users login
> > in
> > >> 2
> > >> hrs. So, basically 1 min 33 users."
> > >>
> > >> Modify that 300 in Constant Timer expression for the value equivalent
> to
> > >> time gap for 33 users within 1 minute. (60000ms / 33 users =
> > ~1818ms/user)
> > >>
> > >> Regards
> > >>
> > >
> > >
> >
>
Reply | Threaded
Open this post in threaded view
|

Re: Loop Count vs Number of Threads

Flavio Cysne
No. The Constant Timer is the delay between the start of one thread to the
start of the next thread. No relation among threads execution time at all.
So if thread 1 starts and take 1 second to complete, and Constant Timer has
300ms delay, then the second thread will start before 1st thread ends.

Ramp-up also put this delay in your threads, the same way constant timer
will do. If you want to leverage concurrency remove the timer.


2013/8/15 umesh prajapati <[hidden email]>

> If I put the timer, than it means 2nd request has to wait until the first
> request is complete. This means if first request is taking time to process
> the request than 2nd request will not start until the first request is
> completed.  Which means there won't be a load but I am doing a load test.
> On Aug 14, 2013 12:50 PM, "Flavio Cysne" <[hidden email]> wrote:
>
> > only in the first http sampler
> >
> >
> > 2013/8/14 umesh prajapati <[hidden email]>
> >
> > > one quick question do i add the timer on thread group or the http
> reques
> > > sampler
> > >
> > >
> > > On Wed, Aug 14, 2013 at 9:25 AM, umesh prajapati <[hidden email]
> > > >wrote:
> > >
> > > > @ flavio Thanks ...will try it out and let you know the result.
> > > >
> > > >
> > > > On Wed, Aug 14, 2013 at 8:35 AM, Flavio Cysne <[hidden email]
> > > >wrote:
> > > >
> > > >> I think you misunderstood me.
> > > >>
> > > >> "I know in my application, one user is not allowed to login multiple
> > > >> times until
> > > >> the session thats logged in is logged out."
> > > >>
> > > >> Loop 2 threads can't start until all Loop 1 threads are over.
> > > >> Synchronizing
> > > >> Timer with "Number of simulated users" equal to the number of
> threads
> > > will
> > > >> ensure this.
> > > >>
> > > >> "@Flavio I dont need to start all my thread at once,..."
> > > >>
> > > >> That's why I suggest you to use a Constant timer with an expression.
> > > >>
> > > >> "...But I would like to test the real scenario, where 2000 users
> login
> > > in
> > > >> 2
> > > >> hrs. So, basically 1 min 33 users."
> > > >>
> > > >> Modify that 300 in Constant Timer expression for the value
> equivalent
> > to
> > > >> time gap for 33 users within 1 minute. (60000ms / 33 users =
> > > ~1818ms/user)
> > > >>
> > > >> Regards
> > > >>
> > > >
> > > >
> > >
> >
>
12