You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@jmeter.apache.org by Philippe Mouawad <ph...@gmail.com> on 2012/08/20 01:09:58 UTC

RespTimeGraphVisualizer OOM issue

Hello Milamber , sebb,
I was trying to play with new RespTimeGraphVisualizer by loading an
existing result file at CSV format.

File is rather big (400 mo) so it crashed with OOM with Xmx512m.
Issue comes from internalList which holds around 600000 items.

Looking at code I don't really understand its usage, Milamber could you
explain a bit ?
You say:
            // Internal light list to permit play with interval and label
filter without a reading file results

particularly:
                if (internalList.size() >= 2) {
                    synchronized (lockInterval) {
                        @SuppressWarnings("unchecked")
                        ArrayList<SampleResult> tempList =
(ArrayList<SampleResult>) internalList.clone();
                        this.clearData();
                        for (SampleResult sr : tempList) {
                            this.add(sr);
                        }
                    }
                }


Other things I noticed:

   - If I set in Y Axis , Scale maximum value to a number < 1000 it is not
   taken into account, is this voluntary ?
   - In my test config I had set jmeter.save.saveservice.sample_count=true
   , this seems to break Response Time graph because in CSVSaveService we have:
      - if (saveConfig.saveSampleCount()) {
                      result = new StatisticalSampleResult(timeStamp,
      elapsed);
                  } else {
                      result = new SampleResult(timeStamp, elapsed);
                  }
      - This build then StatisticalSampleResult and getTime always returns 0

-- 

Cordialement.
Philippe Mouawad.

Re: RespTimeGraphVisualizer OOM issue

Posted by Philippe Mouawad <ph...@gmail.com>.
Note that regarding :
jmeter.save.saveservice.sample_count

I opened *Bug 53742*<https://issues.apache.org/bugzilla/show_bug.cgi?id=53742>which
I fixed.

So now I get results but other issues remain.


Regards
Philippe

On Mon, Aug 20, 2012 at 1:09 AM, Philippe Mouawad <
philippe.mouawad@gmail.com> wrote:

> Hello Milamber , sebb,
> I was trying to play with new RespTimeGraphVisualizer by loading an
> existing result file at CSV format.
>
> File is rather big (400 mo) so it crashed with OOM with Xmx512m.
> Issue comes from internalList which holds around 600000 items.
>
> Looking at code I don't really understand its usage, Milamber could you
> explain a bit ?
> You say:
>             // Internal light list to permit play with interval and label
> filter without a reading file results
>
> particularly:
>                 if (internalList.size() >= 2) {
>                     synchronized (lockInterval) {
>                         @SuppressWarnings("unchecked")
>                         ArrayList<SampleResult> tempList =
> (ArrayList<SampleResult>) internalList.clone();
>                         this.clearData();
>                         for (SampleResult sr : tempList) {
>                             this.add(sr);
>                         }
>                     }
>                 }
>
>
> Other things I noticed:
>
>    - If I set in Y Axis , Scale maximum value to a number < 1000 it is
>    not taken into account, is this voluntary ?
>    - In my test config I had set
>    jmeter.save.saveservice.sample_count=true , this seems to break Response
>    Time graph because in CSVSaveService we have:
>       - if (saveConfig.saveSampleCount()) {
>                       result = new StatisticalSampleResult(timeStamp,
>       elapsed);
>                   } else {
>                       result = new SampleResult(timeStamp, elapsed);
>                   }
>       - This build then StatisticalSampleResult and getTime always
>       returns 0
>
> --
>
> Cordialement.
> Philippe Mouawad.
>
>
>
>


-- 
Cordialement.
Philippe Mouawad.

Re: RespTimeGraphVisualizer OOM issue

Posted by Milamber <mi...@apache.org>.

Le 19/08/2012 23:09, Philippe Mouawad a ecrit :
> Hello Milamber , sebb,
> I was trying to play with new RespTimeGraphVisualizer by loading an
> existing result file at CSV format.
>
> File is rather big (400 mo) so it crashed with OOM with Xmx512m.
> Issue comes from internalList which holds around 600000 items.
>
> Looking at code I don't really understand its usage, Milamber could you
> explain a bit ?
> You say:
>              // Internal light list to permit play with interval and label
> filter without a reading file results
>
> particularly:
>                  if (internalList.size()>= 2) {
>                      synchronized (lockInterval) {
>                          @SuppressWarnings("unchecked")
>                          ArrayList<SampleResult>  tempList =
> (ArrayList<SampleResult>) internalList.clone();
>                          this.clearData();
>                          for (SampleResult sr : tempList) {
>                              this.add(sr);
>                          }
>                      }
>                  }


This internalList records all results in a ArrayList. This allows to 
reload data when a filter is defines after the test without define a 
writing file. Or this allows too Apply interval in same conditions: 
after a test without a recording file.

The OOME arrives because I've used the SampleResult bean to store the 
startTime and Time (response time) and this bean uses a lot of bytes in 
memory. It's not necessary.
I changed the ArrayList<SamplerResult> to a HashMap<Long, Long>. Now I 
can load a CSV file with 2,400,004 lines.

I will commit the changes now.



>
> Other things I noticed:
>
>     - If I set in Y Axis , Scale maximum value to a number<  1000 it is not
>     taken into account, is this voluntary ?
>     - In my test config I had set jmeter.save.saveservice.sample_count=true
>     , this seems to break Response Time graph because in CSVSaveService we have:
>        - if (saveConfig.saveSampleCount()) {
>                        result = new StatisticalSampleResult(timeStamp,
>        elapsed);
>                    } else {
>                        result = new SampleResult(timeStamp, elapsed);
>                    }
>        - This build then StatisticalSampleResult and getTime always returns 0
>