You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@jmeter.apache.org by bobMeliev <b....@gmail.com> on 2014/08/06 08:54:00 UTC

Rampup period for all iterations

Hi,

If I'm not mistaken, rampup period affects only to the first iteration. So
is it possible to run all iterations with rampup period? Let's say:
Number of threads: 100
Ramp-up Period: 100
Loop Count: 10

I want to start test with 1 thread per second, not 100 threads per second 
for all 10 iterations. How I can achieve this?  Thanks! 



--
View this message in context: http://jmeter.512774.n5.nabble.com/Rampup-period-for-all-iterations-tp5720762.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: Rampup period for all iterations

Posted by Kirk Pepperdine <ki...@gmail.com>.
Hi,

It actually gets worse than that. The looping behavior means that tx will be throttled by your servers ability to process requests. The throughput shaping timer is good for slowing things down to a particular tx rate but it cannot correct for back pressure from the server. The only way to do that is have each tx start independently from all other requests. Unfortunately *even* that will not give you the desired tx rate.

See http://www.infoq.com/presentations/latency-pitfalls for more details

Regards,
Kirk

On Aug 8, 2014, at 5:50 AM, Jeff Ohrstrom <jo...@hotmail.com> wrote:

> You can use a throughput shaping timer from the plugin package, but that
> relies on requests per second, not necessarily concurrency.  That's
> probably the cleanest way you could do this. 
> 
> However, you have to be cautious about what you're trying to do.  How
> it's affecting the concurrent users you actually have and how many you
> are expecting. 
> 
> Take your example of 100 Threads with 100 seconds ramp up and 10 loops.
> The first thread is going to kick off and given a 1 second response time
> it will finish it's loops in 10 seconds.  That means, that at the 10th
> second you think you have 10 concurrent requests, but it's actually only
> 9 because the first thread has just finished. Your concurrent users over
> time could look more like a Gaussian graph than a sawtooth if the the
> ramp up time >> than the response time * iterations. 
> 
> On Thu, 2014-08-07 at 01:08 -0700, bobMeliev wrote:
>> Thanks for response. I think I can get the expected result by changing
>> "Thread Group" properties with formula: (Number of Threads * Loop Count) /
>> Expected delay between threads = Ramp-up period. But is it possible to
>> achieve the same result without modifying thread group properties, i.e. to
>> force all iterations to use pre-defined ramp-up period? 
>> 
>> 
>> --
>> View this message in context: http://jmeter.512774.n5.nabble.com/Rampup-period-for-all-iterations-tp5720762p5720772.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
>> 
> 
> 
> 
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: user-unsubscribe@jmeter.apache.org
> For additional commands, e-mail: user-help@jmeter.apache.org
> 


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


Re: Rampup period for all iterations

Posted by Jeff Ohrstrom <jo...@hotmail.com>.
You can use a throughput shaping timer from the plugin package, but that
relies on requests per second, not necessarily concurrency.  That's
probably the cleanest way you could do this. 

However, you have to be cautious about what you're trying to do.  How
it's affecting the concurrent users you actually have and how many you
are expecting. 

Take your example of 100 Threads with 100 seconds ramp up and 10 loops.
The first thread is going to kick off and given a 1 second response time
it will finish it's loops in 10 seconds.  That means, that at the 10th
second you think you have 10 concurrent requests, but it's actually only
9 because the first thread has just finished. Your concurrent users over
time could look more like a Gaussian graph than a sawtooth if the the
ramp up time >> than the response time * iterations. 

On Thu, 2014-08-07 at 01:08 -0700, bobMeliev wrote:
> Thanks for response. I think I can get the expected result by changing
> "Thread Group" properties with formula: (Number of Threads * Loop Count) /
> Expected delay between threads = Ramp-up period. But is it possible to
> achieve the same result without modifying thread group properties, i.e. to
> force all iterations to use pre-defined ramp-up period? 
> 
> 
> --
> View this message in context: http://jmeter.512774.n5.nabble.com/Rampup-period-for-all-iterations-tp5720762p5720772.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
> 



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


Re: Rampup period for all iterations

Posted by bobMeliev <b....@gmail.com>.
Thanks for response. I think I can get the expected result by changing
"Thread Group" properties with formula: (Number of Threads * Loop Count) /
Expected delay between threads = Ramp-up period. But is it possible to
achieve the same result without modifying thread group properties, i.e. to
force all iterations to use pre-defined ramp-up period? 



--
View this message in context: http://jmeter.512774.n5.nabble.com/Rampup-period-for-all-iterations-tp5720762p5720772.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: Rampup period for all iterations

Posted by Kirk Pepperdine <ki...@gmail.com>.
Hi,

It seems that what you’re trying to do is launch 10000 transactions at your server at a rate of 1 tx/sec.

Number of threads: 10000
Ramp-up Period: 10000
Loop Count: 1

Set delay thread creation to be true (checked).
Put at the top of the thread group Random Uniform timer with a duration of 0ms and a random duration of 3000ms. Make sure that timer is buried in a test action with a delay set to 0ms. This act to randomize the flow of traffic on the server. Test Action with a delay of 0ms is effectively a noop but it forces the correct timer behavior.

I’ve included a template for you to look at.

Regards,
Kirk


<?xml version="1.0" encoding="UTF-8"?>
<jmeterTestPlan version="1.2" properties="2.6" jmeter="2.11 r1554548">
  <hashTree>
    <TestPlan guiclass="TestPlanGui" testclass="TestPlan" testname="Test Plan" enabled="true">
      <stringProp name="TestPlan.comments"></stringProp>
      <boolProp name="TestPlan.functional_mode">false</boolProp>
      <boolProp name="TestPlan.serialize_threadgroups">false</boolProp>
      <elementProp name="TestPlan.user_defined_variables" elementType="Arguments" guiclass="ArgumentsPanel" testclass="Arguments" testname="User Defined Variables" enabled="true">
        <collectionProp name="Arguments.arguments"/>
      </elementProp>
      <stringProp name="TestPlan.user_define_classpath"></stringProp>
    </TestPlan>
    <hashTree>
      <ThreadGroup guiclass="ThreadGroupGui" testclass="ThreadGroup" testname="Thread Group" enabled="true">
        <stringProp name="ThreadGroup.on_sample_error">continue</stringProp>
        <elementProp name="ThreadGroup.main_controller" elementType="LoopController" guiclass="LoopControlPanel" testclass="LoopController" testname="Loop Controller" enabled="true">
          <boolProp name="LoopController.continue_forever">false</boolProp>
          <stringProp name="LoopController.loops">1</stringProp>
        </elementProp>
        <stringProp name="ThreadGroup.num_threads">10000</stringProp>
        <stringProp name="ThreadGroup.ramp_time">10000</stringProp>
        <longProp name="ThreadGroup.start_time">1407309337000</longProp>
        <longProp name="ThreadGroup.end_time">1407309337000</longProp>
        <boolProp name="ThreadGroup.scheduler">false</boolProp>
        <stringProp name="ThreadGroup.duration"></stringProp>
        <stringProp name="ThreadGroup.delay"></stringProp>
        <boolProp name="ThreadGroup.delayedStart">true</boolProp>
      </ThreadGroup>
      <hashTree>
        <TestAction guiclass="TestActionGui" testclass="TestAction" testname="Test Action" enabled="true">
          <intProp name="ActionProcessor.action">1</intProp>
          <intProp name="ActionProcessor.target">0</intProp>
          <stringProp name="ActionProcessor.duration">0</stringProp>
        </TestAction>
        <hashTree>
          <UniformRandomTimer guiclass="UniformRandomTimerGui" testclass="UniformRandomTimer" testname="Uniform Random Timer" enabled="true">
            <stringProp name="ConstantTimer.delay">0</stringProp>
            <stringProp name="RandomTimer.range">3000</stringProp>
          </UniformRandomTimer>
          <hashTree/>
        </hashTree>
        <HTTPSamplerProxy guiclass="HttpTestSampleGui" testclass="HTTPSamplerProxy" testname="First sampler" enabled="true">
          <elementProp name="HTTPsampler.Arguments" elementType="Arguments" guiclass="HTTPArgumentsPanel" testclass="Arguments" testname="User Defined Variables" enabled="true">
            <collectionProp name="Arguments.arguments"/>
          </elementProp>
          <stringProp name="HTTPSampler.domain"></stringProp>
          <stringProp name="HTTPSampler.port"></stringProp>
          <stringProp name="HTTPSampler.connect_timeout"></stringProp>
          <stringProp name="HTTPSampler.response_timeout"></stringProp>
          <stringProp name="HTTPSampler.protocol"></stringProp>
          <stringProp name="HTTPSampler.contentEncoding"></stringProp>
          <stringProp name="HTTPSampler.path"></stringProp>
          <stringProp name="HTTPSampler.method">GET</stringProp>
          <boolProp name="HTTPSampler.follow_redirects">true</boolProp>
          <boolProp name="HTTPSampler.auto_redirects">false</boolProp>
          <boolProp name="HTTPSampler.use_keepalive">true</boolProp>
          <boolProp name="HTTPSampler.DO_MULTIPART_POST">false</boolProp>
          <boolProp name="HTTPSampler.monitor">false</boolProp>
          <stringProp name="HTTPSampler.embedded_url_re"></stringProp>
        </HTTPSamplerProxy>
        <hashTree/>
      </hashTree>
    </hashTree>
  </hashTree>
</jmeterTestPlan>
On Aug 6, 2014, at 8:54 AM, bobMeliev <b....@gmail.com> wrote:

> Hi,
> 
> If I'm not mistaken, rampup period affects only to the first iteration. So
> is it possible to run all iterations with rampup period? Let's say:
> Number of threads: 100
> Ramp-up Period: 100
> Loop Count: 10
> 
> I want to start test with 1 thread per second, not 100 threads per second 
> for all 10 iterations. How I can achieve this?  Thanks! 
> 
> 
> 
> --
> View this message in context: http://jmeter.512774.n5.nabble.com/Rampup-period-for-all-iterations-tp5720762.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
> 


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