jmeter-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Flavio Cysne <flaviocy...@gmail.com>
Subject Re: Loop Count vs Number of Threads
Date Fri, 16 Aug 2013 17:19:26 GMT
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 <praumesh86@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 <praumesh86@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 <praumesh86@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 <praumesh86@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 <praumesh86@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
> >> > > > > > > > >>
> >> > > > > > > > >
> >> > > > > > > > >
> >> > > > > > > >
> >> > > > > > >
> >> > > > > >
> >> > > > >
> >> > > >
> >> > >
> >> >
> >>
> >
> >
>

Mime
  • Unnamed multipart/alternative (inline, None, 0 bytes)
View raw message