You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@jmeter.apache.org by Steve Weisberg <st...@gmail.com> on 2009/04/23 15:08:29 UTC

Running with Increasing Stress

I want to run my tests as a progressive stress growth to report and
graph how the DUT behaves under increasing stress, which in Jmeter's
case would be increasing the number of threads (users).

What control structure do I need to do this? The only solution I see
is separate loops requiring restating the set of HTTP requests in each
loop which I don’t want to do since the stress increase pattern varies
from run to run. In other tools the *list* of requests is a definable
object.

Maybe I’m missing something simple here. :(

Thanks,
Steve

p.s. --

1.	I do this today using Avalanche and in the past used PC Magazine’s
WebBench. In the former case, increased stress is generated by the
engine in several different ways. In the latter case, you increase the
number of clients (physical PCs or threads, engines on the same PC).
2.	Actually the requirement is more complicated. The HTTP set is
really 6 sets, each one with its own weight. But I think I can
generate that by putting each set under a loop controller with the
loop count being the weight. I note this in case it affects the
solution.

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


Re: Running with Increasing Stress

Posted by sebb <se...@gmail.com>.
On 23/04/2009, Steve Weisberg <st...@gmail.com> wrote:
> I want to run my tests as a progressive stress growth to report and
>  graph how the DUT behaves under increasing stress, which in Jmeter's
>  case would be increasing the number of threads (users).

Not necessarily.

The load on the server depends not only on the number of threads, but
also on the load each thread presents.

So one can change the load by changing the timers.

>  What control structure do I need to do this?  The only solution I see
>  is separate loops requiring restating the set of HTTP requests in each
>  loop which I don’t want to do since the stress increase pattern varies
>  from run to run. In other tools the *list* of requests is a definable
>  object.
>
>  Maybe I’m missing something simple here. :(

See:

http://jakarta.apache.org/jmeter/usermanual/component_reference.html#Constant_Throughput_Timer

If you want to run each test at a fixed load, then just pass in the
throughput and threadcounts as properties on the command-line.

>  Thanks,
>  Steve
>
>  p.s. --
>
>  1.      I do this today using Avalanche and in the past used PC Magazine’s
>  WebBench. In the former case, increased stress is generated by the
>  engine in several different ways. In the latter case, you increase the
>  number of clients (physical PCs or threads, engines on the same PC).
>  2.      Actually the requirement is more complicated. The HTTP set is
>  really 6 sets, each one with its own weight. But I think I can
>  generate that by putting each set under a loop controller with the
>  loop count being the weight. I note this in case it affects the
>  solution.
>
>  ---------------------------------------------------------------------
>  To unsubscribe, e-mail: jmeter-user-unsubscribe@jakarta.apache.org
>  For additional commands, e-mail: jmeter-user-help@jakarta.apache.org
>
>

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


Re: Running with Increasing Stress

Posted by sebb <se...@gmail.com>.
On 24/04/2009, Marc Chiarini <ma...@tufts.edu> wrote:
> As sebb stated, another way to increase load is to decrease the delay
> between requests. You may want to look at using the beanshell timer along
> with the beanshell server (have a look at the manual, if you are having a
> hard time, I can help you in a few days). The server allows you to change
> jmeter properties and user variables on the fly during a test run (I'm not
> sure if you can conditionally add threads or thread groups, because that
> part of the tree is built at startup). Thus you can set up a shell script to
> call the beanshell server on a schedule, decreasing or increasing specific
> delay variables as you see fit.

Indeed, see:

http://jakarta.apache.org/jmeter/usermanual/best-practices.html#beanshell_server

It's not possible to change the number of threads after a test has
started, but one can stop individual threads, or use cause some
threads to wait longer than others, so they don't contribute to the
load.

For a simple ramp-up/ramp-down test, one can use a long ramp-up time
in combination with a fixed loop count. If there are enough loops, the
test will reach steady state and then start to ramp-down as the first
threads reach the loop count. Might be worth adding a

http://jakarta.apache.org/jmeter/usermanual/component_reference.html#Constant_Throughput_Timer

with the rate based on this thread only so each thread should take a
predictable time.

Otherwise, a timer delay can be calculated based on the thread number,
and even the elapsed time by subtracting START.MS from current time.

There are many possibilities.

>  Regards,
>  Marc
>
>
>  Steve Weisberg wrote:
>
> > I want to run my tests as a progressive stress growth to report and
> > graph how the DUT behaves under increasing stress, which in Jmeter's
> > case would be increasing the number of threads (users).
> >
> > What control structure do I need to do this? The only solution I see
> > is separate loops requiring restating the set of HTTP requests in each
> > loop which I don’t want to do since the stress increase pattern varies
> > from run to run. In other tools the *list* of requests is a definable
> > object.
> >
> > Maybe I’m missing something simple here. :(
> >
> > Thanks,
> > Steve
> >
> > p.s. --
> >
> > 1.      I do this today using Avalanche and in the past used PC Magazine’s
> > WebBench. In the former case, increased stress is generated by the
> > engine in several different ways. In the latter case, you increase the
> > number of clients (physical PCs or threads, engines on the same PC).
> > 2.      Actually the requirement is more complicated. The HTTP set is
> > really 6 sets, each one with its own weight. But I think I can
> > generate that by putting each set under a loop controller with the
> > loop count being the weight. I note this in case it affects the
> > solution.
> >
> >
>
> ---------------------------------------------------------------------
>  To unsubscribe, e-mail:
> jmeter-user-unsubscribe@jakarta.apache.org
>  For additional commands, e-mail:
> jmeter-user-help@jakarta.apache.org
>
>

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


Re: Running with Increasing Stress

Posted by Marc Chiarini <ma...@tufts.edu>.
As sebb stated, another way to increase load is to decrease the delay 
between requests. You may want to look at using the beanshell timer 
along with the beanshell server (have a look at the manual, if you are 
having a hard time, I can help you in a few days). The server allows you 
to change jmeter properties and user variables on the fly during a test 
run (I'm not sure if you can conditionally add threads or thread groups, 
because that part of the tree is built at startup). Thus you can set up 
a shell script to call the beanshell server on a schedule, decreasing or 
increasing specific delay variables as you see fit.

Regards,
Marc

Steve Weisberg wrote:
> I want to run my tests as a progressive stress growth to report and
> graph how the DUT behaves under increasing stress, which in Jmeter's
> case would be increasing the number of threads (users).
>
> What control structure do I need to do this? The only solution I see
> is separate loops requiring restating the set of HTTP requests in each
> loop which I don’t want to do since the stress increase pattern varies
> from run to run. In other tools the *list* of requests is a definable
> object.
>
> Maybe I’m missing something simple here. :(
>
> Thanks,
> Steve
>
> p.s. --
>
> 1.	I do this today using Avalanche and in the past used PC Magazine’s
> WebBench. In the former case, increased stress is generated by the
> engine in several different ways. In the latter case, you increase the
> number of clients (physical PCs or threads, engines on the same PC).
> 2.	Actually the requirement is more complicated. The HTTP set is
> really 6 sets, each one with its own weight. But I think I can
> generate that by putting each set under a loop controller with the
> loop count being the weight. I note this in case it affects the
> solution.
>   

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