You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@jmeter.apache.org by cal0y <ca...@orangeandbronze.com> on 2010/11/19 11:49:32 UTC

Loop Count vs Number of Threads

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: jmeter-user-unsubscribe@jakarta.apache.org
For additional commands, e-mail: jmeter-user-help@jakarta.apache.org


Re: Loop Count vs Number of Threads

Posted by Felix Frank <ff...@mpexnet.de>.
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: jmeter-user-unsubscribe@jakarta.apache.org
For additional commands, e-mail: jmeter-user-help@jakarta.apache.org


Re: Loop Count vs Number of Threads

Posted by guru <pr...@gmail.com>.
Thread Group:5
Ramp up:0
Loop :forever

Schedular: 1hr

Syncrhonizing timer: 5
constant timer:${__javaScript(${__threadNum()}*600)}

With this configuration it is not making 100 calls per minute.

I thought 60,000/100= 600ms (I was assuming it should make 100 calls per
minute) but it is hardly making even 30 calls per minutes. sometime it makes
50, sometimes 10, 30 and so on.





--
View this message in context: http://jmeter.512774.n5.nabble.com/Loop-Count-vs-Number-of-Threads-tp3272154p5718025.html
Sent from the JMeter - User mailing list archive at Nabble.com.

---------------------------------------------------------------------
To unsubscribe, e-mail: user-unsubscribe@jmeter.apache.org
For additional commands, e-mail: user-help@jmeter.apache.org


Re: Loop Count vs Number of Threads

Posted by Flavio Cysne <fl...@gmail.com>.
__threadNum() is a function that return the actual thread number, so, if is
the first thread started by JMeter the value returned will be 1, if second
then 2 and so on.
http://jmeter.apache.org/usermanual/functions.html#__threadNum

If you are using distributed testing the number returned repeats because
the threadNumber function is executed for each server/slave not by the
client/master.
Then, when using distributed testing, the value 1 will be returned for the
very first thread started by each JMeter server/slave, 2 for the second and
so on.


2013/8/19 umesh prajapati <pr...@gmail.com>

> ${__javaScript(${__threadNum()}*1300)} does this means number of threads *
> 1300?
>
>
>
>
> On Mon, Aug 19, 2013 at 2:14 PM, umesh prajapati <praumesh86@gmail.com
> >wrote:
>
> > Using this approach too,
> >
> > it only completes 25 transaction per min when it is suppose to do 33
> > transaction per min.
> >
> > So, I just changed the value in constant timer.
> >
> > From: ${__javaScript(${__threadNum()}*1818)}
> >
> > To: ${__javaScript(${__threadNum()}*1300)}
> >
> >
> > On Mon, Aug 19, 2013 at 1:21 PM, Flavio Cysne <flaviocysne@gmail.com
> >wrote:
> >
> >> >> Its not stopping after 60 seconds. Is it because of loop count
> forever.
> >>
> >> yes, with this new approach you'll need Loop forever no more. Just let
> >> loop
> >> count at 1.
> >> Runtime Controller will "loop" all requests inside it until the
> configured
> >> time has gone.
> >> Note that script execution time could be greater than the configured
> time
> >> because Runtime Controller will start new threads within the time
> >> configured and these started threads will run until the last request.
> >>
> >
> >
>

Re: Loop Count vs Number of Threads

Posted by umesh prajapati <pr...@gmail.com>.
${__javaScript(${__threadNum()}*1300)} does this means number of threads *
1300?




On Mon, Aug 19, 2013 at 2:14 PM, umesh prajapati <pr...@gmail.com>wrote:

> Using this approach too,
>
> it only completes 25 transaction per min when it is suppose to do 33
> transaction per min.
>
> So, I just changed the value in constant timer.
>
> From: ${__javaScript(${__threadNum()}*1818)}
>
> To: ${__javaScript(${__threadNum()}*1300)}
>
>
> On Mon, Aug 19, 2013 at 1:21 PM, Flavio Cysne <fl...@gmail.com>wrote:
>
>> >> Its not stopping after 60 seconds. Is it because of loop count forever.
>>
>> yes, with this new approach you'll need Loop forever no more. Just let
>> loop
>> count at 1.
>> Runtime Controller will "loop" all requests inside it until the configured
>> time has gone.
>> Note that script execution time could be greater than the configured time
>> because Runtime Controller will start new threads within the time
>> configured and these started threads will run until the last request.
>>
>
>

Re: Loop Count vs Number of Threads

Posted by umesh prajapati <pr...@gmail.com>.
Using this approach too,

it only completes 25 transaction per min when it is suppose to do 33
transaction per min.

So, I just changed the value in constant timer.

From: ${__javaScript(${__threadNum()}*1818)}

To: ${__javaScript(${__threadNum()}*1300)}


On Mon, Aug 19, 2013 at 1:21 PM, Flavio Cysne <fl...@gmail.com> wrote:

> >> Its not stopping after 60 seconds. Is it because of loop count forever.
>
> yes, with this new approach you'll need Loop forever no more. Just let loop
> count at 1.
> Runtime Controller will "loop" all requests inside it until the configured
> time has gone.
> Note that script execution time could be greater than the configured time
> because Runtime Controller will start new threads within the time
> configured and these started threads will run until the last request.
>

Re: Loop Count vs Number of Threads

Posted by Flavio Cysne <fl...@gmail.com>.
>> Its not stopping after 60 seconds. Is it because of loop count forever.

yes, with this new approach you'll need Loop forever no more. Just let loop
count at 1.
Runtime Controller will "loop" all requests inside it until the configured
time has gone.
Note that script execution time could be greater than the configured time
because Runtime Controller will start new threads within the time
configured and these started threads will run until the last request.

Re: Loop Count vs Number of Threads

Posted by umesh prajapati <pr...@gmail.com>.
Correct me If i am wrong.

Under thread Group add Runtime controller

Thread group
      # threads: 5
      Ramp up: 0
      loop count: forever


     Runtime controller (seconds): 60
            |
            |-- login
            |       |
            |       |-- synchronizing timer   : 5
            |       |
            |       |-- constant timer :
${__javaScript(${__threadNum()}*1818)}
            |
            |--logout


Its not stopping after 60 seconds. Is it because of loop count forever. ( I
thought it would stop when it reaches transaction around 30-33)


On Mon, Aug 19, 2013 at 11:55 AM, Flavio Cysne <fl...@gmail.com>wrote:

> Use a Runtime Controller wrapping all your resquests, then configure it for
> the elapsing time you desire.
>
>
> 2013/8/19 umesh prajapati <pr...@gmail.com>
>
> > I have my test script as you have mentioned above.
> >
> > But I am wondering if I use schedular instead of loop. It is not working
> as
> > I expected.
> >
> > Requirement as mentioned above. (1hr = 2000 users, so 1 min 33 users)
> >
> > with below configuration:
> > threads:33
> > ramp up:0
> > loop:1
> >
> > synchronizing timer: 33
> > constant timer: ${__javaScript(${__threadNum()}*1818)}
> >
> > It takes around 1 min to complete the test.
> >
> > but when I use shcedular with following configuration
> >
> > threads: 5
> > ramp up:0
> > loop: forever
> >
> > shedular duration: 60 sec. .It doesnt complete the expected transaction.
> It
> > completes around 25. When I ran for 2 hrs, expected was 4000 but only
> > completed 2980.
> >
> > synchronizing timer: 5
> > constant timer: ${__javaScript(${__threadNum()}*1818)}
> >
> >
> > with this configuration
> > threads:33
> > ramp up: 0
> > loop:forever
> >
> > schedular duration:60 sec. it completes around 30-33 transaction. (I
> didnt
> > try for 2 hrs)
> >
> > synchronizing timer: 33
> > constant timer: ${__javaScript(${__threadNum()}*1818)}
> >
> >
> > On Fri, Aug 16, 2013 at 10:30 AM, umesh prajapati <praumesh86@gmail.com
> > >wrote:
> >
> > > I have opened a new thread as both of you have mentioned.
> > >
> > >
> > >
> >
> http://jmeter.512774.n5.nabble.com/java-net-SocketException-Connection-reset-td5717859.html
> > >
> > >
> > > On Fri, Aug 16, 2013 at 10:19 AM, Flavio Cysne <flaviocysne@gmail.com
> > >wrote:
> > >
> > >> As sebb said, start a new thread with more explanations about what
> > >> happened
> > >> and we'll be glad to help you
> > >>
> > >>
> > >> 2013/8/16 umesh prajapati <pr...@gmail.com>
> > >>
> > >> > I know this has to do with different topic but i am wondering if you
> > >> could
> > >> > help me out on this one too if possible.
> > >> >
> > >> > I am getting lots of connection reset error.
> > >> >
> > >> > java.net.SocketException: Connection reset
> > >> >  at java.net.SocketInputStream.read(SocketInputStream.java:168)
> > >> >  at
> > >> >
> > >> >
> > >>
> >
> org.apache.http.impl.io.AbstractSessionInputBuffer.fillBuffer(AbstractSessionInputBuffer.java:166)
> > >> >  at
> > >> >
> > >> >
> > >>
> >
> org.apache.http.impl.io.SocketInputBuffer.fillBuffer(SocketInputBuffer.java:90)
> > >> >  at
> > >> >
> > >> >
> > >>
> >
> org.apache.http.impl.io.AbstractSessionInputBuffer.readLine(AbstractSessionInputBuffer.java:281)
> > >> >  at
> > >> >
> > >> >
> > >>
> >
> org.apache.http.impl.conn.DefaultHttpResponseParser.parseHead(DefaultHttpResponseParser.java:92)
> > >> >  at
> > >> >
> > >> >
> > >>
> >
> org.apache.http.impl.conn.DefaultHttpResponseParser.parseHead(DefaultHttpResponseParser.java:62)
> > >> >  at
> > >> >
> > >> >
> > >>
> >
> org.apache.http.impl.io.AbstractMessageParser.parse(AbstractMessageParser.java:254)
> > >> >  at
> > >> >
> > >> >
> > >>
> >
> org.apache.http.impl.AbstractHttpClientConnection.receiveResponseHeader(AbstractHttpClientConnection.java:289)
> > >> >  at
> > >> >
> > >> >
> > >>
> >
> org.apache.http.impl.conn.DefaultClientConnection.receiveResponseHeader(DefaultClientConnection.java:252)
> > >> >  at
> > >> >
> > >> >
> > >>
> >
> org.apache.http.impl.conn.ManagedClientConnectionImpl.receiveResponseHeader(ManagedClientConnectionImpl.java:191)
> > >> >  at
> > >> >
> > >> >
> > >>
> >
> org.apache.http.protocol.HttpRequestExecutor.doReceiveResponse(HttpRequestExecutor.java:300)
> > >> >  at
> > >> >
> > >> >
> > >>
> >
> org.apache.http.protocol.HttpRequestExecutor.execute(HttpRequestExecutor.java:127)
> > >> >  at
> > >> >
> > >> >
> > >>
> >
> org.apache.http.impl.client.DefaultRequestDirector.tryExecute(DefaultRequestDirector.java:717)
> > >> >  at
> > >> >
> > >> >
> > >>
> >
> org.apache.http.impl.client.DefaultRequestDirector.execute(DefaultRequestDirector.java:522)
> > >> >  at
> > >> >
> > >> >
> > >>
> >
> org.apache.http.impl.client.AbstractHttpClient.execute(AbstractHttpClient.java:906)
> > >> >  at
> > >> >
> > >> >
> > >>
> >
> org.apache.http.impl.client.AbstractHttpClient.execute(AbstractHttpClient.java:805)
> > >> >  at
> > >> >
> > >> >
> > >>
> >
> org.apache.jmeter.protocol.http.sampler.HTTPHC4Impl.sample(HTTPHC4Impl.java:286)
> > >> >  at
> > >> >
> > >> >
> > >>
> >
> org.apache.jmeter.protocol.http.sampler.HTTPSamplerProxy.sample(HTTPSamplerProxy.java:62)
> > >> >  at
> > >> >
> > >> >
> > >>
> >
> org.apache.jmeter.protocol.http.sampler.HTTPSamplerBase.followRedirects(HTTPSamplerBase.java:1410)
> > >> >  at
> > >> >
> > >> >
> > >>
> >
> org.apache.jmeter.protocol.http.sampler.HTTPSamplerBase.resultProcessing(HTTPSamplerBase.java:1481)
> > >> >  at
> > >> >
> > >> >
> > >>
> >
> org.apache.jmeter.protocol.http.sampler.HTTPAbstractImpl.resultProcessing(HTTPAbstractImpl.java:251)
> > >> >  at
> > >> >
> > >> >
> > >>
> >
> org.apache.jmeter.protocol.http.sampler.HTTPHC4Impl.sample(HTTPHC4Impl.java:358)
> > >> >  at
> > >> >
> > >> >
> > >>
> >
> org.apache.jmeter.protocol.http.sampler.HTTPSamplerProxy.sample(HTTPSamplerProxy.java:62)
> > >> >  at
> > >> >
> > >> >
> > >>
> >
> org.apache.jmeter.protocol.http.sampler.HTTPSamplerBase.sample(HTTPSamplerBase.java:1088)
> > >> >  at
> > >> >
> > >> >
> > >>
> >
> org.apache.jmeter.protocol.http.sampler.HTTPSamplerBase.sample(HTTPSamplerBase.java:1077)
> > >> >  at
> > >> >
> > >> >
> > >>
> >
> org.apache.jmeter.threads.JMeterThread.process_sampler(JMeterThread.java:428)
> > >> >  at
> org.apache.jmeter.threads.JMeterThread.run(JMeterThread.java:256)
> > >> >  at java.lang.Thread.run(Thread.java:619)
> > >> >
> > >> >
> > >> > On Fri, Aug 16, 2013 at 8:53 AM, umesh prajapati <
> > praumesh86@gmail.com
> > >> > >wrote:
> > >> >
> > >> > > I would like to thank you very much for your time and help...it
> > worked
> > >> > out
> > >> > > ...:)
> > >> > >
> > >> > >
> > >> > >
> > >> > > On Fri, Aug 16, 2013 at 8:07 AM, Flavio Cysne <
> > flaviocysne@gmail.com
> > >> > >wrote:
> > >> > >
> > >> > >> JMeter Test Plan will look like this:
> > >> > >>
> > >> > >> Test Plan
> > >> > >>     - CSV Data Set Config (Recycle on EOF: True, Stop thread on
> > EOF:
> > >> > >> false,
> > >> > >> Sharing mode: All threads)
> > >> > >>     - Thread Group (threads: 250, rampup: 0, loop: 16)
> > >> > >>         - HTTP Request 1
> > >> > >>             - Synchronizing Timer (threads: 250)
> > >> > >>             - Constant Timer (delay:
> > >> > >> ${__javaScript(${__threadNum()}*1818)}
> > >> > >>  // 60000 / 33 = ~1818
> > >> > >>         - HTTP Request 2
> > >> > >>         ...
> > >> > >>         - HTTP Request n
> > >> > >>
> > >> > >>
> > >> > >>
> > >> > >> 2013/8/16 umesh prajapati <pr...@gmail.com>
> > >> > >>
> > >> > >> > Thank you very much for making me understand what constant
> timer
> > >> is. I
> > >> > >> see
> > >> > >> > you mentioned about synchronizing timer . So you have mentioned
> > >> that
> > >> > >> > synchronizing timer will start all the threads at the same
> time.
> > >> But
> > >> > in
> > >> > >> my
> > >> > >> > case, I would like 33 users to login in 1 minute. And lets say
> i
> > >> have
> > >> > >> 250
> > >> > >> > users in my csv file but I would like to run my test for 2 hrs.
> > >> And to
> > >> > >> > accomplish this I am increasing the number of loops. To
> complete
> > >> one
> > >> > >> loop
> > >> > >> > lets say it takes 8 mins. so I will need around 15-16 loop
> > counts.
> > >> > >> >
> > >> > >> > Number of threads: 250
> > >> > >> > Ramo up: 0
> > >> > >> > Loop: 16
> > >> > >> >
> > >> > >> > Constant timer to be added before http sampler : (60000/33) ms
> > >> > >> >
> > >> > >> > So do I need synchronizing timer. Because if I do add
> > synchronizing
> > >> > >> timer
> > >> > >> > it will start all 250 users at once (just to be clear when you
> > say
> > >> > start
> > >> > >> > all at once) did you mean all 250 user login request will be
> sent
> > >> at
> > >> > >> same
> > >> > >> > time.
> > >> > >> >  On Aug 16, 2013 7:18 AM, "Flavio Cysne" <
> flaviocysne@gmail.com>
> > >> > wrote:
> > >> > >> >
> > >> > >> > > When you use Synchronizing Timer all the threads will start
> at
> > >> the
> > >> > >> same
> > >> > >> > > time, when the number of threads started reaches the
> configured
> > >> > value.
> > >> > >> > > In your test plan Ramp-up will delay the start of the
> threads,
> > >> but
> > >> > >> next
> > >> > >> > > loop execution will break down your test, as you have stated.
> > >> > >> > > Then Constant Timer is used to overcome this issue, delaying
> > the
> > >> > start
> > >> > >> > time
> > >> > >> > > of the threads as ramp-up does, but not messing thing up
> after
> > >> the
> > >> > >> first
> > >> > >> > > loop.
> > >> > >> > > BTW, your script Threads Group Ramp-up have to be 0 (zero).
> > >> > >> > >
> > >> > >> > >
> > >> > >> > > 2013/8/16 umesh prajapati <pr...@gmail.com>
> > >> > >> > >
> > >> > >> > > > Thank you but I am still confused. So you mean constant
> time
> > >> also
> > >> > >> does
> > >> > >> > > the
> > >> > >> > > > same job like ramp-up period. Lets say I have following
> > >> > >> configuration
> > >> > >> > > >
> > >> > >> > > > Number of threads : 250
> > >> > >> > > > Ramp up period : 450
> > >> > >> > > > Loop : 3
> > >> > >> > > >
> > >> > >> > > > From what I have understood about rampup. It takes 450
> > seconds
> > >> to
> > >> > >> > > complete
> > >> > >> > > > 250 threads. So the delay between thread 1 and thread 2 is
> > >> 450/250
> > >> > >> > > seconds.
> > >> > >> > > >
> > >> > >> > > > So if I also add constant timer to this configuration lets
> > say
> > >> > >> > (450/250)
> > >> > >> > > > seconds. I don't get why do we need constant timer when
> ramp
> > >> up is
> > >> > >> > doing
> > >> > >> > > > the same thing.
> > >> > >> > > > On Aug 16, 2013 4:51 AM, "Flavio Cysne" <
> > flaviocysne@gmail.com
> > >> >
> > >> > >> wrote:
> > >> > >> > > >
> > >> > >> > > > > 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 <pr...@gmail.com>
> > >> > >> > > > >
> > >> > >> > > > > > 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" <
> > >> > flaviocysne@gmail.com
> > >> > >> >
> > >> > >> > > > wrote:
> > >> > >> > > > > >
> > >> > >> > > > > > > only in the first http sampler
> > >> > >> > > > > > >
> > >> > >> > > > > > >
> > >> > >> > > > > > > 2013/8/14 umesh prajapati <pr...@gmail.com>
> > >> > >> > > > > > >
> > >> > >> > > > > > > > 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 <
> > >> > >> > > > > praumesh86@gmail.com
> > >> > >> > > > > > > > >wrote:
> > >> > >> > > > > > > >
> > >> > >> > > > > > > > > @ flavio Thanks ...will try it out and let you
> know
> > >> the
> > >> > >> > result.
> > >> > >> > > > > > > > >
> > >> > >> > > > > > > > >
> > >> > >> > > > > > > > > On Wed, Aug 14, 2013 at 8:35 AM, Flavio Cysne <
> > >> > >> > > > > flaviocysne@gmail.com
> > >> > >> > > > > > > > >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
> > >> > >> > > > > > > > >>
> > >> > >> > > > > > > > >
> > >> > >> > > > > > > > >
> > >> > >> > > > > > > >
> > >> > >> > > > > > >
> > >> > >> > > > > >
> > >> > >> > > > >
> > >> > >> > > >
> > >> > >> > >
> > >> > >> >
> > >> > >>
> > >> > >
> > >> > >
> > >> >
> > >>
> > >
> > >
> >
>

Re: Loop Count vs Number of Threads

Posted by Flavio Cysne <fl...@gmail.com>.
Use a Runtime Controller wrapping all your resquests, then configure it for
the elapsing time you desire.


2013/8/19 umesh prajapati <pr...@gmail.com>

> I have my test script as you have mentioned above.
>
> But I am wondering if I use schedular instead of loop. It is not working as
> I expected.
>
> Requirement as mentioned above. (1hr = 2000 users, so 1 min 33 users)
>
> with below configuration:
> threads:33
> ramp up:0
> loop:1
>
> synchronizing timer: 33
> constant timer: ${__javaScript(${__threadNum()}*1818)}
>
> It takes around 1 min to complete the test.
>
> but when I use shcedular with following configuration
>
> threads: 5
> ramp up:0
> loop: forever
>
> shedular duration: 60 sec. .It doesnt complete the expected transaction. It
> completes around 25. When I ran for 2 hrs, expected was 4000 but only
> completed 2980.
>
> synchronizing timer: 5
> constant timer: ${__javaScript(${__threadNum()}*1818)}
>
>
> with this configuration
> threads:33
> ramp up: 0
> loop:forever
>
> schedular duration:60 sec. it completes around 30-33 transaction. (I didnt
> try for 2 hrs)
>
> synchronizing timer: 33
> constant timer: ${__javaScript(${__threadNum()}*1818)}
>
>
> On Fri, Aug 16, 2013 at 10:30 AM, umesh prajapati <praumesh86@gmail.com
> >wrote:
>
> > I have opened a new thread as both of you have mentioned.
> >
> >
> >
> http://jmeter.512774.n5.nabble.com/java-net-SocketException-Connection-reset-td5717859.html
> >
> >
> > On Fri, Aug 16, 2013 at 10:19 AM, Flavio Cysne <flaviocysne@gmail.com
> >wrote:
> >
> >> As sebb said, start a new thread with more explanations about what
> >> happened
> >> and we'll be glad to help you
> >>
> >>
> >> 2013/8/16 umesh prajapati <pr...@gmail.com>
> >>
> >> > I know this has to do with different topic but i am wondering if you
> >> could
> >> > help me out on this one too if possible.
> >> >
> >> > I am getting lots of connection reset error.
> >> >
> >> > java.net.SocketException: Connection reset
> >> >  at java.net.SocketInputStream.read(SocketInputStream.java:168)
> >> >  at
> >> >
> >> >
> >>
> org.apache.http.impl.io.AbstractSessionInputBuffer.fillBuffer(AbstractSessionInputBuffer.java:166)
> >> >  at
> >> >
> >> >
> >>
> org.apache.http.impl.io.SocketInputBuffer.fillBuffer(SocketInputBuffer.java:90)
> >> >  at
> >> >
> >> >
> >>
> org.apache.http.impl.io.AbstractSessionInputBuffer.readLine(AbstractSessionInputBuffer.java:281)
> >> >  at
> >> >
> >> >
> >>
> org.apache.http.impl.conn.DefaultHttpResponseParser.parseHead(DefaultHttpResponseParser.java:92)
> >> >  at
> >> >
> >> >
> >>
> org.apache.http.impl.conn.DefaultHttpResponseParser.parseHead(DefaultHttpResponseParser.java:62)
> >> >  at
> >> >
> >> >
> >>
> org.apache.http.impl.io.AbstractMessageParser.parse(AbstractMessageParser.java:254)
> >> >  at
> >> >
> >> >
> >>
> org.apache.http.impl.AbstractHttpClientConnection.receiveResponseHeader(AbstractHttpClientConnection.java:289)
> >> >  at
> >> >
> >> >
> >>
> org.apache.http.impl.conn.DefaultClientConnection.receiveResponseHeader(DefaultClientConnection.java:252)
> >> >  at
> >> >
> >> >
> >>
> org.apache.http.impl.conn.ManagedClientConnectionImpl.receiveResponseHeader(ManagedClientConnectionImpl.java:191)
> >> >  at
> >> >
> >> >
> >>
> org.apache.http.protocol.HttpRequestExecutor.doReceiveResponse(HttpRequestExecutor.java:300)
> >> >  at
> >> >
> >> >
> >>
> org.apache.http.protocol.HttpRequestExecutor.execute(HttpRequestExecutor.java:127)
> >> >  at
> >> >
> >> >
> >>
> org.apache.http.impl.client.DefaultRequestDirector.tryExecute(DefaultRequestDirector.java:717)
> >> >  at
> >> >
> >> >
> >>
> org.apache.http.impl.client.DefaultRequestDirector.execute(DefaultRequestDirector.java:522)
> >> >  at
> >> >
> >> >
> >>
> org.apache.http.impl.client.AbstractHttpClient.execute(AbstractHttpClient.java:906)
> >> >  at
> >> >
> >> >
> >>
> org.apache.http.impl.client.AbstractHttpClient.execute(AbstractHttpClient.java:805)
> >> >  at
> >> >
> >> >
> >>
> org.apache.jmeter.protocol.http.sampler.HTTPHC4Impl.sample(HTTPHC4Impl.java:286)
> >> >  at
> >> >
> >> >
> >>
> org.apache.jmeter.protocol.http.sampler.HTTPSamplerProxy.sample(HTTPSamplerProxy.java:62)
> >> >  at
> >> >
> >> >
> >>
> org.apache.jmeter.protocol.http.sampler.HTTPSamplerBase.followRedirects(HTTPSamplerBase.java:1410)
> >> >  at
> >> >
> >> >
> >>
> org.apache.jmeter.protocol.http.sampler.HTTPSamplerBase.resultProcessing(HTTPSamplerBase.java:1481)
> >> >  at
> >> >
> >> >
> >>
> org.apache.jmeter.protocol.http.sampler.HTTPAbstractImpl.resultProcessing(HTTPAbstractImpl.java:251)
> >> >  at
> >> >
> >> >
> >>
> org.apache.jmeter.protocol.http.sampler.HTTPHC4Impl.sample(HTTPHC4Impl.java:358)
> >> >  at
> >> >
> >> >
> >>
> org.apache.jmeter.protocol.http.sampler.HTTPSamplerProxy.sample(HTTPSamplerProxy.java:62)
> >> >  at
> >> >
> >> >
> >>
> org.apache.jmeter.protocol.http.sampler.HTTPSamplerBase.sample(HTTPSamplerBase.java:1088)
> >> >  at
> >> >
> >> >
> >>
> org.apache.jmeter.protocol.http.sampler.HTTPSamplerBase.sample(HTTPSamplerBase.java:1077)
> >> >  at
> >> >
> >> >
> >>
> org.apache.jmeter.threads.JMeterThread.process_sampler(JMeterThread.java:428)
> >> >  at org.apache.jmeter.threads.JMeterThread.run(JMeterThread.java:256)
> >> >  at java.lang.Thread.run(Thread.java:619)
> >> >
> >> >
> >> > On Fri, Aug 16, 2013 at 8:53 AM, umesh prajapati <
> praumesh86@gmail.com
> >> > >wrote:
> >> >
> >> > > I would like to thank you very much for your time and help...it
> worked
> >> > out
> >> > > ...:)
> >> > >
> >> > >
> >> > >
> >> > > On Fri, Aug 16, 2013 at 8:07 AM, Flavio Cysne <
> flaviocysne@gmail.com
> >> > >wrote:
> >> > >
> >> > >> JMeter Test Plan will look like this:
> >> > >>
> >> > >> Test Plan
> >> > >>     - CSV Data Set Config (Recycle on EOF: True, Stop thread on
> EOF:
> >> > >> false,
> >> > >> Sharing mode: All threads)
> >> > >>     - Thread Group (threads: 250, rampup: 0, loop: 16)
> >> > >>         - HTTP Request 1
> >> > >>             - Synchronizing Timer (threads: 250)
> >> > >>             - Constant Timer (delay:
> >> > >> ${__javaScript(${__threadNum()}*1818)}
> >> > >>  // 60000 / 33 = ~1818
> >> > >>         - HTTP Request 2
> >> > >>         ...
> >> > >>         - HTTP Request n
> >> > >>
> >> > >>
> >> > >>
> >> > >> 2013/8/16 umesh prajapati <pr...@gmail.com>
> >> > >>
> >> > >> > Thank you very much for making me understand what constant timer
> >> is. I
> >> > >> see
> >> > >> > you mentioned about synchronizing timer . So you have mentioned
> >> that
> >> > >> > synchronizing timer will start all the threads at the same time.
> >> But
> >> > in
> >> > >> my
> >> > >> > case, I would like 33 users to login in 1 minute. And lets say i
> >> have
> >> > >> 250
> >> > >> > users in my csv file but I would like to run my test for 2 hrs.
> >> And to
> >> > >> > accomplish this I am increasing the number of loops. To complete
> >> one
> >> > >> loop
> >> > >> > lets say it takes 8 mins. so I will need around 15-16 loop
> counts.
> >> > >> >
> >> > >> > Number of threads: 250
> >> > >> > Ramo up: 0
> >> > >> > Loop: 16
> >> > >> >
> >> > >> > Constant timer to be added before http sampler : (60000/33) ms
> >> > >> >
> >> > >> > So do I need synchronizing timer. Because if I do add
> synchronizing
> >> > >> timer
> >> > >> > it will start all 250 users at once (just to be clear when you
> say
> >> > start
> >> > >> > all at once) did you mean all 250 user login request will be sent
> >> at
> >> > >> same
> >> > >> > time.
> >> > >> >  On Aug 16, 2013 7:18 AM, "Flavio Cysne" <fl...@gmail.com>
> >> > wrote:
> >> > >> >
> >> > >> > > When you use Synchronizing Timer all the threads will start at
> >> the
> >> > >> same
> >> > >> > > time, when the number of threads started reaches the configured
> >> > value.
> >> > >> > > In your test plan Ramp-up will delay the start of the threads,
> >> but
> >> > >> next
> >> > >> > > loop execution will break down your test, as you have stated.
> >> > >> > > Then Constant Timer is used to overcome this issue, delaying
> the
> >> > start
> >> > >> > time
> >> > >> > > of the threads as ramp-up does, but not messing thing up after
> >> the
> >> > >> first
> >> > >> > > loop.
> >> > >> > > BTW, your script Threads Group Ramp-up have to be 0 (zero).
> >> > >> > >
> >> > >> > >
> >> > >> > > 2013/8/16 umesh prajapati <pr...@gmail.com>
> >> > >> > >
> >> > >> > > > Thank you but I am still confused. So you mean constant time
> >> also
> >> > >> does
> >> > >> > > the
> >> > >> > > > same job like ramp-up period. Lets say I have following
> >> > >> configuration
> >> > >> > > >
> >> > >> > > > Number of threads : 250
> >> > >> > > > Ramp up period : 450
> >> > >> > > > Loop : 3
> >> > >> > > >
> >> > >> > > > From what I have understood about rampup. It takes 450
> seconds
> >> to
> >> > >> > > complete
> >> > >> > > > 250 threads. So the delay between thread 1 and thread 2 is
> >> 450/250
> >> > >> > > seconds.
> >> > >> > > >
> >> > >> > > > So if I also add constant timer to this configuration lets
> say
> >> > >> > (450/250)
> >> > >> > > > seconds. I don't get why do we need constant timer when ramp
> >> up is
> >> > >> > doing
> >> > >> > > > the same thing.
> >> > >> > > > On Aug 16, 2013 4:51 AM, "Flavio Cysne" <
> flaviocysne@gmail.com
> >> >
> >> > >> wrote:
> >> > >> > > >
> >> > >> > > > > 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 <pr...@gmail.com>
> >> > >> > > > >
> >> > >> > > > > > 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" <
> >> > flaviocysne@gmail.com
> >> > >> >
> >> > >> > > > wrote:
> >> > >> > > > > >
> >> > >> > > > > > > only in the first http sampler
> >> > >> > > > > > >
> >> > >> > > > > > >
> >> > >> > > > > > > 2013/8/14 umesh prajapati <pr...@gmail.com>
> >> > >> > > > > > >
> >> > >> > > > > > > > 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 <
> >> > >> > > > > praumesh86@gmail.com
> >> > >> > > > > > > > >wrote:
> >> > >> > > > > > > >
> >> > >> > > > > > > > > @ flavio Thanks ...will try it out and let you know
> >> the
> >> > >> > result.
> >> > >> > > > > > > > >
> >> > >> > > > > > > > >
> >> > >> > > > > > > > > On Wed, Aug 14, 2013 at 8:35 AM, Flavio Cysne <
> >> > >> > > > > flaviocysne@gmail.com
> >> > >> > > > > > > > >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
> >> > >> > > > > > > > >>
> >> > >> > > > > > > > >
> >> > >> > > > > > > > >
> >> > >> > > > > > > >
> >> > >> > > > > > >
> >> > >> > > > > >
> >> > >> > > > >
> >> > >> > > >
> >> > >> > >
> >> > >> >
> >> > >>
> >> > >
> >> > >
> >> >
> >>
> >
> >
>

Re: Loop Count vs Number of Threads

Posted by umesh prajapati <pr...@gmail.com>.
I have my test script as you have mentioned above.

But I am wondering if I use schedular instead of loop. It is not working as
I expected.

Requirement as mentioned above. (1hr = 2000 users, so 1 min 33 users)

with below configuration:
threads:33
ramp up:0
loop:1

synchronizing timer: 33
constant timer: ${__javaScript(${__threadNum()}*1818)}

It takes around 1 min to complete the test.

but when I use shcedular with following configuration

threads: 5
ramp up:0
loop: forever

shedular duration: 60 sec. .It doesnt complete the expected transaction. It
completes around 25. When I ran for 2 hrs, expected was 4000 but only
completed 2980.

synchronizing timer: 5
constant timer: ${__javaScript(${__threadNum()}*1818)}


with this configuration
threads:33
ramp up: 0
loop:forever

schedular duration:60 sec. it completes around 30-33 transaction. (I didnt
try for 2 hrs)

synchronizing timer: 33
constant timer: ${__javaScript(${__threadNum()}*1818)}


On Fri, Aug 16, 2013 at 10:30 AM, umesh prajapati <pr...@gmail.com>wrote:

> I have opened a new thread as both of you have mentioned.
>
>
> http://jmeter.512774.n5.nabble.com/java-net-SocketException-Connection-reset-td5717859.html
>
>
> On Fri, Aug 16, 2013 at 10:19 AM, Flavio Cysne <fl...@gmail.com>wrote:
>
>> As sebb said, start a new thread with more explanations about what
>> happened
>> and we'll be glad to help you
>>
>>
>> 2013/8/16 umesh prajapati <pr...@gmail.com>
>>
>> > I know this has to do with different topic but i am wondering if you
>> could
>> > help me out on this one too if possible.
>> >
>> > I am getting lots of connection reset error.
>> >
>> > java.net.SocketException: Connection reset
>> >  at java.net.SocketInputStream.read(SocketInputStream.java:168)
>> >  at
>> >
>> >
>> org.apache.http.impl.io.AbstractSessionInputBuffer.fillBuffer(AbstractSessionInputBuffer.java:166)
>> >  at
>> >
>> >
>> org.apache.http.impl.io.SocketInputBuffer.fillBuffer(SocketInputBuffer.java:90)
>> >  at
>> >
>> >
>> org.apache.http.impl.io.AbstractSessionInputBuffer.readLine(AbstractSessionInputBuffer.java:281)
>> >  at
>> >
>> >
>> org.apache.http.impl.conn.DefaultHttpResponseParser.parseHead(DefaultHttpResponseParser.java:92)
>> >  at
>> >
>> >
>> org.apache.http.impl.conn.DefaultHttpResponseParser.parseHead(DefaultHttpResponseParser.java:62)
>> >  at
>> >
>> >
>> org.apache.http.impl.io.AbstractMessageParser.parse(AbstractMessageParser.java:254)
>> >  at
>> >
>> >
>> org.apache.http.impl.AbstractHttpClientConnection.receiveResponseHeader(AbstractHttpClientConnection.java:289)
>> >  at
>> >
>> >
>> org.apache.http.impl.conn.DefaultClientConnection.receiveResponseHeader(DefaultClientConnection.java:252)
>> >  at
>> >
>> >
>> org.apache.http.impl.conn.ManagedClientConnectionImpl.receiveResponseHeader(ManagedClientConnectionImpl.java:191)
>> >  at
>> >
>> >
>> org.apache.http.protocol.HttpRequestExecutor.doReceiveResponse(HttpRequestExecutor.java:300)
>> >  at
>> >
>> >
>> org.apache.http.protocol.HttpRequestExecutor.execute(HttpRequestExecutor.java:127)
>> >  at
>> >
>> >
>> org.apache.http.impl.client.DefaultRequestDirector.tryExecute(DefaultRequestDirector.java:717)
>> >  at
>> >
>> >
>> org.apache.http.impl.client.DefaultRequestDirector.execute(DefaultRequestDirector.java:522)
>> >  at
>> >
>> >
>> org.apache.http.impl.client.AbstractHttpClient.execute(AbstractHttpClient.java:906)
>> >  at
>> >
>> >
>> org.apache.http.impl.client.AbstractHttpClient.execute(AbstractHttpClient.java:805)
>> >  at
>> >
>> >
>> org.apache.jmeter.protocol.http.sampler.HTTPHC4Impl.sample(HTTPHC4Impl.java:286)
>> >  at
>> >
>> >
>> org.apache.jmeter.protocol.http.sampler.HTTPSamplerProxy.sample(HTTPSamplerProxy.java:62)
>> >  at
>> >
>> >
>> org.apache.jmeter.protocol.http.sampler.HTTPSamplerBase.followRedirects(HTTPSamplerBase.java:1410)
>> >  at
>> >
>> >
>> org.apache.jmeter.protocol.http.sampler.HTTPSamplerBase.resultProcessing(HTTPSamplerBase.java:1481)
>> >  at
>> >
>> >
>> org.apache.jmeter.protocol.http.sampler.HTTPAbstractImpl.resultProcessing(HTTPAbstractImpl.java:251)
>> >  at
>> >
>> >
>> org.apache.jmeter.protocol.http.sampler.HTTPHC4Impl.sample(HTTPHC4Impl.java:358)
>> >  at
>> >
>> >
>> org.apache.jmeter.protocol.http.sampler.HTTPSamplerProxy.sample(HTTPSamplerProxy.java:62)
>> >  at
>> >
>> >
>> org.apache.jmeter.protocol.http.sampler.HTTPSamplerBase.sample(HTTPSamplerBase.java:1088)
>> >  at
>> >
>> >
>> org.apache.jmeter.protocol.http.sampler.HTTPSamplerBase.sample(HTTPSamplerBase.java:1077)
>> >  at
>> >
>> >
>> org.apache.jmeter.threads.JMeterThread.process_sampler(JMeterThread.java:428)
>> >  at org.apache.jmeter.threads.JMeterThread.run(JMeterThread.java:256)
>> >  at java.lang.Thread.run(Thread.java:619)
>> >
>> >
>> > On Fri, Aug 16, 2013 at 8:53 AM, umesh prajapati <praumesh86@gmail.com
>> > >wrote:
>> >
>> > > I would like to thank you very much for your time and help...it worked
>> > out
>> > > ...:)
>> > >
>> > >
>> > >
>> > > On Fri, Aug 16, 2013 at 8:07 AM, Flavio Cysne <flaviocysne@gmail.com
>> > >wrote:
>> > >
>> > >> JMeter Test Plan will look like this:
>> > >>
>> > >> Test Plan
>> > >>     - CSV Data Set Config (Recycle on EOF: True, Stop thread on EOF:
>> > >> false,
>> > >> Sharing mode: All threads)
>> > >>     - Thread Group (threads: 250, rampup: 0, loop: 16)
>> > >>         - HTTP Request 1
>> > >>             - Synchronizing Timer (threads: 250)
>> > >>             - Constant Timer (delay:
>> > >> ${__javaScript(${__threadNum()}*1818)}
>> > >>  // 60000 / 33 = ~1818
>> > >>         - HTTP Request 2
>> > >>         ...
>> > >>         - HTTP Request n
>> > >>
>> > >>
>> > >>
>> > >> 2013/8/16 umesh prajapati <pr...@gmail.com>
>> > >>
>> > >> > Thank you very much for making me understand what constant timer
>> is. I
>> > >> see
>> > >> > you mentioned about synchronizing timer . So you have mentioned
>> that
>> > >> > synchronizing timer will start all the threads at the same time.
>> But
>> > in
>> > >> my
>> > >> > case, I would like 33 users to login in 1 minute. And lets say i
>> have
>> > >> 250
>> > >> > users in my csv file but I would like to run my test for 2 hrs.
>> And to
>> > >> > accomplish this I am increasing the number of loops. To complete
>> one
>> > >> loop
>> > >> > lets say it takes 8 mins. so I will need around 15-16 loop counts.
>> > >> >
>> > >> > Number of threads: 250
>> > >> > Ramo up: 0
>> > >> > Loop: 16
>> > >> >
>> > >> > Constant timer to be added before http sampler : (60000/33) ms
>> > >> >
>> > >> > So do I need synchronizing timer. Because if I do add synchronizing
>> > >> timer
>> > >> > it will start all 250 users at once (just to be clear when you say
>> > start
>> > >> > all at once) did you mean all 250 user login request will be sent
>> at
>> > >> same
>> > >> > time.
>> > >> >  On Aug 16, 2013 7:18 AM, "Flavio Cysne" <fl...@gmail.com>
>> > wrote:
>> > >> >
>> > >> > > When you use Synchronizing Timer all the threads will start at
>> the
>> > >> same
>> > >> > > time, when the number of threads started reaches the configured
>> > value.
>> > >> > > In your test plan Ramp-up will delay the start of the threads,
>> but
>> > >> next
>> > >> > > loop execution will break down your test, as you have stated.
>> > >> > > Then Constant Timer is used to overcome this issue, delaying the
>> > start
>> > >> > time
>> > >> > > of the threads as ramp-up does, but not messing thing up after
>> the
>> > >> first
>> > >> > > loop.
>> > >> > > BTW, your script Threads Group Ramp-up have to be 0 (zero).
>> > >> > >
>> > >> > >
>> > >> > > 2013/8/16 umesh prajapati <pr...@gmail.com>
>> > >> > >
>> > >> > > > Thank you but I am still confused. So you mean constant time
>> also
>> > >> does
>> > >> > > the
>> > >> > > > same job like ramp-up period. Lets say I have following
>> > >> configuration
>> > >> > > >
>> > >> > > > Number of threads : 250
>> > >> > > > Ramp up period : 450
>> > >> > > > Loop : 3
>> > >> > > >
>> > >> > > > From what I have understood about rampup. It takes 450 seconds
>> to
>> > >> > > complete
>> > >> > > > 250 threads. So the delay between thread 1 and thread 2 is
>> 450/250
>> > >> > > seconds.
>> > >> > > >
>> > >> > > > So if I also add constant timer to this configuration lets say
>> > >> > (450/250)
>> > >> > > > seconds. I don't get why do we need constant timer when ramp
>> up is
>> > >> > doing
>> > >> > > > the same thing.
>> > >> > > > On Aug 16, 2013 4:51 AM, "Flavio Cysne" <flaviocysne@gmail.com
>> >
>> > >> wrote:
>> > >> > > >
>> > >> > > > > 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 <pr...@gmail.com>
>> > >> > > > >
>> > >> > > > > > 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" <
>> > flaviocysne@gmail.com
>> > >> >
>> > >> > > > wrote:
>> > >> > > > > >
>> > >> > > > > > > only in the first http sampler
>> > >> > > > > > >
>> > >> > > > > > >
>> > >> > > > > > > 2013/8/14 umesh prajapati <pr...@gmail.com>
>> > >> > > > > > >
>> > >> > > > > > > > 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 <
>> > >> > > > > praumesh86@gmail.com
>> > >> > > > > > > > >wrote:
>> > >> > > > > > > >
>> > >> > > > > > > > > @ flavio Thanks ...will try it out and let you know
>> the
>> > >> > result.
>> > >> > > > > > > > >
>> > >> > > > > > > > >
>> > >> > > > > > > > > On Wed, Aug 14, 2013 at 8:35 AM, Flavio Cysne <
>> > >> > > > > flaviocysne@gmail.com
>> > >> > > > > > > > >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
>> > >> > > > > > > > >>
>> > >> > > > > > > > >
>> > >> > > > > > > > >
>> > >> > > > > > > >
>> > >> > > > > > >
>> > >> > > > > >
>> > >> > > > >
>> > >> > > >
>> > >> > >
>> > >> >
>> > >>
>> > >
>> > >
>> >
>>
>
>

Re: Loop Count vs Number of Threads

Posted by umesh prajapati <pr...@gmail.com>.
I have opened a new thread as both of you have mentioned.

http://jmeter.512774.n5.nabble.com/java-net-SocketException-Connection-reset-td5717859.html


On Fri, Aug 16, 2013 at 10:19 AM, Flavio Cysne <fl...@gmail.com>wrote:

> As sebb said, start a new thread with more explanations about what happened
> and we'll be glad to help you
>
>
> 2013/8/16 umesh prajapati <pr...@gmail.com>
>
> > I know this has to do with different topic but i am wondering if you
> could
> > help me out on this one too if possible.
> >
> > I am getting lots of connection reset error.
> >
> > java.net.SocketException: Connection reset
> >  at java.net.SocketInputStream.read(SocketInputStream.java:168)
> >  at
> >
> >
> org.apache.http.impl.io.AbstractSessionInputBuffer.fillBuffer(AbstractSessionInputBuffer.java:166)
> >  at
> >
> >
> org.apache.http.impl.io.SocketInputBuffer.fillBuffer(SocketInputBuffer.java:90)
> >  at
> >
> >
> org.apache.http.impl.io.AbstractSessionInputBuffer.readLine(AbstractSessionInputBuffer.java:281)
> >  at
> >
> >
> org.apache.http.impl.conn.DefaultHttpResponseParser.parseHead(DefaultHttpResponseParser.java:92)
> >  at
> >
> >
> org.apache.http.impl.conn.DefaultHttpResponseParser.parseHead(DefaultHttpResponseParser.java:62)
> >  at
> >
> >
> org.apache.http.impl.io.AbstractMessageParser.parse(AbstractMessageParser.java:254)
> >  at
> >
> >
> org.apache.http.impl.AbstractHttpClientConnection.receiveResponseHeader(AbstractHttpClientConnection.java:289)
> >  at
> >
> >
> org.apache.http.impl.conn.DefaultClientConnection.receiveResponseHeader(DefaultClientConnection.java:252)
> >  at
> >
> >
> org.apache.http.impl.conn.ManagedClientConnectionImpl.receiveResponseHeader(ManagedClientConnectionImpl.java:191)
> >  at
> >
> >
> org.apache.http.protocol.HttpRequestExecutor.doReceiveResponse(HttpRequestExecutor.java:300)
> >  at
> >
> >
> org.apache.http.protocol.HttpRequestExecutor.execute(HttpRequestExecutor.java:127)
> >  at
> >
> >
> org.apache.http.impl.client.DefaultRequestDirector.tryExecute(DefaultRequestDirector.java:717)
> >  at
> >
> >
> org.apache.http.impl.client.DefaultRequestDirector.execute(DefaultRequestDirector.java:522)
> >  at
> >
> >
> org.apache.http.impl.client.AbstractHttpClient.execute(AbstractHttpClient.java:906)
> >  at
> >
> >
> org.apache.http.impl.client.AbstractHttpClient.execute(AbstractHttpClient.java:805)
> >  at
> >
> >
> org.apache.jmeter.protocol.http.sampler.HTTPHC4Impl.sample(HTTPHC4Impl.java:286)
> >  at
> >
> >
> org.apache.jmeter.protocol.http.sampler.HTTPSamplerProxy.sample(HTTPSamplerProxy.java:62)
> >  at
> >
> >
> org.apache.jmeter.protocol.http.sampler.HTTPSamplerBase.followRedirects(HTTPSamplerBase.java:1410)
> >  at
> >
> >
> org.apache.jmeter.protocol.http.sampler.HTTPSamplerBase.resultProcessing(HTTPSamplerBase.java:1481)
> >  at
> >
> >
> org.apache.jmeter.protocol.http.sampler.HTTPAbstractImpl.resultProcessing(HTTPAbstractImpl.java:251)
> >  at
> >
> >
> org.apache.jmeter.protocol.http.sampler.HTTPHC4Impl.sample(HTTPHC4Impl.java:358)
> >  at
> >
> >
> org.apache.jmeter.protocol.http.sampler.HTTPSamplerProxy.sample(HTTPSamplerProxy.java:62)
> >  at
> >
> >
> org.apache.jmeter.protocol.http.sampler.HTTPSamplerBase.sample(HTTPSamplerBase.java:1088)
> >  at
> >
> >
> org.apache.jmeter.protocol.http.sampler.HTTPSamplerBase.sample(HTTPSamplerBase.java:1077)
> >  at
> >
> >
> org.apache.jmeter.threads.JMeterThread.process_sampler(JMeterThread.java:428)
> >  at org.apache.jmeter.threads.JMeterThread.run(JMeterThread.java:256)
> >  at java.lang.Thread.run(Thread.java:619)
> >
> >
> > On Fri, Aug 16, 2013 at 8:53 AM, umesh prajapati <praumesh86@gmail.com
> > >wrote:
> >
> > > I would like to thank you very much for your time and help...it worked
> > out
> > > ...:)
> > >
> > >
> > >
> > > On Fri, Aug 16, 2013 at 8:07 AM, Flavio Cysne <flaviocysne@gmail.com
> > >wrote:
> > >
> > >> JMeter Test Plan will look like this:
> > >>
> > >> Test Plan
> > >>     - CSV Data Set Config (Recycle on EOF: True, Stop thread on EOF:
> > >> false,
> > >> Sharing mode: All threads)
> > >>     - Thread Group (threads: 250, rampup: 0, loop: 16)
> > >>         - HTTP Request 1
> > >>             - Synchronizing Timer (threads: 250)
> > >>             - Constant Timer (delay:
> > >> ${__javaScript(${__threadNum()}*1818)}
> > >>  // 60000 / 33 = ~1818
> > >>         - HTTP Request 2
> > >>         ...
> > >>         - HTTP Request n
> > >>
> > >>
> > >>
> > >> 2013/8/16 umesh prajapati <pr...@gmail.com>
> > >>
> > >> > Thank you very much for making me understand what constant timer
> is. I
> > >> see
> > >> > you mentioned about synchronizing timer . So you have mentioned that
> > >> > synchronizing timer will start all the threads at the same time. But
> > in
> > >> my
> > >> > case, I would like 33 users to login in 1 minute. And lets say i
> have
> > >> 250
> > >> > users in my csv file but I would like to run my test for 2 hrs. And
> to
> > >> > accomplish this I am increasing the number of loops. To complete one
> > >> loop
> > >> > lets say it takes 8 mins. so I will need around 15-16 loop counts.
> > >> >
> > >> > Number of threads: 250
> > >> > Ramo up: 0
> > >> > Loop: 16
> > >> >
> > >> > Constant timer to be added before http sampler : (60000/33) ms
> > >> >
> > >> > So do I need synchronizing timer. Because if I do add synchronizing
> > >> timer
> > >> > it will start all 250 users at once (just to be clear when you say
> > start
> > >> > all at once) did you mean all 250 user login request will be sent at
> > >> same
> > >> > time.
> > >> >  On Aug 16, 2013 7:18 AM, "Flavio Cysne" <fl...@gmail.com>
> > wrote:
> > >> >
> > >> > > When you use Synchronizing Timer all the threads will start at the
> > >> same
> > >> > > time, when the number of threads started reaches the configured
> > value.
> > >> > > In your test plan Ramp-up will delay the start of the threads, but
> > >> next
> > >> > > loop execution will break down your test, as you have stated.
> > >> > > Then Constant Timer is used to overcome this issue, delaying the
> > start
> > >> > time
> > >> > > of the threads as ramp-up does, but not messing thing up after the
> > >> first
> > >> > > loop.
> > >> > > BTW, your script Threads Group Ramp-up have to be 0 (zero).
> > >> > >
> > >> > >
> > >> > > 2013/8/16 umesh prajapati <pr...@gmail.com>
> > >> > >
> > >> > > > Thank you but I am still confused. So you mean constant time
> also
> > >> does
> > >> > > the
> > >> > > > same job like ramp-up period. Lets say I have following
> > >> configuration
> > >> > > >
> > >> > > > Number of threads : 250
> > >> > > > Ramp up period : 450
> > >> > > > Loop : 3
> > >> > > >
> > >> > > > From what I have understood about rampup. It takes 450 seconds
> to
> > >> > > complete
> > >> > > > 250 threads. So the delay between thread 1 and thread 2 is
> 450/250
> > >> > > seconds.
> > >> > > >
> > >> > > > So if I also add constant timer to this configuration lets say
> > >> > (450/250)
> > >> > > > seconds. I don't get why do we need constant timer when ramp up
> is
> > >> > doing
> > >> > > > the same thing.
> > >> > > > On Aug 16, 2013 4:51 AM, "Flavio Cysne" <fl...@gmail.com>
> > >> wrote:
> > >> > > >
> > >> > > > > 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 <pr...@gmail.com>
> > >> > > > >
> > >> > > > > > 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" <
> > flaviocysne@gmail.com
> > >> >
> > >> > > > wrote:
> > >> > > > > >
> > >> > > > > > > only in the first http sampler
> > >> > > > > > >
> > >> > > > > > >
> > >> > > > > > > 2013/8/14 umesh prajapati <pr...@gmail.com>
> > >> > > > > > >
> > >> > > > > > > > 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 <
> > >> > > > > praumesh86@gmail.com
> > >> > > > > > > > >wrote:
> > >> > > > > > > >
> > >> > > > > > > > > @ flavio Thanks ...will try it out and let you know
> the
> > >> > result.
> > >> > > > > > > > >
> > >> > > > > > > > >
> > >> > > > > > > > > On Wed, Aug 14, 2013 at 8:35 AM, Flavio Cysne <
> > >> > > > > flaviocysne@gmail.com
> > >> > > > > > > > >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
> > >> > > > > > > > >>
> > >> > > > > > > > >
> > >> > > > > > > > >
> > >> > > > > > > >
> > >> > > > > > >
> > >> > > > > >
> > >> > > > >
> > >> > > >
> > >> > >
> > >> >
> > >>
> > >
> > >
> >
>

Re: Loop Count vs Number of Threads

Posted by Flavio Cysne <fl...@gmail.com>.
As sebb said, start a new thread with more explanations about what happened
and we'll be glad to help you


2013/8/16 umesh prajapati <pr...@gmail.com>

> I know this has to do with different topic but i am wondering if you could
> help me out on this one too if possible.
>
> I am getting lots of connection reset error.
>
> java.net.SocketException: Connection reset
>  at java.net.SocketInputStream.read(SocketInputStream.java:168)
>  at
>
> org.apache.http.impl.io.AbstractSessionInputBuffer.fillBuffer(AbstractSessionInputBuffer.java:166)
>  at
>
> org.apache.http.impl.io.SocketInputBuffer.fillBuffer(SocketInputBuffer.java:90)
>  at
>
> org.apache.http.impl.io.AbstractSessionInputBuffer.readLine(AbstractSessionInputBuffer.java:281)
>  at
>
> org.apache.http.impl.conn.DefaultHttpResponseParser.parseHead(DefaultHttpResponseParser.java:92)
>  at
>
> org.apache.http.impl.conn.DefaultHttpResponseParser.parseHead(DefaultHttpResponseParser.java:62)
>  at
>
> org.apache.http.impl.io.AbstractMessageParser.parse(AbstractMessageParser.java:254)
>  at
>
> org.apache.http.impl.AbstractHttpClientConnection.receiveResponseHeader(AbstractHttpClientConnection.java:289)
>  at
>
> org.apache.http.impl.conn.DefaultClientConnection.receiveResponseHeader(DefaultClientConnection.java:252)
>  at
>
> org.apache.http.impl.conn.ManagedClientConnectionImpl.receiveResponseHeader(ManagedClientConnectionImpl.java:191)
>  at
>
> org.apache.http.protocol.HttpRequestExecutor.doReceiveResponse(HttpRequestExecutor.java:300)
>  at
>
> org.apache.http.protocol.HttpRequestExecutor.execute(HttpRequestExecutor.java:127)
>  at
>
> org.apache.http.impl.client.DefaultRequestDirector.tryExecute(DefaultRequestDirector.java:717)
>  at
>
> org.apache.http.impl.client.DefaultRequestDirector.execute(DefaultRequestDirector.java:522)
>  at
>
> org.apache.http.impl.client.AbstractHttpClient.execute(AbstractHttpClient.java:906)
>  at
>
> org.apache.http.impl.client.AbstractHttpClient.execute(AbstractHttpClient.java:805)
>  at
>
> org.apache.jmeter.protocol.http.sampler.HTTPHC4Impl.sample(HTTPHC4Impl.java:286)
>  at
>
> org.apache.jmeter.protocol.http.sampler.HTTPSamplerProxy.sample(HTTPSamplerProxy.java:62)
>  at
>
> org.apache.jmeter.protocol.http.sampler.HTTPSamplerBase.followRedirects(HTTPSamplerBase.java:1410)
>  at
>
> org.apache.jmeter.protocol.http.sampler.HTTPSamplerBase.resultProcessing(HTTPSamplerBase.java:1481)
>  at
>
> org.apache.jmeter.protocol.http.sampler.HTTPAbstractImpl.resultProcessing(HTTPAbstractImpl.java:251)
>  at
>
> org.apache.jmeter.protocol.http.sampler.HTTPHC4Impl.sample(HTTPHC4Impl.java:358)
>  at
>
> org.apache.jmeter.protocol.http.sampler.HTTPSamplerProxy.sample(HTTPSamplerProxy.java:62)
>  at
>
> org.apache.jmeter.protocol.http.sampler.HTTPSamplerBase.sample(HTTPSamplerBase.java:1088)
>  at
>
> org.apache.jmeter.protocol.http.sampler.HTTPSamplerBase.sample(HTTPSamplerBase.java:1077)
>  at
>
> org.apache.jmeter.threads.JMeterThread.process_sampler(JMeterThread.java:428)
>  at org.apache.jmeter.threads.JMeterThread.run(JMeterThread.java:256)
>  at java.lang.Thread.run(Thread.java:619)
>
>
> On Fri, Aug 16, 2013 at 8:53 AM, umesh prajapati <praumesh86@gmail.com
> >wrote:
>
> > I would like to thank you very much for your time and help...it worked
> out
> > ...:)
> >
> >
> >
> > On Fri, Aug 16, 2013 at 8:07 AM, Flavio Cysne <flaviocysne@gmail.com
> >wrote:
> >
> >> JMeter Test Plan will look like this:
> >>
> >> Test Plan
> >>     - CSV Data Set Config (Recycle on EOF: True, Stop thread on EOF:
> >> false,
> >> Sharing mode: All threads)
> >>     - Thread Group (threads: 250, rampup: 0, loop: 16)
> >>         - HTTP Request 1
> >>             - Synchronizing Timer (threads: 250)
> >>             - Constant Timer (delay:
> >> ${__javaScript(${__threadNum()}*1818)}
> >>  // 60000 / 33 = ~1818
> >>         - HTTP Request 2
> >>         ...
> >>         - HTTP Request n
> >>
> >>
> >>
> >> 2013/8/16 umesh prajapati <pr...@gmail.com>
> >>
> >> > Thank you very much for making me understand what constant timer is. I
> >> see
> >> > you mentioned about synchronizing timer . So you have mentioned that
> >> > synchronizing timer will start all the threads at the same time. But
> in
> >> my
> >> > case, I would like 33 users to login in 1 minute. And lets say i have
> >> 250
> >> > users in my csv file but I would like to run my test for 2 hrs. And to
> >> > accomplish this I am increasing the number of loops. To complete one
> >> loop
> >> > lets say it takes 8 mins. so I will need around 15-16 loop counts.
> >> >
> >> > Number of threads: 250
> >> > Ramo up: 0
> >> > Loop: 16
> >> >
> >> > Constant timer to be added before http sampler : (60000/33) ms
> >> >
> >> > So do I need synchronizing timer. Because if I do add synchronizing
> >> timer
> >> > it will start all 250 users at once (just to be clear when you say
> start
> >> > all at once) did you mean all 250 user login request will be sent at
> >> same
> >> > time.
> >> >  On Aug 16, 2013 7:18 AM, "Flavio Cysne" <fl...@gmail.com>
> wrote:
> >> >
> >> > > When you use Synchronizing Timer all the threads will start at the
> >> same
> >> > > time, when the number of threads started reaches the configured
> value.
> >> > > In your test plan Ramp-up will delay the start of the threads, but
> >> next
> >> > > loop execution will break down your test, as you have stated.
> >> > > Then Constant Timer is used to overcome this issue, delaying the
> start
> >> > time
> >> > > of the threads as ramp-up does, but not messing thing up after the
> >> first
> >> > > loop.
> >> > > BTW, your script Threads Group Ramp-up have to be 0 (zero).
> >> > >
> >> > >
> >> > > 2013/8/16 umesh prajapati <pr...@gmail.com>
> >> > >
> >> > > > Thank you but I am still confused. So you mean constant time also
> >> does
> >> > > the
> >> > > > same job like ramp-up period. Lets say I have following
> >> configuration
> >> > > >
> >> > > > Number of threads : 250
> >> > > > Ramp up period : 450
> >> > > > Loop : 3
> >> > > >
> >> > > > From what I have understood about rampup. It takes 450 seconds to
> >> > > complete
> >> > > > 250 threads. So the delay between thread 1 and thread 2 is 450/250
> >> > > seconds.
> >> > > >
> >> > > > So if I also add constant timer to this configuration lets say
> >> > (450/250)
> >> > > > seconds. I don't get why do we need constant timer when ramp up is
> >> > doing
> >> > > > the same thing.
> >> > > > On Aug 16, 2013 4:51 AM, "Flavio Cysne" <fl...@gmail.com>
> >> wrote:
> >> > > >
> >> > > > > 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 <pr...@gmail.com>
> >> > > > >
> >> > > > > > 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" <
> flaviocysne@gmail.com
> >> >
> >> > > > wrote:
> >> > > > > >
> >> > > > > > > only in the first http sampler
> >> > > > > > >
> >> > > > > > >
> >> > > > > > > 2013/8/14 umesh prajapati <pr...@gmail.com>
> >> > > > > > >
> >> > > > > > > > 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 <
> >> > > > > praumesh86@gmail.com
> >> > > > > > > > >wrote:
> >> > > > > > > >
> >> > > > > > > > > @ flavio Thanks ...will try it out and let you know the
> >> > result.
> >> > > > > > > > >
> >> > > > > > > > >
> >> > > > > > > > > On Wed, Aug 14, 2013 at 8:35 AM, Flavio Cysne <
> >> > > > > flaviocysne@gmail.com
> >> > > > > > > > >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
> >> > > > > > > > >>
> >> > > > > > > > >
> >> > > > > > > > >
> >> > > > > > > >
> >> > > > > > >
> >> > > > > >
> >> > > > >
> >> > > >
> >> > >
> >> >
> >>
> >
> >
>

Re: Loop Count vs Number of Threads

Posted by sebb <se...@gmail.com>.
On 16 August 2013 17:55, umesh prajapati <pr...@gmail.com> wrote:
> I know this has to do with different topic

Please start a new thread - with an appropriate subject - for a new topic.

---------------------------------------------------------------------
To unsubscribe, e-mail: user-unsubscribe@jmeter.apache.org
For additional commands, e-mail: user-help@jmeter.apache.org


Re: Loop Count vs Number of Threads

Posted by umesh prajapati <pr...@gmail.com>.
I know this has to do with different topic but i am wondering if you could
help me out on this one too if possible.

I am getting lots of connection reset error.

java.net.SocketException: Connection reset
 at java.net.SocketInputStream.read(SocketInputStream.java:168)
 at
org.apache.http.impl.io.AbstractSessionInputBuffer.fillBuffer(AbstractSessionInputBuffer.java:166)
 at
org.apache.http.impl.io.SocketInputBuffer.fillBuffer(SocketInputBuffer.java:90)
 at
org.apache.http.impl.io.AbstractSessionInputBuffer.readLine(AbstractSessionInputBuffer.java:281)
 at
org.apache.http.impl.conn.DefaultHttpResponseParser.parseHead(DefaultHttpResponseParser.java:92)
 at
org.apache.http.impl.conn.DefaultHttpResponseParser.parseHead(DefaultHttpResponseParser.java:62)
 at
org.apache.http.impl.io.AbstractMessageParser.parse(AbstractMessageParser.java:254)
 at
org.apache.http.impl.AbstractHttpClientConnection.receiveResponseHeader(AbstractHttpClientConnection.java:289)
 at
org.apache.http.impl.conn.DefaultClientConnection.receiveResponseHeader(DefaultClientConnection.java:252)
 at
org.apache.http.impl.conn.ManagedClientConnectionImpl.receiveResponseHeader(ManagedClientConnectionImpl.java:191)
 at
org.apache.http.protocol.HttpRequestExecutor.doReceiveResponse(HttpRequestExecutor.java:300)
 at
org.apache.http.protocol.HttpRequestExecutor.execute(HttpRequestExecutor.java:127)
 at
org.apache.http.impl.client.DefaultRequestDirector.tryExecute(DefaultRequestDirector.java:717)
 at
org.apache.http.impl.client.DefaultRequestDirector.execute(DefaultRequestDirector.java:522)
 at
org.apache.http.impl.client.AbstractHttpClient.execute(AbstractHttpClient.java:906)
 at
org.apache.http.impl.client.AbstractHttpClient.execute(AbstractHttpClient.java:805)
 at
org.apache.jmeter.protocol.http.sampler.HTTPHC4Impl.sample(HTTPHC4Impl.java:286)
 at
org.apache.jmeter.protocol.http.sampler.HTTPSamplerProxy.sample(HTTPSamplerProxy.java:62)
 at
org.apache.jmeter.protocol.http.sampler.HTTPSamplerBase.followRedirects(HTTPSamplerBase.java:1410)
 at
org.apache.jmeter.protocol.http.sampler.HTTPSamplerBase.resultProcessing(HTTPSamplerBase.java:1481)
 at
org.apache.jmeter.protocol.http.sampler.HTTPAbstractImpl.resultProcessing(HTTPAbstractImpl.java:251)
 at
org.apache.jmeter.protocol.http.sampler.HTTPHC4Impl.sample(HTTPHC4Impl.java:358)
 at
org.apache.jmeter.protocol.http.sampler.HTTPSamplerProxy.sample(HTTPSamplerProxy.java:62)
 at
org.apache.jmeter.protocol.http.sampler.HTTPSamplerBase.sample(HTTPSamplerBase.java:1088)
 at
org.apache.jmeter.protocol.http.sampler.HTTPSamplerBase.sample(HTTPSamplerBase.java:1077)
 at
org.apache.jmeter.threads.JMeterThread.process_sampler(JMeterThread.java:428)
 at org.apache.jmeter.threads.JMeterThread.run(JMeterThread.java:256)
 at java.lang.Thread.run(Thread.java:619)


On Fri, Aug 16, 2013 at 8:53 AM, umesh prajapati <pr...@gmail.com>wrote:

> I would like to thank you very much for your time and help...it worked out
> ...:)
>
>
>
> On Fri, Aug 16, 2013 at 8:07 AM, Flavio Cysne <fl...@gmail.com>wrote:
>
>> JMeter Test Plan will look like this:
>>
>> Test Plan
>>     - CSV Data Set Config (Recycle on EOF: True, Stop thread on EOF:
>> false,
>> Sharing mode: All threads)
>>     - Thread Group (threads: 250, rampup: 0, loop: 16)
>>         - HTTP Request 1
>>             - Synchronizing Timer (threads: 250)
>>             - Constant Timer (delay:
>> ${__javaScript(${__threadNum()}*1818)}
>>  // 60000 / 33 = ~1818
>>         - HTTP Request 2
>>         ...
>>         - HTTP Request n
>>
>>
>>
>> 2013/8/16 umesh prajapati <pr...@gmail.com>
>>
>> > Thank you very much for making me understand what constant timer is. I
>> see
>> > you mentioned about synchronizing timer . So you have mentioned that
>> > synchronizing timer will start all the threads at the same time. But in
>> my
>> > case, I would like 33 users to login in 1 minute. And lets say i have
>> 250
>> > users in my csv file but I would like to run my test for 2 hrs. And to
>> > accomplish this I am increasing the number of loops. To complete one
>> loop
>> > lets say it takes 8 mins. so I will need around 15-16 loop counts.
>> >
>> > Number of threads: 250
>> > Ramo up: 0
>> > Loop: 16
>> >
>> > Constant timer to be added before http sampler : (60000/33) ms
>> >
>> > So do I need synchronizing timer. Because if I do add synchronizing
>> timer
>> > it will start all 250 users at once (just to be clear when you say start
>> > all at once) did you mean all 250 user login request will be sent at
>> same
>> > time.
>> >  On Aug 16, 2013 7:18 AM, "Flavio Cysne" <fl...@gmail.com> wrote:
>> >
>> > > When you use Synchronizing Timer all the threads will start at the
>> same
>> > > time, when the number of threads started reaches the configured value.
>> > > In your test plan Ramp-up will delay the start of the threads, but
>> next
>> > > loop execution will break down your test, as you have stated.
>> > > Then Constant Timer is used to overcome this issue, delaying the start
>> > time
>> > > of the threads as ramp-up does, but not messing thing up after the
>> first
>> > > loop.
>> > > BTW, your script Threads Group Ramp-up have to be 0 (zero).
>> > >
>> > >
>> > > 2013/8/16 umesh prajapati <pr...@gmail.com>
>> > >
>> > > > Thank you but I am still confused. So you mean constant time also
>> does
>> > > the
>> > > > same job like ramp-up period. Lets say I have following
>> configuration
>> > > >
>> > > > Number of threads : 250
>> > > > Ramp up period : 450
>> > > > Loop : 3
>> > > >
>> > > > From what I have understood about rampup. It takes 450 seconds to
>> > > complete
>> > > > 250 threads. So the delay between thread 1 and thread 2 is 450/250
>> > > seconds.
>> > > >
>> > > > So if I also add constant timer to this configuration lets say
>> > (450/250)
>> > > > seconds. I don't get why do we need constant timer when ramp up is
>> > doing
>> > > > the same thing.
>> > > > On Aug 16, 2013 4:51 AM, "Flavio Cysne" <fl...@gmail.com>
>> wrote:
>> > > >
>> > > > > 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 <pr...@gmail.com>
>> > > > >
>> > > > > > 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" <flaviocysne@gmail.com
>> >
>> > > > wrote:
>> > > > > >
>> > > > > > > only in the first http sampler
>> > > > > > >
>> > > > > > >
>> > > > > > > 2013/8/14 umesh prajapati <pr...@gmail.com>
>> > > > > > >
>> > > > > > > > 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 <
>> > > > > praumesh86@gmail.com
>> > > > > > > > >wrote:
>> > > > > > > >
>> > > > > > > > > @ flavio Thanks ...will try it out and let you know the
>> > result.
>> > > > > > > > >
>> > > > > > > > >
>> > > > > > > > > On Wed, Aug 14, 2013 at 8:35 AM, Flavio Cysne <
>> > > > > flaviocysne@gmail.com
>> > > > > > > > >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
>> > > > > > > > >>
>> > > > > > > > >
>> > > > > > > > >
>> > > > > > > >
>> > > > > > >
>> > > > > >
>> > > > >
>> > > >
>> > >
>> >
>>
>
>

Re: Loop Count vs Number of Threads

Posted by umesh prajapati <pr...@gmail.com>.
I would like to thank you very much for your time and help...it worked out
...:)



On Fri, Aug 16, 2013 at 8:07 AM, Flavio Cysne <fl...@gmail.com> wrote:

> JMeter Test Plan will look like this:
>
> Test Plan
>     - CSV Data Set Config (Recycle on EOF: True, Stop thread on EOF: false,
> Sharing mode: All threads)
>     - Thread Group (threads: 250, rampup: 0, loop: 16)
>         - HTTP Request 1
>             - Synchronizing Timer (threads: 250)
>             - Constant Timer (delay: ${__javaScript(${__threadNum()}*1818)}
>  // 60000 / 33 = ~1818
>         - HTTP Request 2
>         ...
>         - HTTP Request n
>
>
>
> 2013/8/16 umesh prajapati <pr...@gmail.com>
>
> > Thank you very much for making me understand what constant timer is. I
> see
> > you mentioned about synchronizing timer . So you have mentioned that
> > synchronizing timer will start all the threads at the same time. But in
> my
> > case, I would like 33 users to login in 1 minute. And lets say i have 250
> > users in my csv file but I would like to run my test for 2 hrs. And to
> > accomplish this I am increasing the number of loops. To complete one loop
> > lets say it takes 8 mins. so I will need around 15-16 loop counts.
> >
> > Number of threads: 250
> > Ramo up: 0
> > Loop: 16
> >
> > Constant timer to be added before http sampler : (60000/33) ms
> >
> > So do I need synchronizing timer. Because if I do add synchronizing timer
> > it will start all 250 users at once (just to be clear when you say start
> > all at once) did you mean all 250 user login request will be sent at same
> > time.
> >  On Aug 16, 2013 7:18 AM, "Flavio Cysne" <fl...@gmail.com> wrote:
> >
> > > When you use Synchronizing Timer all the threads will start at the same
> > > time, when the number of threads started reaches the configured value.
> > > In your test plan Ramp-up will delay the start of the threads, but next
> > > loop execution will break down your test, as you have stated.
> > > Then Constant Timer is used to overcome this issue, delaying the start
> > time
> > > of the threads as ramp-up does, but not messing thing up after the
> first
> > > loop.
> > > BTW, your script Threads Group Ramp-up have to be 0 (zero).
> > >
> > >
> > > 2013/8/16 umesh prajapati <pr...@gmail.com>
> > >
> > > > Thank you but I am still confused. So you mean constant time also
> does
> > > the
> > > > same job like ramp-up period. Lets say I have following configuration
> > > >
> > > > Number of threads : 250
> > > > Ramp up period : 450
> > > > Loop : 3
> > > >
> > > > From what I have understood about rampup. It takes 450 seconds to
> > > complete
> > > > 250 threads. So the delay between thread 1 and thread 2 is 450/250
> > > seconds.
> > > >
> > > > So if I also add constant timer to this configuration lets say
> > (450/250)
> > > > seconds. I don't get why do we need constant timer when ramp up is
> > doing
> > > > the same thing.
> > > > On Aug 16, 2013 4:51 AM, "Flavio Cysne" <fl...@gmail.com>
> wrote:
> > > >
> > > > > 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 <pr...@gmail.com>
> > > > >
> > > > > > 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" <fl...@gmail.com>
> > > > wrote:
> > > > > >
> > > > > > > only in the first http sampler
> > > > > > >
> > > > > > >
> > > > > > > 2013/8/14 umesh prajapati <pr...@gmail.com>
> > > > > > >
> > > > > > > > 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 <
> > > > > praumesh86@gmail.com
> > > > > > > > >wrote:
> > > > > > > >
> > > > > > > > > @ flavio Thanks ...will try it out and let you know the
> > result.
> > > > > > > > >
> > > > > > > > >
> > > > > > > > > On Wed, Aug 14, 2013 at 8:35 AM, Flavio Cysne <
> > > > > flaviocysne@gmail.com
> > > > > > > > >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
> > > > > > > > >>
> > > > > > > > >
> > > > > > > > >
> > > > > > > >
> > > > > > >
> > > > > >
> > > > >
> > > >
> > >
> >
>

Re: Loop Count vs Number of Threads

Posted by Flavio Cysne <fl...@gmail.com>.
JMeter Test Plan will look like this:

Test Plan
    - CSV Data Set Config (Recycle on EOF: True, Stop thread on EOF: false,
Sharing mode: All threads)
    - Thread Group (threads: 250, rampup: 0, loop: 16)
        - HTTP Request 1
            - Synchronizing Timer (threads: 250)
            - Constant Timer (delay: ${__javaScript(${__threadNum()}*1818)}
 // 60000 / 33 = ~1818
        - HTTP Request 2
        ...
        - HTTP Request n



2013/8/16 umesh prajapati <pr...@gmail.com>

> Thank you very much for making me understand what constant timer is. I see
> you mentioned about synchronizing timer . So you have mentioned that
> synchronizing timer will start all the threads at the same time. But in my
> case, I would like 33 users to login in 1 minute. And lets say i have 250
> users in my csv file but I would like to run my test for 2 hrs. And to
> accomplish this I am increasing the number of loops. To complete one loop
> lets say it takes 8 mins. so I will need around 15-16 loop counts.
>
> Number of threads: 250
> Ramo up: 0
> Loop: 16
>
> Constant timer to be added before http sampler : (60000/33) ms
>
> So do I need synchronizing timer. Because if I do add synchronizing timer
> it will start all 250 users at once (just to be clear when you say start
> all at once) did you mean all 250 user login request will be sent at same
> time.
>  On Aug 16, 2013 7:18 AM, "Flavio Cysne" <fl...@gmail.com> wrote:
>
> > When you use Synchronizing Timer all the threads will start at the same
> > time, when the number of threads started reaches the configured value.
> > In your test plan Ramp-up will delay the start of the threads, but next
> > loop execution will break down your test, as you have stated.
> > Then Constant Timer is used to overcome this issue, delaying the start
> time
> > of the threads as ramp-up does, but not messing thing up after the first
> > loop.
> > BTW, your script Threads Group Ramp-up have to be 0 (zero).
> >
> >
> > 2013/8/16 umesh prajapati <pr...@gmail.com>
> >
> > > Thank you but I am still confused. So you mean constant time also does
> > the
> > > same job like ramp-up period. Lets say I have following configuration
> > >
> > > Number of threads : 250
> > > Ramp up period : 450
> > > Loop : 3
> > >
> > > From what I have understood about rampup. It takes 450 seconds to
> > complete
> > > 250 threads. So the delay between thread 1 and thread 2 is 450/250
> > seconds.
> > >
> > > So if I also add constant timer to this configuration lets say
> (450/250)
> > > seconds. I don't get why do we need constant timer when ramp up is
> doing
> > > the same thing.
> > > On Aug 16, 2013 4:51 AM, "Flavio Cysne" <fl...@gmail.com> wrote:
> > >
> > > > 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 <pr...@gmail.com>
> > > >
> > > > > 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" <fl...@gmail.com>
> > > wrote:
> > > > >
> > > > > > only in the first http sampler
> > > > > >
> > > > > >
> > > > > > 2013/8/14 umesh prajapati <pr...@gmail.com>
> > > > > >
> > > > > > > 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 <
> > > > praumesh86@gmail.com
> > > > > > > >wrote:
> > > > > > >
> > > > > > > > @ flavio Thanks ...will try it out and let you know the
> result.
> > > > > > > >
> > > > > > > >
> > > > > > > > On Wed, Aug 14, 2013 at 8:35 AM, Flavio Cysne <
> > > > flaviocysne@gmail.com
> > > > > > > >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
> > > > > > > >>
> > > > > > > >
> > > > > > > >
> > > > > > >
> > > > > >
> > > > >
> > > >
> > >
> >
>

Re: Loop Count vs Number of Threads

Posted by umesh prajapati <pr...@gmail.com>.
Thank you very much for making me understand what constant timer is. I see
you mentioned about synchronizing timer . So you have mentioned that
synchronizing timer will start all the threads at the same time. But in my
case, I would like 33 users to login in 1 minute. And lets say i have 250
users in my csv file but I would like to run my test for 2 hrs. And to
accomplish this I am increasing the number of loops. To complete one loop
lets say it takes 8 mins. so I will need around 15-16 loop counts.

Number of threads: 250
Ramo up: 0
Loop: 16

Constant timer to be added before http sampler : (60000/33) ms

So do I need synchronizing timer. Because if I do add synchronizing timer
it will start all 250 users at once (just to be clear when you say start
all at once) did you mean all 250 user login request will be sent at same
time.
 On Aug 16, 2013 7:18 AM, "Flavio Cysne" <fl...@gmail.com> wrote:

> When you use Synchronizing Timer all the threads will start at the same
> time, when the number of threads started reaches the configured value.
> In your test plan Ramp-up will delay the start of the threads, but next
> loop execution will break down your test, as you have stated.
> Then Constant Timer is used to overcome this issue, delaying the start time
> of the threads as ramp-up does, but not messing thing up after the first
> loop.
> BTW, your script Threads Group Ramp-up have to be 0 (zero).
>
>
> 2013/8/16 umesh prajapati <pr...@gmail.com>
>
> > Thank you but I am still confused. So you mean constant time also does
> the
> > same job like ramp-up period. Lets say I have following configuration
> >
> > Number of threads : 250
> > Ramp up period : 450
> > Loop : 3
> >
> > From what I have understood about rampup. It takes 450 seconds to
> complete
> > 250 threads. So the delay between thread 1 and thread 2 is 450/250
> seconds.
> >
> > So if I also add constant timer to this configuration lets say (450/250)
> > seconds. I don't get why do we need constant timer when ramp up is doing
> > the same thing.
> > On Aug 16, 2013 4:51 AM, "Flavio Cysne" <fl...@gmail.com> wrote:
> >
> > > 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 <pr...@gmail.com>
> > >
> > > > 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" <fl...@gmail.com>
> > wrote:
> > > >
> > > > > only in the first http sampler
> > > > >
> > > > >
> > > > > 2013/8/14 umesh prajapati <pr...@gmail.com>
> > > > >
> > > > > > 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 <
> > > praumesh86@gmail.com
> > > > > > >wrote:
> > > > > >
> > > > > > > @ flavio Thanks ...will try it out and let you know the result.
> > > > > > >
> > > > > > >
> > > > > > > On Wed, Aug 14, 2013 at 8:35 AM, Flavio Cysne <
> > > flaviocysne@gmail.com
> > > > > > >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
> > > > > > >>
> > > > > > >
> > > > > > >
> > > > > >
> > > > >
> > > >
> > >
> >
>

Re: Loop Count vs Number of Threads

Posted by Flavio Cysne <fl...@gmail.com>.
When you use Synchronizing Timer all the threads will start at the same
time, when the number of threads started reaches the configured value.
In your test plan Ramp-up will delay the start of the threads, but next
loop execution will break down your test, as you have stated.
Then Constant Timer is used to overcome this issue, delaying the start time
of the threads as ramp-up does, but not messing thing up after the first
loop.
BTW, your script Threads Group Ramp-up have to be 0 (zero).


2013/8/16 umesh prajapati <pr...@gmail.com>

> Thank you but I am still confused. So you mean constant time also does the
> same job like ramp-up period. Lets say I have following configuration
>
> Number of threads : 250
> Ramp up period : 450
> Loop : 3
>
> From what I have understood about rampup. It takes 450 seconds to complete
> 250 threads. So the delay between thread 1 and thread 2 is 450/250 seconds.
>
> So if I also add constant timer to this configuration lets say (450/250)
> seconds. I don't get why do we need constant timer when ramp up is doing
> the same thing.
> On Aug 16, 2013 4:51 AM, "Flavio Cysne" <fl...@gmail.com> wrote:
>
> > 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 <pr...@gmail.com>
> >
> > > 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" <fl...@gmail.com>
> wrote:
> > >
> > > > only in the first http sampler
> > > >
> > > >
> > > > 2013/8/14 umesh prajapati <pr...@gmail.com>
> > > >
> > > > > 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 <
> > praumesh86@gmail.com
> > > > > >wrote:
> > > > >
> > > > > > @ flavio Thanks ...will try it out and let you know the result.
> > > > > >
> > > > > >
> > > > > > On Wed, Aug 14, 2013 at 8:35 AM, Flavio Cysne <
> > flaviocysne@gmail.com
> > > > > >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
> > > > > >>
> > > > > >
> > > > > >
> > > > >
> > > >
> > >
> >
>

Re: Loop Count vs Number of Threads

Posted by umesh prajapati <pr...@gmail.com>.
Thank you but I am still confused. So you mean constant time also does the
same job like ramp-up period. Lets say I have following configuration

Number of threads : 250
Ramp up period : 450
Loop : 3

>From what I have understood about rampup. It takes 450 seconds to complete
250 threads. So the delay between thread 1 and thread 2 is 450/250 seconds.

So if I also add constant timer to this configuration lets say (450/250)
seconds. I don't get why do we need constant timer when ramp up is doing
the same thing.
On Aug 16, 2013 4:51 AM, "Flavio Cysne" <fl...@gmail.com> wrote:

> 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 <pr...@gmail.com>
>
> > 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" <fl...@gmail.com> wrote:
> >
> > > only in the first http sampler
> > >
> > >
> > > 2013/8/14 umesh prajapati <pr...@gmail.com>
> > >
> > > > 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 <
> praumesh86@gmail.com
> > > > >wrote:
> > > >
> > > > > @ flavio Thanks ...will try it out and let you know the result.
> > > > >
> > > > >
> > > > > On Wed, Aug 14, 2013 at 8:35 AM, Flavio Cysne <
> flaviocysne@gmail.com
> > > > >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
> > > > >>
> > > > >
> > > > >
> > > >
> > >
> >
>

Re: Loop Count vs Number of Threads

Posted by Flavio Cysne <fl...@gmail.com>.
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 <pr...@gmail.com>

> 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" <fl...@gmail.com> wrote:
>
> > only in the first http sampler
> >
> >
> > 2013/8/14 umesh prajapati <pr...@gmail.com>
> >
> > > 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 <praumesh86@gmail.com
> > > >wrote:
> > >
> > > > @ flavio Thanks ...will try it out and let you know the result.
> > > >
> > > >
> > > > On Wed, Aug 14, 2013 at 8:35 AM, Flavio Cysne <flaviocysne@gmail.com
> > > >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
> > > >>
> > > >
> > > >
> > >
> >
>

Re: Loop Count vs Number of Threads

Posted by umesh prajapati <pr...@gmail.com>.
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" <fl...@gmail.com> wrote:

> only in the first http sampler
>
>
> 2013/8/14 umesh prajapati <pr...@gmail.com>
>
> > 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 <praumesh86@gmail.com
> > >wrote:
> >
> > > @ flavio Thanks ...will try it out and let you know the result.
> > >
> > >
> > > On Wed, Aug 14, 2013 at 8:35 AM, Flavio Cysne <flaviocysne@gmail.com
> > >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
> > >>
> > >
> > >
> >
>

Re: Loop Count vs Number of Threads

Posted by Flavio Cysne <fl...@gmail.com>.
only in the first http sampler


2013/8/14 umesh prajapati <pr...@gmail.com>

> 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 <praumesh86@gmail.com
> >wrote:
>
> > @ flavio Thanks ...will try it out and let you know the result.
> >
> >
> > On Wed, Aug 14, 2013 at 8:35 AM, Flavio Cysne <flaviocysne@gmail.com
> >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
> >>
> >
> >
>

Re: Loop Count vs Number of Threads

Posted by umesh prajapati <pr...@gmail.com>.
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 <pr...@gmail.com>wrote:

> @ flavio Thanks ...will try it out and let you know the result.
>
>
> On Wed, Aug 14, 2013 at 8:35 AM, Flavio Cysne <fl...@gmail.com>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
>>
>
>

Re: Loop Count vs Number of Threads

Posted by umesh prajapati <pr...@gmail.com>.
@ flavio Thanks ...will try it out and let you know the result.


On Wed, Aug 14, 2013 at 8:35 AM, Flavio Cysne <fl...@gmail.com> 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
>

Re: Loop Count vs Number of Threads

Posted by Flavio Cysne <fl...@gmail.com>.
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

Re: Loop Count vs Number of Threads

Posted by umesh prajapati <pr...@gmail.com>.
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 <fl...@gmail.com> 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 <ms...@gmail.com>
>
> > 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 <praumesh86@gmail.com
> > >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 <pr...@gmail.com> 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: user-unsubscribe@jmeter.apache.org
> > > > For additional commands, e-mail: user-help@jmeter.apache.org
> > > >
> > > >
> > >
> >
>

Re: Loop Count vs Number of Threads

Posted by Flavio Cysne <fl...@gmail.com>.
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 <ms...@gmail.com>

> 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 <praumesh86@gmail.com
> >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 <pr...@gmail.com> 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: user-unsubscribe@jmeter.apache.org
> > > For additional commands, e-mail: user-help@jmeter.apache.org
> > >
> > >
> >
>

Re: Loop Count vs Number of Threads

Posted by Manish Sapariya <ms...@gmail.com>.
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 <pr...@gmail.com>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 <pr...@gmail.com> 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: user-unsubscribe@jmeter.apache.org
> > For additional commands, e-mail: user-help@jmeter.apache.org
> >
> >
>

Re: Loop Count vs Number of Threads

Posted by umesh prajapati <pr...@gmail.com>.
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 <pr...@gmail.com> 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: user-unsubscribe@jmeter.apache.org
> For additional commands, e-mail: user-help@jmeter.apache.org
>
>

Re: Loop Count vs Number of Threads

Posted by guru <pr...@gmail.com>.
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: user-unsubscribe@jmeter.apache.org
For additional commands, e-mail: user-help@jmeter.apache.org


Re: Loop Count vs Number of Threads

Posted by Deepak Shetty <sh...@gmail.com>.
> 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 <ca...@orangeandbronze.com>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: jmeter-user-unsubscribe@jakarta.apache.org
> For additional commands, e-mail: jmeter-user-help@jakarta.apache.org
>
>

Re: Loop Count vs Number of Threads

Posted by cal0y <ca...@orangeandbronze.com>.
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: jmeter-user-unsubscribe@jakarta.apache.org
For additional commands, e-mail: jmeter-user-help@jakarta.apache.org


Re: Loop Count vs Number of Threads

Posted by Felix Frank <ff...@mpexnet.de>.
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: jmeter-user-unsubscribe@jakarta.apache.org
For additional commands, e-mail: jmeter-user-help@jakarta.apache.org


Re: Loop Count vs Number of Threads

Posted by cal0y <ca...@orangeandbronze.com>.
Sorry, My Mistake. What i meant was:

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

Thanks.
-- 
View this message in context: http://jmeter.512774.n5.nabble.com/Loop-Count-vs-Number-of-Threads-tp3272154p3272195.html
Sent from the JMeter - User mailing list archive at Nabble.com.

---------------------------------------------------------------------
To unsubscribe, e-mail: jmeter-user-unsubscribe@jakarta.apache.org
For additional commands, e-mail: jmeter-user-help@jakarta.apache.org


Re: Loop Count vs Number of Threads

Posted by Felix Frank <ff...@mpexnet.de>.
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: jmeter-user-unsubscribe@jakarta.apache.org
For additional commands, e-mail: jmeter-user-help@jakarta.apache.org


Re: Loop Count vs Number of Threads

Posted by cal0y <ca...@orangeandbronze.com>.
If they have the same ramp up time of 100 seconds, will they behave the same?
-- 
View this message in context: http://jmeter.512774.n5.nabble.com/Loop-Count-vs-Number-of-Threads-tp3272154p3272187.html
Sent from the JMeter - User mailing list archive at Nabble.com.

---------------------------------------------------------------------
To unsubscribe, e-mail: jmeter-user-unsubscribe@jakarta.apache.org
For additional commands, e-mail: jmeter-user-help@jakarta.apache.org


Re: Loop Count vs Number of Threads

Posted by chaitanya bhatt <bh...@gmail.com>.
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 <ca...@orangeandbronze.com>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: jmeter-user-unsubscribe@jakarta.apache.org
> For additional commands, e-mail: jmeter-user-help@jakarta.apache.org
>
>