Skip to main content

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [List Home]
Re: [leshan-dev] Running in to OutOfMemoryError: unable to create new native thread while scale testing

Hi,

3500?
Do start a java vm with the leshan client 3500 times?
Or do you have a leshan multi-client?  
I use in californium a "single java vm, multi client" approach and reduce the thread counts to

NETWORK_STAGE_RECEIVER_THREAD_COUNT = 1
NETWORK_STAGE_SENDER_THREAD_COUNT = 1
PROTOCOL_STAGE_THREAD_COUNT = 1

This "works" with 3000 californium clients and 2 GB java heap.

(See californium, cf-extplugtest-client BenchmarkClient.)

Mit freundlichen Grüßen / Best regards 

Achim Kraus

(INST/ECS4) 
Bosch Software Innovations GmbH | Stuttgarter Straße 130 | 71332 Waiblingen | GERMANY | http://www.bosch-si.com 

Sitz: Berlin, Registergericht: Amtsgericht Charlottenburg; HRB 148411 B
Aufsichtsratsvorsitzender: Dr.-Ing. Thorsten Lücke; Geschäftsführung: Dr. Stefan Ferber, Michael Hahn



From: leshan-dev-bounces@xxxxxxxxxxx [mailto:leshan-dev-bounces@xxxxxxxxxxx] On Behalf Of Bhonde, Jyotsna
Sent: Mittwoch, 21. März 2018 01:49
To: leshan-dev@xxxxxxxxxxx
Subject: [leshan-dev] Running in to OutOfMemoryError: unable to create new native thread while scale testing

Hi 

We are scale testing. Our simulator is in Azure and what we have noticed is that we get following exception when we have about 3500 leshan simulators. 

                EXCEPTION:OutOfMemoryError: unable to create new native thread
                                java.lang.OutOfMemoryError: unable to create new native thread
                                java.lang.Thread.start0(Native Method)
                                java.lang.Thread.start(Thread.java:717)
                                org.eclipse.californium.elements.UDPConnector.start(UDPConnector.java:169)
                                org.eclipse.californium.core.network.CoapEndpoint.start(CoapEndpoint.java:418)
                                org.eclipse.californium.core.CoapServer.start(CoapServer.java:215)
                                org.eclipse.leshan.client.californium.LeshanClient.start(LeshanClient.java:173)
                                ....
                                ....
                                
Has anybody come across this problem and any suggestions on how to go about resolving this problem? 

Available memory to the container is 25gb ram and it has used up 10gb.

Settings at the docker engine level are are follows:

                / # ulimit -a
                -f: file size (blocks)             unlimited
                -t: cpu time (seconds)             unlimited
                -d: data seg size (kb)             unlimited
                -s: stack size (kb)                8192
                -c: core file size (blocks)        0
                -m: resident set size (kb)         unlimited
                -l: locked memory (kb)             82000
                -p: processes                      unlimited
                -n: file descriptors               1048576
                -v: address space (kb)             unlimited
                -w: locks                          unlimited
                -e: scheduling priority            0
                -r: real-time priority             0

I was looking in to tweaking these properties: NETWORK_STAGE_RECEIVER_THREAD_COUNT and NETWORK_STAGE_SENDER_THREAD_COUNT in californium.properties. But I don't think that will help much since it seems the resource issue is at the system level.

Thanks
J.
________________________________________
NOTICE OF CONFIDENTIALITY: 
This message may contain information that is considered confidential and which may be prohibited from disclosure under applicable law or by contractual agreement. The information is intended solely for the use of the individual or entity named above. If you are not the intended recipient, you are hereby notified that any disclosure, copying, distribution or use of the information contained in or attached to this message is strictly prohibited. If you have received this email transmission in error, please notify the sender by replying to this email and then delete it from your system.


Back to the top