Just an aside on that, it seems that Java can only open 2000 sockets so
you will be limited there. That doesn't depend on available hardware. I
get around that by executing multiple JVM's on the same machine. It
works like a charm.

Cheers Oliver 

-----Original Message-----
From: sebb [mailto:[EMAIL PROTECTED] 
Sent: Wednesday, 9 May 2007 21:52
To: JMeter Users List
Subject: Re: maximum number of threads per JMeter instance

There is no documentation, because there is no fixed limit - it depends
on the test plan, OS, JVM, hardware, network etc..

The only way to determine the limit is to try.  For example, if it works
OK for a particular scenario with 10 threads but not with 15, then the
limit is somewhere between 10 and 15.

Having said that, 2000 or more threads is a pretty large number, so I'm
not entirely surprised that there are memory problems. Some OSes have
limits to the number of open sockets, even if memory is not a problem.

That number of threads is also potentially a huge load on whatever
server is under test - do you really need to run with 7000 threads?

As a work-round:
- use non-GUI mode
- remove all but one listener
- use CSV output
- minimise assertions
- use multiple independent jobs, and combine the results.

On 09/05/07, Sonam Chauhan <[EMAIL PROTECTED]> wrote:
> Hi -
>
>
>
> Can someone point me to documentation on the maximum number of threads

> a single JMeter instance can handle? (I cannot find this information 
> on Google or the wiki.)
>
>
>
> I have a problem with a testcase that has a large number of threads - 
> it has 2 thread groups with 2000 and 5000 threads each. On a Windows 
> XP SP2 system with 2GB of RAM, java.exe grows to about 350MB before 
> throwing this exception:
>
> -------------------------
>
> Exception in thread "Thread-1" java.lang.OutOfMemoryError: unable to 
> create new native thread
>
>        at java.lang.Thread.start0(Native Method)
>
>        at java.lang.Thread.start(Thread.java:574)
>
>        at
> org.apache.jmeter.engine.StandardJMeterEngine.run(StandardJMeterEngine
> .j
> ava:387)
>
>        at java.lang.Thread.run(Thread.java:595)
>
> -------------------------
>
>
>
> The JMeter version is 2.1.1 and the Java version is "1.5.0_10"
>
> -------------------------
>
> Java(TM) 2 Runtime Environment, Standard Edition (build 1.5.0_10-b03)
>
> Java HotSpot(TM) Client VM (build 1.5.0_10-b03, mixed mode)
>
> -------------------------
>
>
>
> I tried tweaking two JMeter run script settings: HEAP and NEW. I 
> started small, and increased the numbers proportionally up until 
> Xmx=1024m but it was little use - the more I increased HEAP size, the 
> faster I got the outOfMemory errors.
>
>
>
> I also came across some interesting information here about the maximum

> number of threads per process:
>
>
> http://blogs.msdn.com/oldnewthing/archive/2005/07/29/444912.aspx
>
> I tried using '-Xss128k' to reduce stack size per Java thread, but 
> that did not help either.
>
>
>
> Kind regards,
>
> Sonam Chauhan
>
> --
>
> Corporate Express Australia Ltd.
>
> Phone: +61-2-93350725, Email: [EMAIL PROTECTED]
>
>
>
>

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


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

Reply via email to