hvgotcodes
hvgotcodes

Reputation: 120298

Jmeter questions for newb

So I need to peg a system with several thousand long polling requests.

I created a thread group with the requisite number of requests. A few things confuse me.

(Im on a mac)

  1. I run the jmeter.sh script to start the gui. I cant run the test unless I run jmeter-server. Without it I get a "cannot connect to 127.0.0.1..." message. The docs don't mention needing to start this script up.

  2. In the jmeter.sh script I set the max memory to export JVM_ARGS="-Xms4096m -Xmx4096m". Nonetheless, whenever I start running the test I immediately see

Uncaught Exception java.lang.OutOfMemoryError: unable to create new native thread. See log file for details.

  1. I tried running my test headless and it didn't get better; it gets thru roughly 2k requests before just stopping. I was hoping for about 40-50k threads (i.e. requests). I cant reuse threads (that I know of) as this long polling so the requests block until something causes them to release.

Any advice? Thanx in advance.

Upvotes: 0

Views: 167

Answers (1)

TechTrip
TechTrip

Reputation: 4537

This doesn't make sense. you shouldn't need to run jmeter-server unless you have a need to run meter in server mode, say with remote engines.

Depending on the version of java you are running you are likely exceeding the memory space available to the JVM used by jmeter. Not sure why you are allocating 4 GB. You should be fine with 512M or perhaps 1024M. I have found that Jmeter can tend to leak over time anyway.

Your headless test should give you an indication that you are either running out of memory or thread space with Jmeter or perhaps, and more likely, you are overburdening your server, probably exhausting the thread pool.

First thing I would do is change the memory to something more conservative, say -Xms1024m -Xmx1024m. Also, 40-50k requests is not 40-50k threads. They are concepts that work with each other but are not necessarily the same thing. So perhaps you are setting something up in Jmeter destined to fail by creating too many concurrent threads.

Upvotes: 1

Related Questions