RE: not all 50 http samplers to download file are executed

2015-11-07 Thread Charles Lin (charlin)
I changed my script from 1 Thread Group with 50 users, to 50 Thread Group each 
with 1 user.  Well, it does not do what I want which is concurrent downloading.

Thread Group 2 does not start until Thread Group 1 finishes, which in this case 
means a long wait for one 310 MB to complete download, before next Thread Group 
(= next downloading) can begin.

So either I have to increase heap memory even more, or use two or three 
machines to run JMeter so as to get 50 concurrent downloads.

If you have other good suggestions please let me know.

Thank you!

Charles

-Original Message-
From: Charles Lin (charlin) 
Sent: Saturday, November 07, 2015 9:39 PM
To: JMeter Users List
Subject: RE: not all 50 http samplers to download file are executed

Hi Deepak,

Thank you for your response.

After I submitted my question, I started analyzing the logs, and as you 
suspected, the problem was java out of heap memory

I increased my JVM_ARG to -Xms=4096- Xmx=8000, and was able to get more files 
download to complete.  But still, I only got 20 out of 50 total download that I 
had hoped for.

Is there some timer or timing arrangement with my sampler arrangement under the 
Thread Group that I can play with to overcome this heap memory issue?

How about instead of a single Thread Group with 5 HTTPS samplers under it (the 
first 4 leading up to the 5th which is the actual file downloading request), 
right now I run this Thread Group with User = 50, Ramp = 100 sec, cycle = 1 ... 
instead of that, what if I make them into 5 separate Thread Group, each thread 
group with User = 1, Ramp=1, cycle =1.Will I be able to launch all 50 
Thread Groups sequentially but quickly, one after another?   For each Thread 
Group, like I said, 5 samplers are needed to cause the download to begin.
All 5 executes quickly, but the 5th request will take time to finish (for 310 
MB to download).  But as soon as Group 1-5 is done (but downloading now in 
progress), will Group 2-1 ~ 2-5 start to execute?

Will doing the above help to release the heap memory?   In other words, as 
Thread 1-5 finish dumping data to local file, that memory will be freed for 
following succession of Thread 2-5, 3-5, 4-5, 5-5, 6-5, etc to use while they 
also finish up dumping data to file?

Thank you

Charles




2015/11/07 18:43:25 DEBUG - jmeter.threads.ThreadGroup: Ending thread Thread 
Group 1-1 
2015/11/07 18:43:30 ERROR - jmeter.threads.JMeterThread: Test failed! 
java.lang.OutOfMemoryError: Java heap space

2015/11/07 18:43:31 ERROR - jmeter.threads.JMeterThread: Test failed! 
java.lang.OutOfMemoryError: Java heap space

2015/11/07 18:43:31 INFO  - jmeter.threads.JMeterThread: Thread finished: 
Thread Group 1-40 
2015/11/07 18:43:30 ERROR - jmeter.threads.JMeterThread: Test failed! 
java.lang.OutOfMemoryError: Java heap space
at java.io.ByteArrayOutputStream.(Unknown Source)
at 
org.apache.jmeter.protocol.http.sampler.HTTPSamplerBase.readResponse(HTTPSamplerBase.java:1741)
at 
org.apache.jmeter.protocol.http.sampler.HTTPAbstractImpl.readResponse(HTTPAbstractImpl.java:412)
at 
org.apache.jmeter.protocol.http.sampler.HTTPHC4Impl.sample(HTTPHC4Impl.java:352)
at 
org.apache.jmeter.protocol.http.sampler.HTTPSamplerProxy.sample(HTTPSamplerProxy.java:74)
at 
org.apache.jmeter.protocol.http.sampler.HTTPSamplerBase.sample(HTTPSamplerBase.java:1146)
at 
org.apache.jmeter.protocol.http.sampler.HTTPSamplerBase.sample(HTTPSamplerBase.java:1135)
at 
org.apache.jmeter.threads.JMeterThread.process_sampler(JMeterThread.java:434)
at org.apache.jmeter.threads.JMeterThread.run(JMeterThread.java:261)
at java.lang.Thread.run(Unknown Source)


-Original Message-
From: Deepak Shetty [mailto:shet...@gmail.com] 
Sent: Saturday, November 07, 2015 8:11 PM
To: JMeter Users List
Subject: Re: not all 50 http samplers to download file are executed

Did you check jmeter.log for errors like out of memory ?
On Nov 7, 2015 1:11 PM, "Charles Lin (charlin)"  wrote:




RE: not all 50 http samplers to download file are executed

2015-11-07 Thread Charles Lin (charlin)
Hi Deepak,

Thank you for your response.

After I submitted my question, I started analyzing the logs, and as you 
suspected, the problem was java out of heap memory

I increased my JVM_ARG to -Xms=4096- Xmx=8000, and was able to get more files 
download to complete.  But still, I only got 20 out of 50 total download that I 
had hoped for.

Is there some timer or timing arrangement with my sampler arrangement under the 
Thread Group that I can play with to overcome this heap memory issue?

How about instead of a single Thread Group with 5 HTTPS samplers under it (the 
first 4 leading up to the 5th which is the actual file downloading request), 
right now I run this Thread Group with User = 50, Ramp = 100 sec, cycle = 1 ... 
instead of that, what if I make them into 5 separate Thread Group, each thread 
group with User = 1, Ramp=1, cycle =1.Will I be able to launch all 50 
Thread Groups sequentially but quickly, one after another?   For each Thread 
Group, like I said, 5 samplers are needed to cause the download to begin.
All 5 executes quickly, but the 5th request will take time to finish (for 310 
MB to download).  But as soon as Group 1-5 is done (but downloading now in 
progress), will Group 2-1 ~ 2-5 start to execute?

Will doing the above help to release the heap memory?   In other words, as 
Thread 1-5 finish dumping data to local file, that memory will be freed for 
following succession of Thread 2-5, 3-5, 4-5, 5-5, 6-5, etc to use while they 
also finish up dumping data to file?

Thank you

Charles




2015/11/07 18:43:25 DEBUG - jmeter.threads.ThreadGroup: Ending thread Thread 
Group 1-1 
2015/11/07 18:43:30 ERROR - jmeter.threads.JMeterThread: Test failed! 
java.lang.OutOfMemoryError: Java heap space

2015/11/07 18:43:31 ERROR - jmeter.threads.JMeterThread: Test failed! 
java.lang.OutOfMemoryError: Java heap space

2015/11/07 18:43:31 INFO  - jmeter.threads.JMeterThread: Thread finished: 
Thread Group 1-40 
2015/11/07 18:43:30 ERROR - jmeter.threads.JMeterThread: Test failed! 
java.lang.OutOfMemoryError: Java heap space
at java.io.ByteArrayOutputStream.(Unknown Source)
at 
org.apache.jmeter.protocol.http.sampler.HTTPSamplerBase.readResponse(HTTPSamplerBase.java:1741)
at 
org.apache.jmeter.protocol.http.sampler.HTTPAbstractImpl.readResponse(HTTPAbstractImpl.java:412)
at 
org.apache.jmeter.protocol.http.sampler.HTTPHC4Impl.sample(HTTPHC4Impl.java:352)
at 
org.apache.jmeter.protocol.http.sampler.HTTPSamplerProxy.sample(HTTPSamplerProxy.java:74)
at 
org.apache.jmeter.protocol.http.sampler.HTTPSamplerBase.sample(HTTPSamplerBase.java:1146)
at 
org.apache.jmeter.protocol.http.sampler.HTTPSamplerBase.sample(HTTPSamplerBase.java:1135)
at 
org.apache.jmeter.threads.JMeterThread.process_sampler(JMeterThread.java:434)
at org.apache.jmeter.threads.JMeterThread.run(JMeterThread.java:261)
at java.lang.Thread.run(Unknown Source)


-Original Message-
From: Deepak Shetty [mailto:shet...@gmail.com] 
Sent: Saturday, November 07, 2015 8:11 PM
To: JMeter Users List
Subject: Re: not all 50 http samplers to download file are executed

Did you check jmeter.log for errors like out of memory ?
On Nov 7, 2015 1:11 PM, "Charles Lin (charlin)"  wrote:

>
>
> I have a script to download a file.  It works fine when the file size 
> is below certain size.  All 50 samplers are executed.
>
>
>
> But when file size is large – in this particular test, 330 MB file – 
> when the test plan execution is completed, I see that only 10 or so 
> out of total
> 50 samplers show up in the View Result Tree.  Does that mean 40 
> download did not occur?
>
>
>
> At first I thought 50 files were not saved onto my test machine when 
> test plan finished was due to the fact that test plan exited before all the 
> data
> could be written to disk files.   However, when looking at the View Results
> Tree and only seeing 10+ of the total 50 samplers, it now looks like many
> of the samplers were not even executed.  But why?   Thread group is set up
> for 50 user, ramp period = 2 (I was mistaken here … thinking 2 sec 
> between each user but it’s actually 2 sec for total of 50 user 
> requests, so I have readjusted it to 50 seconds duration to achieve 1 
> sec/user rate, will
> retest to see …).   I put a Constant Timer which appears to be delay of
> submit between each # sampler, so #1 submitted (and timer start counting 60
> sec) and during this 60 sec, all 50 #1 samplers are submitted.   Then #75
> gets submitted  (all 50 of them), and 50 sec later, #17 samplers (50 times)
> are submitted, etc.   So that means when we get to #24 samplers, I should
> expect to see all 50 of the #24 samplers to be there.
>
>
>
> So why did I see only 10+ #24 samplers, and end up with only 10+ 
> actual downloaded files instead of all 50?
>
>
>
> Thank you
>
> Charles
>
>
>
>
>
>
>
>


Re: not all 50 http samplers to download file are executed

2015-11-07 Thread Deepak Shetty
Did you check jmeter.log for errors like out of memory ?
On Nov 7, 2015 1:11 PM, "Charles Lin (charlin)"  wrote:

>
>
> I have a script to download a file.  It works fine when the file size is
> below certain size.  All 50 samplers are executed.
>
>
>
> But when file size is large – in this particular test, 330 MB file – when
> the test plan execution is completed, I see that only 10 or so out of total
> 50 samplers show up in the View Result Tree.  Does that mean 40 download
> did not occur?
>
>
>
> At first I thought 50 files were not saved onto my test machine when test
> plan finished was due to the fact that test plan exited before all the data
> could be written to disk files.   However, when looking at the View Results
> Tree and only seeing 10+ of the total 50 samplers, it now looks like many
> of the samplers were not even executed.  But why?   Thread group is set up
> for 50 user, ramp period = 2 (I was mistaken here … thinking 2 sec between
> each user but it’s actually 2 sec for total of 50 user requests, so I have
> readjusted it to 50 seconds duration to achieve 1 sec/user rate, will
> retest to see …).   I put a Constant Timer which appears to be delay of
> submit between each # sampler, so #1 submitted (and timer start counting 60
> sec) and during this 60 sec, all 50 #1 samplers are submitted.   Then #75
> gets submitted  (all 50 of them), and 50 sec later, #17 samplers (50 times)
> are submitted, etc.   So that means when we get to #24 samplers, I should
> expect to see all 50 of the #24 samplers to be there.
>
>
>
> So why did I see only 10+ #24 samplers, and end up with only 10+ actual
> downloaded files instead of all 50?
>
>
>
> Thank you
>
> Charles
>
>
>
>
>
>
>
>


not all 50 http samplers to download file are executed

2015-11-07 Thread Charles Lin (charlin)

I have a script to download a file.  It works fine when the file size is below 
certain size.  All 50 samplers are executed.

But when file size is large - in this particular test, 330 MB file - when the 
test plan execution is completed, I see that only 10 or so out of total 50 
samplers show up in the View Result Tree.  Does that mean 40 download did not 
occur?

At first I thought 50 files were not saved onto my test machine when test plan 
finished was due to the fact that test plan exited before all the data could be 
written to disk files.   However, when looking at the View Results Tree and 
only seeing 10+ of the total 50 samplers, it now looks like many of the 
samplers were not even executed.  But why?   Thread group is set up for 50 
user, ramp period = 2 (I was mistaken here ... thinking 2 sec between each user 
but it's actually 2 sec for total of 50 user requests, so I have readjusted it 
to 50 seconds duration to achieve 1 sec/user rate, will retest to see ...).   I 
put a Constant Timer which appears to be delay of submit between each # 
sampler, so #1 submitted (and timer start counting 60 sec) and during this 60 
sec, all 50 #1 samplers are submitted.   Then #75 gets submitted  (all 50 of 
them), and 50 sec later, #17 samplers (50 times) are submitted, etc.   So that 
means when we get to #24 samplers, I should expect to see all 50 of the #24 
samplers to be there.

So why did I see only 10+ #24 samplers, and end up with only 10+ actual 
downloaded files instead of all 50?

Thank you
Charles


[cid:image001.png@01D11955.0D7FAA00]

[cid:image002.png@01D11956.CDFDF6F0]


Re: JMeter feature request - Overriding timer

2015-11-07 Thread Flavio Cysne
You could try using multiple Thread Groups and a property to control
(inside a while controller, maybe) when these requests should be fire.

There's a plugin, from JMeter Plugins, that could help you synchronize
these requests.

There's also the Beanshell Sampler that you could use to implement your own
way of achieving it.
Em 06/11/2015 09:46, "Ričardas Šliapikas"  escreveu:

> Hello,
>
>
>
> I have the following situation. I have several HTTP requests in my test
> plan and some of the requests are „transations“, i.e. they must happen
> immediatelly one after another. Consider the following example:
>
>
>
>
>
> Quickview Printed summer dress is a „Transation controler“ and there are
> two requests which happen when I select „Printed Summer dress“ in webshop.
> So I want them to be executed without any timer. I could do this by puting
> a separate timer as a child of each request, but this is not very
> convenient if there are many requests. So I want to have one timer for most
> of my requests, but I want to be able to exclude some request sequesnces
> from this timer. Or to say in other words I want to override the „Gaussian
> Random Timer“ just for the two requests under „Quickview Printed summer
> dress“.
>
> This is a real situation in a webshop, because „Quickview Printed summer
> dress“ opens a new html page and then immediatelly submits ajax request to
> open popup.
>
>
>
> Maybe there is a way to do it? Or is it only possible with new feature?
>
>
>
>
>
>
>
>
>