You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@jmeter.apache.org by Jim Donnellan <jd...@highergear.com> on 2007/02/13 18:23:34 UTC

Throughput Controller Problem

I can't seem to get the Throughput Controller working. As a debug test, 
I created a simple test plan:

Thread Group   (40 threads)
|
-- Throughput Controller
|       |
|       ____ HTTP Sampler
|
|
-- Results Tree



If I set the Throughput Controller to Percent Executions =  50.0, the 
sampler never runs.

If I set the Throughput Controller to Total Executions = 10, the sampler 
runs 40 times, once for each thread.

This is Jmeter 2.2. As for the Java version:
java version "1.5.0_04"
Java(TM) 2 Runtime Environment, Standard Edition (build 1.5.0_04-b05)
Java HotSpot(TM) Client VM (build 1.5.0_04-b05, mixed mode, sharing)


Any ideas?

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


Re: Throughput Controller Problem

Posted by sebb <se...@gmail.com>.
On 13/02/07, Jim Donnellan <jd...@highergear.com> wrote:
> sebb wrote:
> > On 13/02/07, Jim Donnellan <jd...@highergear.com> wrote:
> >> sebb wrote:
> >> > And what is 50% of 1?
> >> >
> >> > Try setting a loop count of at least 2...
> >> >
> >> Oh, good grief.
> >>
> >> So, if I want to place forty requests, I have to loop one thread forty
> >> times? There goes the ramp-up functionality.
> >
> > Not sure what you mean by that.
>
> You can't "ramp-up" to one thread. It was nice to be able to put in 1000
> threads with a 300 second ramp-up time, then decrease the ramp-up time
> to increase the load on the box. But I think I see the point now. I can
> use a timer to put in breathing space, and use the threads+ramp-up to
> simulate clusters of hits. I'll get the hang of it one day. :-)

You can use the Constant throughput timer with a variable throughput,
e.g. by basing it on a property. Just set the variable on the command
line and start the run.

You can use the BeanShell server to change the property at run-time.

We've used this for performance testing: set up a long running test,
and gradually increase the throughput until the system starts to
struggle.

> >
> >> Thanks for the help, now I can stop banging my head against it. I think
> >> I'll just be learning the random function an using it with an if to
> >> simulate the occasional request. That's more like what I need anyway.
> >
> > The Switch Controller might also be useful.
> >
> > What are you trying to do?
> >
> I'm simulating a LAMP server that's a gate for information. Client's are
> constantly making HTTP requests, to see if there is any information
> waiting for that specific client. Most of the time there isn't anything
> waiting for them.  Sporadically, suppliers post information via SOAP.
>
> So, by the time the smoke clears, 97% of the web requests are the HTTP
> requests, and about 3% of them are the SOAP requests.
>
> I want some way to simulate that breakdown. Moreover, if it's going to
> be an honest simulation,  it shouldn't simply do the SOAP requests every
> N=(#interations*3%)  iterations with even spacing, the way the
> Throughput Controller does.  What it should really do is have a three
> percent chance of throwing in a SOAP request on any given pass. Maybe
> one time 1000 runs will get you 36 SOAP requests, maybe the next time
> 28. It should just average out to 3%.
>
> The reason for this is that it's not just about the apache/tomcat. The
> SOAP posts go through a lot of processing before they hit the database,
> so there's machine load issues to test as well.
>
> That's why I'm thinking I could combine the Random function with an If
> controller, a la If (Random <= .03) then SOAP.
>

Or use the Switch Controller with two branches - use a function to map
a random number in the appropriate proportions.

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


Re: Throughput Controller Problem

Posted by Jim Donnellan <jd...@highergear.com>.
sebb wrote:
> On 13/02/07, Jim Donnellan <jd...@highergear.com> wrote:
>> sebb wrote:
>> > And what is 50% of 1?
>> >
>> > Try setting a loop count of at least 2...
>> >
>> Oh, good grief.
>>
>> So, if I want to place forty requests, I have to loop one thread forty
>> times? There goes the ramp-up functionality.
>
> Not sure what you mean by that.

You can't "ramp-up" to one thread. It was nice to be able to put in 1000 
threads with a 300 second ramp-up time, then decrease the ramp-up time 
to increase the load on the box. But I think I see the point now. I can 
use a timer to put in breathing space, and use the threads+ramp-up to 
simulate clusters of hits. I'll get the hang of it one day. :-)

>
>> Thanks for the help, now I can stop banging my head against it. I think
>> I'll just be learning the random function an using it with an if to
>> simulate the occasional request. That's more like what I need anyway.
>
> The Switch Controller might also be useful.
>
> What are you trying to do?
>
I'm simulating a LAMP server that's a gate for information. Client's are 
constantly making HTTP requests, to see if there is any information 
waiting for that specific client. Most of the time there isn't anything 
waiting for them.  Sporadically, suppliers post information via SOAP.

So, by the time the smoke clears, 97% of the web requests are the HTTP 
requests, and about 3% of them are the SOAP requests.

I want some way to simulate that breakdown. Moreover, if it's going to 
be an honest simulation,  it shouldn't simply do the SOAP requests every 
N=(#interations*3%)  iterations with even spacing, the way the 
Throughput Controller does.  What it should really do is have a three 
percent chance of throwing in a SOAP request on any given pass. Maybe 
one time 1000 runs will get you 36 SOAP requests, maybe the next time 
28. It should just average out to 3%.

The reason for this is that it's not just about the apache/tomcat. The 
SOAP posts go through a lot of processing before they hit the database, 
so there's machine load issues to test as well.

That's why I'm thinking I could combine the Random function with an If 
controller, a la If (Random <= .03) then SOAP.





> ---------------------------------------------------------------------
> 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: Throughput Controller Problem

Posted by sebb <se...@gmail.com>.
On 13/02/07, Jim Donnellan <jd...@highergear.com> wrote:
> sebb wrote:
> > And what is 50% of 1?
> >
> > Try setting a loop count of at least 2...
> >
> Oh, good grief.
>
> So, if I want to place forty requests, I have to loop one thread forty
> times? There goes the ramp-up functionality.

Not sure what you mean by that.

> Thanks for the help, now I can stop banging my head against it. I think
> I'll just be learning the random function an using it with an if to
> simulate the occasional request. That's more like what I need anyway.

The Switch Controller might also be useful.

What are you trying to do?

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


Re: Throughput Controller Problem

Posted by Jim Donnellan <jd...@highergear.com>.
sebb wrote:
> And what is 50% of 1?
>
> Try setting a loop count of at least 2...
>
Oh, good grief.

So, if I want to place forty requests, I have to loop one thread forty 
times? There goes the ramp-up functionality.

Thanks for the help, now I can stop banging my head against it. I think 
I'll just be learning the random function an using it with an if to 
simulate the occasional request. That's more like what I need anyway.

Again, thanks though.

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


Re: Throughput Controller Problem

Posted by sebb <se...@gmail.com>.
And what is 50% of 1?

Try setting a loop count of at least 2...


On 13/02/07, Jim Donnellan <jd...@highergear.com> wrote:
> sebb wrote:
> > How many loops in the Thread Group?
> One.
> >
> > Is Per-user checked or not?
> Same behavior whether or not Per-user is checked or not.
>
> >
> > [By the way, the Java Request Sampler is good for checking test plan
> > logic as it does not need an external server, and you can put what you
> > like in the response.]
> >
> >
> > On 13/02/07, Jim Donnellan <jd...@highergear.com> wrote:
> >> I can't seem to get the Throughput Controller working. As a debug test,
> >> I created a simple test plan:
> >>
> >> Thread Group   (40 threads)
> >> |
> >> -- Throughput Controller
> >> |       |
> >> |       ____ HTTP Sampler
> >> |
> >> |
> >> -- Results Tree
> >>
> >>
> >>
> >> If I set the Throughput Controller to Percent Executions =  50.0, the
> >> sampler never runs.
> >>
> >> If I set the Throughput Controller to Total Executions = 10, the sampler
> >> runs 40 times, once for each thread.
> >>
> >> This is Jmeter 2.2. As for the Java version:
> >> java version "1.5.0_04"
> >> Java(TM) 2 Runtime Environment, Standard Edition (build 1.5.0_04-b05)
> >> Java HotSpot(TM) Client VM (build 1.5.0_04-b05, mixed mode, sharing)
> >>
> >>
> >> Any ideas?
> >>
> >> ---------------------------------------------------------------------
> >> 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
> >
>
>
> ---------------------------------------------------------------------
> 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: Throughput Controller Problem

Posted by Jim Donnellan <jd...@highergear.com>.
sebb wrote:
> How many loops in the Thread Group?
One.
>
> Is Per-user checked or not?
Same behavior whether or not Per-user is checked or not.

>
> [By the way, the Java Request Sampler is good for checking test plan
> logic as it does not need an external server, and you can put what you
> like in the response.]
>
>
> On 13/02/07, Jim Donnellan <jd...@highergear.com> wrote:
>> I can't seem to get the Throughput Controller working. As a debug test,
>> I created a simple test plan:
>>
>> Thread Group   (40 threads)
>> |
>> -- Throughput Controller
>> |       |
>> |       ____ HTTP Sampler
>> |
>> |
>> -- Results Tree
>>
>>
>>
>> If I set the Throughput Controller to Percent Executions =  50.0, the
>> sampler never runs.
>>
>> If I set the Throughput Controller to Total Executions = 10, the sampler
>> runs 40 times, once for each thread.
>>
>> This is Jmeter 2.2. As for the Java version:
>> java version "1.5.0_04"
>> Java(TM) 2 Runtime Environment, Standard Edition (build 1.5.0_04-b05)
>> Java HotSpot(TM) Client VM (build 1.5.0_04-b05, mixed mode, sharing)
>>
>>
>> Any ideas?
>>
>> ---------------------------------------------------------------------
>> 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
>


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


Re: Throughput Controller Problem

Posted by sebb <se...@gmail.com>.
How many loops in the Thread Group?

Is Per-user checked or not?

[By the way, the Java Request Sampler is good for checking test plan
logic as it does not need an external server, and you can put what you
like in the response.]


On 13/02/07, Jim Donnellan <jd...@highergear.com> wrote:
> I can't seem to get the Throughput Controller working. As a debug test,
> I created a simple test plan:
>
> Thread Group   (40 threads)
> |
> -- Throughput Controller
> |       |
> |       ____ HTTP Sampler
> |
> |
> -- Results Tree
>
>
>
> If I set the Throughput Controller to Percent Executions =  50.0, the
> sampler never runs.
>
> If I set the Throughput Controller to Total Executions = 10, the sampler
> runs 40 times, once for each thread.
>
> This is Jmeter 2.2. As for the Java version:
> java version "1.5.0_04"
> Java(TM) 2 Runtime Environment, Standard Edition (build 1.5.0_04-b05)
> Java HotSpot(TM) Client VM (build 1.5.0_04-b05, mixed mode, sharing)
>
>
> Any ideas?
>
> ---------------------------------------------------------------------
> 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