G'day

The 'problem' is that your 250 threads are probably legitimately using the
1G of heap you have provided.

But there are several things you should do:

1. Firstly check that the JVM process is in fact getting 1G of heap space -
just watch the JVM process memory usage. If process is using something over
1G at the point of failure then you have effectively provided 1G of heap
space. If its not using something over 1G then review how you call for 1G of
heap space i.e. whether how you set the heap parameters is actually working.

2. I take it for granted that you have 1G of memory plus enough for the
operating system (presuming Windows) plus some for the other parts of the
JVM - probably 1.5 to 2G.

3a. Assuming the above are okay then run JMeter with 50 threads and obtain
the steady state amount of memory used by the JVM.

3b. Do the same again with 150 threads.

3c. Take the difference between the two and divide by the extra threads (100
in this case). This will give you the amount of memory used per thread. This
will give you an indication of how big to make your heap.

4. In all probability 3c will give you an answer that is too big for your
machine either because it doesn't have that much memory and/or your Java
installation is 32 bit and you can only have 2G of heap memory. Your options
then are to go to distributed testing, using enough machines (probably
around 20) to run all the threads and/or increase the memory on the box and
install a 64 bit version of Java (if it available for your machine).
Probably you will have to go for distributed testing.

5. 4. isn't as bad as it sounds because you would need a very strong machine
to run 5,000 threads (assuming a think time of a small number of seconds or
less). Even if you had enough memory on your current machine you probably
wouldn't have enough CPU to run 5,000 threads. The operating system might
also need not be able to support 5,000 concurrent threads.





Ian Blavins
Contract Performance Engineer
Temenos

-----Original Message-----
From: jada [mailto:[EMAIL PROTECTED] 
Sent: 29 August 2007 17:23
To: [email protected]
Subject: OutOfMemoryError


Hello,

I have a test plan with Number of Threads = 5000. Each thread will send an
HTTP request to a JSP which queries data from an Oracle database.

When the #Samples reaches around 250, the JMeter console displays this
message:

------------------------------
java.lang.OutOfMemoryError: unable to create new native thread
        at java.lang.Thread.start(Native Method)
        at
org.apache.jmeter.engine.StandardJMeterEngine.run(StandardJMeterEngine.java:
400)
        at java.lang.Thread.run(Unknown Source)
------------------------------

The jmeter.bat has been configured with

set HEAP=-Xms1024m -Xmx1024m
set NEW=-XX:NewSize=256m -XX:MaxNewSize=256m

I'm using JMeter 2.2 and have tried 2.3RC3 with no luck. What could be the
problem? Memory leak somewhere in JMeter or the Web App? How can you debug
this?

Please advise.

Jada
-- 
View this message in context:
http://www.nabble.com/OutOfMemoryError-tf4348833.html#a12390604
Sent from the JMeter - User mailing list archive at Nabble.com.


---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]




This email (and any attachments) contains confidential information, and is 
intended 
only for the named recipient. Distribution or copying of this email by anyone 
other than the named recipient is prohibited. If you are not the named or 
intended recipient, please notify TEMENOS or the sender immediately and 
permanently destroy this email (and any attachments) and all copies of it. No 
member of TEMENOS Group AG or any of its associated or affiliated companies is 
liable for any errors or omissions in the content or transmission of this 
email. Any opinions contained in this email are solely those of the author and, 
unless clearly indicated otherwise in writing, are not endorsed by any member 
of TEMENOS Group AG or any of its associated and affiliated companies. 


---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to