While running apache-jmeter test on single docker container I am facing below issue.
[489.013s][warning][os,thread] Failed to start thread - pthread_create failed (EAGAIN) for attributes: stacksize: 1024k, guardsize: 0k, detached. Uncaught Exception java.lang.OutOfMemoryError: unable to create native thread: possibly out of memory or process/resource limits reached. See log file for details.
I am not able to generate Load beyond 2k concurrency. Even though in distributed mode on same docker host I am easily achieving 5k users concurrency. It seems single docker container is not fully utilizing CPU and memory available to it.
Below are the configurations:
- RAM of server - 90GB
- No of CPU - 16
- Ulimit of container (ulimit -n) - 1048576
- Java - open jdk-14
- JVM arguments - -Xms80G -XMX80G
it means that you cannot create more than 2000 threads on your operating system level, check what
ulimit -uandulimit -Tcommands produce and if you see something around 2000 there - this is the setting you need to blame.Also your Heap allocation seems way to high to me for 2000/5000 virtual users, you don't need to allocate all your physical RAM to JVM, you need to tune your JVM.
More information: