You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@jmeter.apache.org by anindya_67 <an...@gmail.com> on 2008/12/01 10:38:57 UTC

A very Simple Query

How can I send HTTP requests from Jmeter at a constant rate without waiting
for response of the request?

 I am using "HTTP sampler" control and its thread wait for the response
before sending another request, but I don't want that. I want a single
thread to send request constantly at a rate (say 3 per second) without
waiting for response.

Any help would be appreciated as I am new to Jmeter and badly need a
solution for this.


Thanks,
Anindya
-- 
View this message in context: http://www.nabble.com/A-very-Simple-Query-tp20768789p20768789.html
Sent from the JMeter - User mailing list archive at Nabble.com.


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


RE: A very Simple Query

Posted by Steve Kapinos <St...@tandberg.com>.
Why not make the test look like the actual load by splitting up your URL
list by actual requestor?  Split the list into separate files based on
the requestor.. then you can maintain your sequencing.

Your target of requests per hour may not be a good test because you are
not modeling the concurrency of the actual environment.  Total requests
isn't very accurate unless your actual production load is completely
uniform.

-----Original Message-----
From: anindya_67 [mailto:anindya4all@gmail.com] 
Sent: Monday, December 01, 2008 12:12 PM
To: jmeter-user@jakarta.apache.org
Subject: Re: A very Simple Query


Thanks for the prompt reply. 

Actually I have  apache logs from production server for one peak load
hour.
and I want to replay the load as it is is on test server. So what I did
was
I took out the URLs from apache log and put them in a .csv file. Them
from
Jmeter test plan my two threads are reading the URLs from that csv file
and
sending the requests. I want to send all request in exactly one hour, so
I
divided the no. of URLs accessed in peak load hour  by 3600 sec to get
time
delay  between each request and put in test plan in Order to pupm all
request in one hour exact for replaying the load. For this i have used
constant timer.  But on running the test plan it waits for the response
of
the requests and hence I am not getting the required rate.

As I have unique URLs (some 50k unique URLs) in my csv file, I have
divided
the file in to two parts and my two threads are playing the requests. I
cannot use more threads, as dividing the actual URLs in to several files
would forfeit the purpose of simulating actual load (order of the URLs
are
also important here).

Can I put the response wait OFF from some Jmeter config settings?

Thanks,
Anindya



sebb-2-2 wrote:
> 
> On 01/12/2008, anindya_67 <an...@gmail.com> wrote:
>>
>>  How can I send HTTP requests from Jmeter at a constant rate without
>> waiting
>>  for response of the request?
>>
>>   I am using "HTTP sampler" control and its thread wait for the
response
>>  before sending another request, but I don't want that. I want a
single
>>  thread to send request constantly at a rate (say 3 per second)
without
>>  waiting for response.
> 
> That's not possible.
> 
> HTTP is a request-response protocol, and JMeter waits for the
response.
> 
>>  Any help would be appreciated as I am new to Jmeter and badly need a
>>  solution for this.
> 
> Why? What scenario are you simulating?
> 
> 
> 
>>
> 
> If you want to maintain a constant rate, you can use multiple threads
and
> use a
> 
>
http://jakarta.apache.org/jmeter/usermanual/component_reference.html#Con
stant_Throughput_Timer
> 
> to set the request rate. If there are enough threads, it should be
> possible to maintain the rate even though some threads are waiting for
> a response.
> 
>>  Thanks,
>>  Anindya
>>
>> --
>>  View this message in context:
>> http://www.nabble.com/A-very-Simple-Query-tp20768789p20768789.html
>>  Sent from the JMeter - User mailing list archive at Nabble.com.
>>
>>
>>
---------------------------------------------------------------------
>>  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
> 
> 
> 

-- 
View this message in context:
http://www.nabble.com/A-very-Simple-Query-tp20768789p20769966.html
Sent from the JMeter - User mailing list archive at Nabble.com.


---------------------------------------------------------------------
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: A very Simple Query

Posted by sebb <se...@gmail.com>.
On 01/12/2008, anindya_67 <an...@gmail.com> wrote:
>
>  Thanks for the prompt reply.
>
>  Actually I have  apache logs from production server for one peak load hour.
>  and I want to replay the load as it is is on test server. So what I did was
>  I took out the URLs from apache log and put them in a .csv file. Them from
>  Jmeter test plan my two threads are reading the URLs from that csv file and
>  sending the requests. I want to send all request in exactly one hour, so I
>  divided the no. of URLs accessed in peak load hour  by 3600 sec to get time
>  delay  between each request and put in test plan in Order to pupm all
>  request in one hour exact for replaying the load. For this i have used
>  constant timer.  But on running the test plan it waits for the response of
>  the requests and hence I am not getting the required rate.
>
>  As I have unique URLs (some 50k unique URLs) in my csv file, I have divided
>  the file in to two parts and my two threads are playing the requests. I
>  cannot use more threads, as dividing the actual URLs in to several files
>  would forfeit the purpose of simulating actual load (order of the URLs are
>  also important here).

Just use a single CSV file and set the CSV Dataset to share it between
all threads.
Each thread will read the file as it needs the next entry.

However, you'll need to ensure that the sampler is not delayed by the
timer, so add any required timers to a Test Action placed after the
sampler.

Alternatively, use the __StringFromFile() function to read the file
directly from the sampler, e.g. put the following in the Path:

${__StringFromFile(URLfileName)}

There's also the Access Log Sampler which may do what you want.

>  Can I put the response wait OFF from some Jmeter config settings?

No. But of course you can always edit the source to do this, if you
have sufficient Java knowledge.

>  Thanks,
>  Anindya
>
>
>
>
>  sebb-2-2 wrote:
>  >
>  > On 01/12/2008, anindya_67 <an...@gmail.com> wrote:
>  >>
>  >>  How can I send HTTP requests from Jmeter at a constant rate without
>  >> waiting
>  >>  for response of the request?
>  >>
>  >>   I am using "HTTP sampler" control and its thread wait for the response
>  >>  before sending another request, but I don't want that. I want a single
>  >>  thread to send request constantly at a rate (say 3 per second) without
>  >>  waiting for response.
>  >
>  > That's not possible.
>  >
>  > HTTP is a request-response protocol, and JMeter waits for the response.
>  >
>  >>  Any help would be appreciated as I am new to Jmeter and badly need a
>  >>  solution for this.
>  >
>  > Why? What scenario are you simulating?
>  >
>  >
>  >
>  >>
>  >
>  > If you want to maintain a constant rate, you can use multiple threads and
>  > use a
>  >
>  > http://jakarta.apache.org/jmeter/usermanual/component_reference.html#Constant_Throughput_Timer
>  >
>  > to set the request rate. If there are enough threads, it should be
>  > possible to maintain the rate even though some threads are waiting for
>  > a response.
>  >
>  >>  Thanks,
>  >>  Anindya
>  >>
>  >> --
>  >>  View this message in context:
>  >> http://www.nabble.com/A-very-Simple-Query-tp20768789p20768789.html
>  >>  Sent from the JMeter - User mailing list archive at Nabble.com.
>  >>
>  >>
>  >>  ---------------------------------------------------------------------
>  >>  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
>  >
>  >
>  >
>
>
> --
>  View this message in context: http://www.nabble.com/A-very-Simple-Query-tp20768789p20769966.html
>
> Sent from the JMeter - User mailing list archive at Nabble.com.
>
>
>  ---------------------------------------------------------------------
>  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: A very Simple Query

Posted by anindya_67 <an...@gmail.com>.
Thanks for the prompt reply. 

Actually I have  apache logs from production server for one peak load hour.
and I want to replay the load as it is is on test server. So what I did was
I took out the URLs from apache log and put them in a .csv file. Them from
Jmeter test plan my two threads are reading the URLs from that csv file and
sending the requests. I want to send all request in exactly one hour, so I
divided the no. of URLs accessed in peak load hour  by 3600 sec to get time
delay  between each request and put in test plan in Order to pupm all
request in one hour exact for replaying the load. For this i have used
constant timer.  But on running the test plan it waits for the response of
the requests and hence I am not getting the required rate.

As I have unique URLs (some 50k unique URLs) in my csv file, I have divided
the file in to two parts and my two threads are playing the requests. I
cannot use more threads, as dividing the actual URLs in to several files
would forfeit the purpose of simulating actual load (order of the URLs are
also important here).

Can I put the response wait OFF from some Jmeter config settings?

Thanks,
Anindya



sebb-2-2 wrote:
> 
> On 01/12/2008, anindya_67 <an...@gmail.com> wrote:
>>
>>  How can I send HTTP requests from Jmeter at a constant rate without
>> waiting
>>  for response of the request?
>>
>>   I am using "HTTP sampler" control and its thread wait for the response
>>  before sending another request, but I don't want that. I want a single
>>  thread to send request constantly at a rate (say 3 per second) without
>>  waiting for response.
> 
> That's not possible.
> 
> HTTP is a request-response protocol, and JMeter waits for the response.
> 
>>  Any help would be appreciated as I am new to Jmeter and badly need a
>>  solution for this.
> 
> Why? What scenario are you simulating?
> 
> 
> 
>>
> 
> If you want to maintain a constant rate, you can use multiple threads and
> use a
> 
> http://jakarta.apache.org/jmeter/usermanual/component_reference.html#Constant_Throughput_Timer
> 
> to set the request rate. If there are enough threads, it should be
> possible to maintain the rate even though some threads are waiting for
> a response.
> 
>>  Thanks,
>>  Anindya
>>
>> --
>>  View this message in context:
>> http://www.nabble.com/A-very-Simple-Query-tp20768789p20768789.html
>>  Sent from the JMeter - User mailing list archive at Nabble.com.
>>
>>
>>  ---------------------------------------------------------------------
>>  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
> 
> 
> 

-- 
View this message in context: http://www.nabble.com/A-very-Simple-Query-tp20768789p20769966.html
Sent from the JMeter - User mailing list archive at Nabble.com.


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


Re: A very Simple Query

Posted by sebb <se...@gmail.com>.
On 01/12/2008, anindya_67 <an...@gmail.com> wrote:
>
>  How can I send HTTP requests from Jmeter at a constant rate without waiting
>  for response of the request?
>
>   I am using "HTTP sampler" control and its thread wait for the response
>  before sending another request, but I don't want that. I want a single
>  thread to send request constantly at a rate (say 3 per second) without
>  waiting for response.

That's not possible.

HTTP is a request-response protocol, and JMeter waits for the response.

>  Any help would be appreciated as I am new to Jmeter and badly need a
>  solution for this.

Why? What scenario are you simulating?

>

If you want to maintain a constant rate, you can use multiple threads and use a

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

to set the request rate. If there are enough threads, it should be
possible to maintain the rate even though some threads are waiting for
a response.

>  Thanks,
>  Anindya
>
> --
>  View this message in context: http://www.nabble.com/A-very-Simple-Query-tp20768789p20768789.html
>  Sent from the JMeter - User mailing list archive at Nabble.com.
>
>
>  ---------------------------------------------------------------------
>  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