0
votes

I am a java developer. My hard time i have to improve performance in production box when 150 concurrent users hits our application(app is deployed in weblogic server).

Our production system is configured with 4 JVM, 2 clustors. i found that each JVM has 12 processors(i am not sure, may be 3 per box, totally 12 processors).

Presently we deployed our JEE application in that weblogic which uses default thread pool. Weblogic version is 10.x. I know that, after version 8.1 we can't change the thread size of default threadpool(work manager). Problem we are getting is our application works perfectly when 20 concurrent users hits our server(4 JVMs). i see there are 8 threads created for each JVM and i assume there are 24 threads services the concurrent user request(totally 4 box, so 24 threads). But we need to support totally 600 request and 150 request per JVM(load balancer helps us here). But the problem is instead of handling all the request in the avg time of 300 ms it takes 8000 ms. it hurts us.

To fix this i created a work manager with 75 threads and assigned to my application and i see the performance is imported significantly. Note: there are 20 applications are deployed in the same weblogic. if i use 75 threads for my application how it will affect other application?

advice me on this to handle 150 request without any lag.

1

1 Answers

2
votes

The limit of the number of threads is based on you host machine and not your JVM. You can check the limit your host can handle using this cat /proc/sys/kernel/threads-max from this article. Maximum number of threads per process in Linux?

Now once you know your limit, you can use this to fine tune your server to use a specified number of threads. http://docs.oracle.com/cd/E13222_01/wls/docs81/perform/WLSTuning.html#1140013

Work managers do not provide you a max number of threads. They cap the max that can be. This is for applications having a long thread life and consuming more resources when they start having stuck threads. In theory, you have infinite amount of threads. My suggestion is to go with increasing the value as mentioned in the config.xml and find your sweet spot. If you are not able to achieve it with 4 JVMs, it would be much wiser to request for 2 more JVMs. Some things can just not be done by software alone.