You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@jmeter.apache.org by Elli Swift <es...@loopone.com> on 2005/05/11 00:49:36 UTC

Out of memory error

Hi all,

I am load testing an HTTPS application and I'm continually running into this
out of memory error:

[GCException java.lang.OutOfMemoryError: requested 8208 bytes

The garbage collection comes along but just doesn't seem to be clearing out
enough room.  I have increased the heap size to 1024, I'm running jmeter on
a server with almost 6GB of RAM, I have no listeners in my test, I'm running
in non-gui mode and I'm only running a test with 25 users looping 4 times
through (it dies almost immediately after the second loop finishes).

I created my script using the HTTP proxy server (I was able to disable HTTPS
in order to record the script) and I noticed that it recorded quite a few
things in each of the Browser-derived headers for each HTTP request.
(If-None-Match, Referer, Host, Accept-Language, User-Agent,
If-Modified-Since, and Accept).  Could any of these be using up unnecessary
resources?

This truly puzzles me, as we were able to create a load test script for one
of our other (non-HTTPS) applications and fire off close to 250 or 300 users
and leave it running for hours without any problems.  Any suggestions would
be very helpful!!

Elli

-----Original Message-----
From: Elli Swift [mailto:eswift@loopone.com] 
Sent: Tuesday, May 10, 2005 11:09 AM
To: 'JMeter Users List'; 'Hany Mesha'
Subject: RE: Using Proxy server recording facility on Linux

I know that I have had problems with the HTTP Proxy Server using 'localhost'
with IE 6.0 (like you, I noticed that the script would not record).  When I
replaced localhost with an actual IP address (127.0.0.1) it seemed to work
fine with IE.  Maybe that could have something to do with it?

Elli

-----Original Message-----
From: Hany Mesha [mailto:hmesha@gmail.com] 
Sent: Monday, May 09, 2005 3:41 PM
To: jmeter-user@jakarta.apache.org
Subject: Using Proxy server recording facility on Linux

Hello,

Hello:

  I am new to jmeter (using version 2.0.3) and trying to load test a
web application. My envrionment:
Suse Linux 9.1, JDK 1.4.2_07, JBoss Application Server 4.0.1 running
on port 8080.

I was trying to use the Proxy Server to generate the HTTP Requests for
my test plan. As described in the user manual, I created a test plan,
a thread group, and added a Recording Controller as a child to the
thread group. I also added a Graph Results and Aggregate Report
Listeners. Then in the WorkBench I added the HTTP Proxy server from
Non Test Elements and give it the port as 8090. Then I changed the
browser (tried both FireFox 1.0 and IE 6 for Linux) proxy settings to
localhost:8090.

I clicked "Start" in the HTTP Proxy Server and then took a new browser
instance and browsed thru my web application. I clicked "Stop" in HTTP
Proxy Server. But nothingis seen recorded under the "Recording
Contoller". Am i missing something?

Note: If I run JMeter on Windows with the same setting and still
running JBoss on Linux, I get all my recordings with no problem.

Thanks for your help in advance,

-Hany Mesha

---------------------------------------------------------------------
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: Out of memory error

Posted by Michael Stover <ms...@apache.org>.
My three thoughts are:
A) you have a listener when you thought you didn't - examine your test
script again
B) the responses from the server are exceptionally large.
C) Your test script is stupendously large in and of itself.

Maybe you could give us more details about your test script.

-Mike

On Tue, 2005-05-10 at 17:49 -0500, Elli Swift wrote:
> Hi all,
> 
> I am load testing an HTTPS application and I'm continually running into this
> out of memory error:
> 
> [GCException java.lang.OutOfMemoryError: requested 8208 bytes
> 
> The garbage collection comes along but just doesn't seem to be clearing out
> enough room.  I have increased the heap size to 1024, I'm running jmeter on
> a server with almost 6GB of RAM, I have no listeners in my test, I'm running
> in non-gui mode and I'm only running a test with 25 users looping 4 times
> through (it dies almost immediately after the second loop finishes).
> 
> I created my script using the HTTP proxy server (I was able to disable HTTPS
> in order to record the script) and I noticed that it recorded quite a few
> things in each of the Browser-derived headers for each HTTP request.
> (If-None-Match, Referer, Host, Accept-Language, User-Agent,
> If-Modified-Since, and Accept).  Could any of these be using up unnecessary
> resources?
> 
> This truly puzzles me, as we were able to create a load test script for one
> of our other (non-HTTPS) applications and fire off close to 250 or 300 users
> and leave it running for hours without any problems.  Any suggestions would
> be very helpful!!
> 
> Elli
> 
> -----Original Message-----
> From: Elli Swift [mailto:eswift@loopone.com] 
> Sent: Tuesday, May 10, 2005 11:09 AM
> To: 'JMeter Users List'; 'Hany Mesha'
> Subject: RE: Using Proxy server recording facility on Linux
> 
> I know that I have had problems with the HTTP Proxy Server using 'localhost'
> with IE 6.0 (like you, I noticed that the script would not record).  When I
> replaced localhost with an actual IP address (127.0.0.1) it seemed to work
> fine with IE.  Maybe that could have something to do with it?
> 
> Elli
> 
> -----Original Message-----
> From: Hany Mesha [mailto:hmesha@gmail.com] 
> Sent: Monday, May 09, 2005 3:41 PM
> To: jmeter-user@jakarta.apache.org
> Subject: Using Proxy server recording facility on Linux
> 
> Hello,
> 
> Hello:
> 
>   I am new to jmeter (using version 2.0.3) and trying to load test a
> web application. My envrionment:
> Suse Linux 9.1, JDK 1.4.2_07, JBoss Application Server 4.0.1 running
> on port 8080.
> 
> I was trying to use the Proxy Server to generate the HTTP Requests for
> my test plan. As described in the user manual, I created a test plan,
> a thread group, and added a Recording Controller as a child to the
> thread group. I also added a Graph Results and Aggregate Report
> Listeners. Then in the WorkBench I added the HTTP Proxy server from
> Non Test Elements and give it the port as 8090. Then I changed the
> browser (tried both FireFox 1.0 and IE 6 for Linux) proxy settings to
> localhost:8090.
> 
> I clicked "Start" in the HTTP Proxy Server and then took a new browser
> instance and browsed thru my web application. I clicked "Stop" in HTTP
> Proxy Server. But nothingis seen recorded under the "Recording
> Contoller". Am i missing something?
> 
> Note: If I run JMeter on Windows with the same setting and still
> running JBoss on Linux, I get all my recordings with no problem.
> 
> Thanks for your help in advance,
> 
> -Hany Mesha
> 
> ---------------------------------------------------------------------
> 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: Out of memory error

Posted by Peter Lin <wo...@gmail.com>.
I've done a lot of benchmarking over the last 6 years and SSL
performance simply eats up CPU and RAM. Back in 2002, I ran over 400
benchmarks on Tomcat 4.x with Remy (a tomcat developer). Even for a
simple static page, SSL ate up a ton of resources.

Regardless of the application, a 450mhz CPU can only handle 3-5
concurrent requests reliably. The basic formula I go by is this.

500mhz - 250 ssl signatures per second

since SSL scales linearly, you just multiply by the mhz or number of CPU.

250 x 4 = 1000 ssl signatures per second for a 2ghz cpu

Now to figure out what that means in terms of requests/second, all you
have to do is figure out how many requests a page view is. So say I
have a page with 9 images. that means the first time the page is
requested, there's 10 requests total.

250 signature/second / 10 signatures/request = 25 requests /second

25 SSL requests/second is the theoritical maximum for a 450-500mhz
CPU. When  you take concurrent requests into account, it roughly
translates to 3-5 concurrent requests depending on how many images are
on the page.

As far as I know, this is true of commercial tools like webBench,
mercury and others.  So how do people test SSL?  there's really only 2
practical approaches.

1. have a ton of clients and have 3-5 threads per machine
2. use a SSL enabled router to decrypt the traffic, though you'd need
2 of them to test effectively.

What big sites like amazon, buy.com and the others do is use Network
Attached SSL. The webservers only handle HTTP traffic and the SSL is
done at the router. If you need to scale SSL, I would recommend going
with that approach.  Using software SSL will mean your production
environment will need to have 30-40 servers to handle moderate SSL
traffic for a small e-commerce site.  Back before Netledger was bought
out by Oracle, they had over 400 machines to handle the traffic. Once
they got hardware accelerator and hooked it up, their performance
improved 3-5x.

I hope that helps

peter


On 5/11/05, eswift@loopone.com <es...@loopone.com> wrote:
> I'm not sure I understand what you're saying here.  How in the world are
> you supposed to load test a secure web application if this is the case?  I
> don't see how testing a secure application can be so much more memory
> intensive for jmeter than a non-secure web application.  I am using a
> dual-processor server with plenty of power to run jmeter.  Is there
> nothing I can do to reduce the amount of memory the script is using so
> that jmeter won't crash?
> 
> Is it possible that something with the way my script is handling SSL could
> be the culprit?
> 
> Elli
> 
> > HTTPS is a tremendous CPU hog and will eat up plenty of RAM.  In
> > general, a 2ghz CPU will max out with 20 concurrent HTTPS requests. More
> > than that, you're not really stressing the server.
> >
> > if you really need to test HTTPS, I would recommend keeping each
> > client machine to 10 threads. Most of the sites that require heavy HTTPS
> > use hardware accelerators.  I personally don't recommend using software
> > HTTPS if the expected HTTPS load is more than 10-15
> > concurrent.
> >
> > for example, a 450mhz P3 can reliably handle 3-5 concurrent requests.
> > More than that the server will crash. this is primarily a hardware and
> > IO limitation.
> >
> > peter lin
> >
> >
> > On 5/10/05, Elli Swift <es...@loopone.com> wrote:
> >> Hi all,
> >>
> >> I am load testing an HTTPS application and I'm continually running
> >> into this out of memory error:
> >>
> >> [GCException java.lang.OutOfMemoryError: requested 8208 bytes
> >>
> >> The garbage collection comes along but just doesn't seem to be
> >> clearing out enough room.  I have increased the heap size to 1024, I'm
> >> running jmeter on a server with almost 6GB of RAM, I have no listeners
> >> in my test, I'm running in non-gui mode and I'm only running a test
> >> with 25 users looping 4 times through (it dies almost immediately
> >> after the second loop finishes).
> >>
> >> I created my script using the HTTP proxy server (I was able to disable
> >> HTTPS in order to record the script) and I noticed that it recorded
> >> quite a few things in each of the Browser-derived headers for each
> >> HTTP request. (If-None-Match, Referer, Host, Accept-Language,
> >> User-Agent,
> >> If-Modified-Since, and Accept).  Could any of these be using up
> >> unnecessary resources?
> >>
> >> This truly puzzles me, as we were able to create a load test script
> >> for one of our other (non-HTTPS) applications and fire off close to
> >> 250 or 300 users and leave it running for hours without any problems.
> >> Any suggestions would be very helpful!!
> >>
> >> Elli
> >>
> >>
> >
> > --------------------------------------------------------------------- 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: Out of memory error

Posted by es...@loopone.com.
I'm not sure I understand what you're saying here.  How in the world are
you supposed to load test a secure web application if this is the case?  I
don't see how testing a secure application can be so much more memory
intensive for jmeter than a non-secure web application.  I am using a
dual-processor server with plenty of power to run jmeter.  Is there
nothing I can do to reduce the amount of memory the script is using so
that jmeter won't crash?

Is it possible that something with the way my script is handling SSL could
be the culprit?

Elli

> HTTPS is a tremendous CPU hog and will eat up plenty of RAM.  In
> general, a 2ghz CPU will max out with 20 concurrent HTTPS requests. More
> than that, you're not really stressing the server.
>
> if you really need to test HTTPS, I would recommend keeping each
> client machine to 10 threads. Most of the sites that require heavy HTTPS
> use hardware accelerators.  I personally don't recommend using software
> HTTPS if the expected HTTPS load is more than 10-15
> concurrent.
>
> for example, a 450mhz P3 can reliably handle 3-5 concurrent requests.
> More than that the server will crash. this is primarily a hardware and
> IO limitation.
>
> peter lin
>
>
> On 5/10/05, Elli Swift <es...@loopone.com> wrote:
>> Hi all,
>>
>> I am load testing an HTTPS application and I'm continually running
>> into this out of memory error:
>>
>> [GCException java.lang.OutOfMemoryError: requested 8208 bytes
>>
>> The garbage collection comes along but just doesn't seem to be
>> clearing out enough room.  I have increased the heap size to 1024, I'm
>> running jmeter on a server with almost 6GB of RAM, I have no listeners
>> in my test, I'm running in non-gui mode and I'm only running a test
>> with 25 users looping 4 times through (it dies almost immediately
>> after the second loop finishes).
>>
>> I created my script using the HTTP proxy server (I was able to disable
>> HTTPS in order to record the script) and I noticed that it recorded
>> quite a few things in each of the Browser-derived headers for each
>> HTTP request. (If-None-Match, Referer, Host, Accept-Language,
>> User-Agent,
>> If-Modified-Since, and Accept).  Could any of these be using up
>> unnecessary resources?
>>
>> This truly puzzles me, as we were able to create a load test script
>> for one of our other (non-HTTPS) applications and fire off close to
>> 250 or 300 users and leave it running for hours without any problems.
>> Any suggestions would be very helpful!!
>>
>> Elli
>>
>>
>
> --------------------------------------------------------------------- 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: Out of memory error

Posted by Peter Lin <wo...@gmail.com>.
HTTPS is a tremendous CPU hog and will eat up plenty of RAM.  In
general, a 2ghz CPU will max out with 20 concurrent HTTPS requests.
More than that, you're not really stressing the server.

if you really need to test HTTPS, I would recommend keeping each
client machine to 10 threads. Most of the sites that require heavy
HTTPS use hardware accelerators.  I personally don't recommend using
software HTTPS if the expected HTTPS load is more than 10-15
concurrent.

for example, a 450mhz P3 can reliably handle 3-5 concurrent requests.
More than that the server will crash. this is primarily a hardware and
IO limitation.

peter lin


On 5/10/05, Elli Swift <es...@loopone.com> wrote:
> Hi all,
> 
> I am load testing an HTTPS application and I'm continually running into this
> out of memory error:
> 
> [GCException java.lang.OutOfMemoryError: requested 8208 bytes
> 
> The garbage collection comes along but just doesn't seem to be clearing out
> enough room.  I have increased the heap size to 1024, I'm running jmeter on
> a server with almost 6GB of RAM, I have no listeners in my test, I'm running
> in non-gui mode and I'm only running a test with 25 users looping 4 times
> through (it dies almost immediately after the second loop finishes).
> 
> I created my script using the HTTP proxy server (I was able to disable HTTPS
> in order to record the script) and I noticed that it recorded quite a few
> things in each of the Browser-derived headers for each HTTP request.
> (If-None-Match, Referer, Host, Accept-Language, User-Agent,
> If-Modified-Since, and Accept).  Could any of these be using up unnecessary
> resources?
> 
> This truly puzzles me, as we were able to create a load test script for one
> of our other (non-HTTPS) applications and fire off close to 250 or 300 users
> and leave it running for hours without any problems.  Any suggestions would
> be very helpful!!
> 
> Elli
> 
>

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