unable to create new native thread error

classic Classic list List threaded Threaded
4 messages Options
Reply | Threaded
Open this post in threaded view
|

unable to create new native thread error

prateekgommt
Hi,


I am trying to give load of 1Lacs user from command line mode of
Jmeter (  -Jthreads=120000 -Jramp=1 -Jloop=1 -)  set up on Aws machine
( single machine) using the  basic thread group using constant
throughput timer to achieve throughput of  1Lac rpm. But while running
the script getting this below error...


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


I've configured *setenv.sh* file in *bin* folder as :


*export HEAP="-Xms1024m -Xmx8g -XX:MaxMetaspaceSize=256m"*




Is there any other changes which are required from my end to done in
any file in Jmeter to solve this error  ? pls help.

--


::DISCLAIMER::


----------------------------------------------------------------------------------------------------------------------------------------------------





This message is intended only for the use of the addressee and may
contain information that is privileged, confidential and exempt from
disclosure under applicable law. If the reader of this message is not the
intended recipient, or the employee or agent responsible for delivering the
message to the intended recipient, you are hereby notified that any
dissemination, distribution or copying of this communication is strictly
prohibited. If you have received this e-mail in error, please notify us
immediately by return e-mail and delete this e-mail and all attachments
from your system.
Reply | Threaded
Open this post in threaded view
|

Re: unable to create new native thread error

Ivan Rancati-3
hi,

does this line
  -Jthreads=120000 -Jramp=1
mean creating 120.000 Threads?
That would be a extremely high load on the jMeter host (both cpu and
memory), regardless of the ramp up time (not sure how you read the "ramp"
property from your script, but sure it can't be one second).

jmeter.log might give you an idea of how many threads are actually created
before the oom happens.

best regards,
Ivan

On Tue, Mar 12, 2019 at 1:02 PM Prateek Dua <[hidden email]> wrote:

> Hi,
>
>
> I am trying to give load of 1Lacs user from command line mode of
> Jmeter (  -Jthreads=120000 -Jramp=1 -Jloop=1 -)  set up on Aws machine
> ( single machine) using the  basic thread group using constant
> throughput timer to achieve throughput of  1Lac rpm. But while running
> the script getting this below error...
>
>
> *Uncaught Exception java.lang.OutOfMemoryError: unable to create new
> native thread. See log file for details*
>
>
> I've configured *setenv.sh* file in *bin* folder as :
>
>
> *export HEAP="-Xms1024m -Xmx8g -XX:MaxMetaspaceSize=256m"*
>
>
>
>
> Is there any other changes which are required from my end to done in
> any file in Jmeter to solve this error  ? pls help.
>
> --
>
>
> ::DISCLAIMER::
>
>
>
> ----------------------------------------------------------------------------------------------------------------------------------------------------
>
>
>
>
>
> This message is intended only for the use of the addressee and may
> contain information that is privileged, confidential and exempt from
> disclosure under applicable law. If the reader of this message is not the
> intended recipient, or the employee or agent responsible for delivering
> the
> message to the intended recipient, you are hereby notified that any
> dissemination, distribution or copying of this communication is strictly
> prohibited. If you have received this e-mail in error, please notify us
> immediately by return e-mail and delete this e-mail and all attachments
> from your system.
>
Reply | Threaded
Open this post in threaded view
|

Re: unable to create new native thread error

glinius@live.com
In reply to this post by prateekgommt
The error looks like an  OS level limitation
<https://www.networkworld.com/article/2693414/setting-limits-with-ulimit.html>  
of the number of processes so you need to amend underlying operating system
configuration in order to allow at least that many processes as virtual
users.

See  Maximum number of processes in linux
<https://stackoverflow.com/questions/9361816/maximum-number-of-processes-in-linux>  
for more details.

Given the number of virtual users you're trying to simulate it makes more
sense to go for  distributed testing
<https://www.blazemeter.com/blog/how-to-perform-distributed-testing-in-jmeter>  
as my expectation is that investing into a couple of AWS machine would be
much cheaper than the time and effort you will spend by trying to conduct
this load using a single host.  



--
Sent from: http://www.jmeter-archive.org/JMeter-User-f512775.html

---------------------------------------------------------------------
To unsubscribe, e-mail: [hidden email]
For additional commands, e-mail: [hidden email]

Reply | Threaded
Open this post in threaded view
|

Re: unable to create new native thread error

shettyd
In reply to this post by prateekgommt
In additions to what others have said (this is not a heap problem), your
calculation looks off
You want 100,000 requests per minute. Assuming on average that a request =
5 seconds (for e.g.) , a single thread would be able to generate 12
requests (no think times etc). That would need only ~10,000 threads (plus
some safety) . You only need these many threads if you have large think
times or your application is really slow.


On Tue, Mar 12, 2019 at 5:02 AM Prateek Dua <[hidden email]> wrote:

> Hi,
>
>
> I am trying to give load of 1Lacs user from command line mode of
> Jmeter (  -Jthreads=120000 -Jramp=1 -Jloop=1 -)  set up on Aws machine
> ( single machine) using the  basic thread group using constant
> throughput timer to achieve throughput of  1Lac rpm. But while running
> the script getting this below error...
>
>
> *Uncaught Exception java.lang.OutOfMemoryError: unable to create new
> native thread. See log file for details*
>
>
> I've configured *setenv.sh* file in *bin* folder as :
>
>
> *export HEAP="-Xms1024m -Xmx8g -XX:MaxMetaspaceSize=256m"*
>
>
>
>
> Is there any other changes which are required from my end to done in
> any file in Jmeter to solve this error  ? pls help.
>
> --
>
>
> ::DISCLAIMER::
>
>
>
> ----------------------------------------------------------------------------------------------------------------------------------------------------
>
>
>
>
>
> This message is intended only for the use of the addressee and may
> contain information that is privileged, confidential and exempt from
> disclosure under applicable law. If the reader of this message is not the
> intended recipient, or the employee or agent responsible for delivering
> the
> message to the intended recipient, you are hereby notified that any
> dissemination, distribution or copying of this communication is strictly
> prohibited. If you have received this e-mail in error, please notify us
> immediately by return e-mail and delete this e-mail and all attachments
> from your system.
>