Thanks guys -- The last point about thread pools got me thinking. My thread groups had iterations = 1 as this is a simple way to ensure the test threads complete within a given timeframe.
But reducing the number of threads and (a) proportionally increasing thread group iteration count, and (b) proportionally reducing ramp time, should give me what I need. There are still some tricky issues around delay timings to contend with, but in this particular case, they should be manageable. Kind regards, Sonam Chauhan -- Corporate Express Australia Ltd. Phone: +61-2-93350725, Email: [EMAIL PROTECTED] -----Original Message----- From: Sonam Chauhan [mailto:[EMAIL PROTECTED] Sent: Thursday, 10 May 2007 10:34 AM To: JMeter Users List Cc: Kolappan Pillai Subject: RE: maximum number of threads per JMeter instance Ian, Sebb - Thank you very much for your inputs. Regarding the test scenario, I need these many threads (7000) for performance testing EAI middleware - each thread 'publishes' a transaction into the EAI system, and the tracks delivery to the transaction 'subscribers' after sleeping the appropriate delays. Not all the 7000 threads are concurrent since there's a ramp applied, but I guess about 3000-4000 are active at a time. I think, that for my setup, the maximum active threads per JMeter instance is probably about 2000 threads. More threads seem constrained - not by heap memory, but stack memory used creating native system threads _outside_ JVM-allocated memory going outside the Windows 2GB limit (from what I've read, each thread is allocated 1 MB of stack space for Java 1.5 on Intel). To achieve 4000 active threads it looks like my only option is distributed testing since the Xss parameter doesn't seem to have any effect. Out of curiosity, would having thread pools in JMeter help in this case? Kind regards, Sonam Chauhan -- Corporate Express Australia Ltd. Phone: +61-2-93350725, Email: [EMAIL PROTECTED] -----Original Message----- From: sebb [mailto:[EMAIL PROTECTED] Sent: Wednesday, 9 May 2007 7:52 PM 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] --------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]

