You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@jmeter.apache.org by Eric Everman <ee...@usgs.gov> on 2010/11/11 18:54:17 UTC

Parallel Requests / Nested ThreadGroups

Hi - Thanks in advance for your help.

I would like to find a way to submit two or more concurrent http requests that are related.  I think this would be equivalent to having a nested ThreadGroup.

What I am trying to test is a web mapping application similar to Google maps:  It builds a single map in the browser made up of 35 smaller map tiles.  Browsers request those map tiles concurrently, often two at a time depending on the browser.  How the server handles those related tile requests is something that can be optimized, so I'd like to be able to load test with concurrent requests in the same way the browsers does.

Multiple threads will not correctly replicate this type of usage because in my test, the state of an individual thread is unique and not reproducible.  Once a thread has created a unique state, is there a way to have that thread generate concurrent requests?



Thanks,

--eeverman

Re: Parallel Requests / Nested ThreadGroups

Posted by Deepak Shetty <sh...@gmail.com>.
or modify Jmeter source code so that download embedded resources allows you
to specify the number of threads to use in parallel

regards
deepak

On Mon, Nov 15, 2010 at 4:05 PM, Deepak Shetty <sh...@gmail.com> wrote:

> This has been discussed in various forms.
>
> Short answer - This cant be done out of the box in JMeter.
>
> Side question - Does your application actually need this ?
> If the two parallel requests the browser makes are fairly independent (i.e.
> they dont really lock the same resources or query the same rows any more
> than two queries from different users) and the session footprint is also
> small then for e.g. if on the average two concurrent requests are made for a
> single user , than you should get reasonably accurate results by just
> doubling the number of threads
> i.e. simply calculate how many requests per second your server should see
> and use an appropriate number threads. Each of the 35 tiles will be
> requested sequentially by the thread (but have more threads than the number
> of users you are testing for)
>
> Longer answer. In theory you might be able to implement this with a bit of
> bean shell code . Lets say you want to simulate two requests in parallel.
> Then if you wanted to test out 10 users you need 20 threads where Thread 1
> and 2 represent user1 , Thread 3 and 4 represent user 2 etc. All even number
> threads are only used to simulate the parallel downloads.
> You would need some sort of setup to get the session id and share it
> between threads (either property or file).
> You would need a synchronizing timer (or some such technique) to coordinate
> between the threads
> For other samplers which do not need this parallel download you need to
> check and do something like even numbered threads shouldnt execute
> You would need to process the result to calculate the times
> There might be other issues too based on your test script.
> All in all , it would be complicated and its rarely worth it.
>
> You might also try other tools like Selenium Grid.
>
> regards
> deepak
>
>
>
> On Mon, Nov 15, 2010 at 3:35 PM, ee <ee...@usgs.gov> wrote:
>
>> Could someone please comment on the original question?
>>
>>
>>
>>
>>
>>
>> ---------------------------------------------------------------------
>> To unsubscribe, e-mail: jmeter-user-unsubscribe@jakarta.apache.org
>> For additional commands, e-mail: jmeter-user-help@jakarta.apache.org
>>
>>
>

Re: Parallel Requests / Nested ThreadGroups

Posted by Deepak Shetty <sh...@gmail.com>.
This has been discussed in various forms.

Short answer - This cant be done out of the box in JMeter.

Side question - Does your application actually need this ?
If the two parallel requests the browser makes are fairly independent (i.e.
they dont really lock the same resources or query the same rows any more
than two queries from different users) and the session footprint is also
small then for e.g. if on the average two concurrent requests are made for a
single user , than you should get reasonably accurate results by just
doubling the number of threads
i.e. simply calculate how many requests per second your server should see
and use an appropriate number threads. Each of the 35 tiles will be
requested sequentially by the thread (but have more threads than the number
of users you are testing for)

Longer answer. In theory you might be able to implement this with a bit of
bean shell code . Lets say you want to simulate two requests in parallel.
Then if you wanted to test out 10 users you need 20 threads where Thread 1
and 2 represent user1 , Thread 3 and 4 represent user 2 etc. All even number
threads are only used to simulate the parallel downloads.
You would need some sort of setup to get the session id and share it between
threads (either property or file).
You would need a synchronizing timer (or some such technique) to coordinate
between the threads
For other samplers which do not need this parallel download you need to
check and do something like even numbered threads shouldnt execute
You would need to process the result to calculate the times
There might be other issues too based on your test script.
All in all , it would be complicated and its rarely worth it.

You might also try other tools like Selenium Grid.

regards
deepak


On Mon, Nov 15, 2010 at 3:35 PM, ee <ee...@usgs.gov> wrote:

> Could someone please comment on the original question?
>
>
>
>
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: jmeter-user-unsubscribe@jakarta.apache.org
> For additional commands, e-mail: jmeter-user-help@jakarta.apache.org
>
>

Re: Parallel Requests / Nested ThreadGroups

Posted by ee <ee...@usgs.gov>.
Could someone please comment on the original question?






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


Re: Parallel Requests / Nested ThreadGroups

Posted by Deepak Shetty <sh...@gmail.com>.
on the test plan element check  Run thread groups consecutively

regards
deepak

On Fri, Nov 12, 2010 at 3:09 AM, Ivan Rodriguez <
ivan.rodriguez@cybercomgroup.com> wrote:

> Hello!
>
> I'm wondering how do I make several Threadgroups run sequentially.
> So that only one is running at any given moment.
>
> br Ivan
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: jmeter-user-unsubscribe@jakarta.apache.org
> For additional commands, e-mail: jmeter-user-help@jakarta.apache.org
>
>

SV: Parallel Requests / Nested ThreadGroups

Posted by Ivan Rodriguez <iv...@cybercomgroup.com>.
Hello!

I'm wondering how do I make several Threadgroups run sequentially. 
So that only one is running at any given moment.

br Ivan

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