-
1. Re: Problem in Multiple instance
peterj Apr 3, 2007 10:43 AM (in response to stanatbics)Change the JVM heap sizes (-Xmx setting) in the run script (run.bat on Windows, run.conf on Linux).
Looking at the current settings, they are already set to 512MB. That should be enough for a lot of deployed applications. Are you sure your applications do not have a memory leak; or do they perhaps place into memory a lot of data?
And just for clarification, you are talking about the JBoss Web Server, and not the JBoss Application Server? -
2. Re: Problem in Multiple instance
stanatbics Apr 3, 2007 10:57 AM (in response to stanatbics)Hi.. Peter
Thanks for the input
I have set the maximum heap size to 1024
And ensured that there is no memory leak..
Still.. the performance goes down..
And one clarification
What is the maximum number of threads jboss can handgle ? As it is specified in server.xml, in deploy folder..
I want to edit and set to the maximum number of threads.
And I just want to ensure the servlet threads which are opening when hitting any pages, are closed .
Note: we are using action servlet and velocity servlet
Regards..
Stan -
3. Re: Problem in Multiple instance
peterj Apr 3, 2007 11:12 AM (in response to stanatbics)The recommendation i have seen is to not set maxThreads to more than 400, too many threads causes to much context switching in the processor(s) which can slow things down. You can also use acceptCount to queue requests if all of the threads are busy (the default is 10 for App Server, not sure if it is the same for Web Server). Between those two, you should be able to handle thousands of users.
-
4. Re: Problem in Multiple instance
stanatbics Apr 3, 2007 11:29 AM (in response to stanatbics)Hi.. Peter..
This is absolutely great..
We have tested with one testing tool..
If the thread goes beyond 404 threads.. It throws some exception
How can I ensure the servlet threads which are opening when hitting any pages, are closed.
Do I have to destroy the servlet in coding..
Note: I am using action servlet(Struts) and velocity view servlet (Velocity)
Regards..
Stan -
5. Re: Problem in Multiple instance
peterj Apr 3, 2007 12:43 PM (in response to stanatbics)The threads are kept in a pool. When a request comes in, a thread is allocated to the request. Once the response is sent back, the thread is placed back into the pool and made available for for another request. There is nothing you have to do within the servlet, this is all automatic. Of course, if you have servlets that run a long time before responding, once 400 of them are running you will be out of threads.
You can see some tuning suggestions at http://wiki.jboss.org/wiki/Wiki.jsp?page=SPECjAppServer2002Tuning, specifically the sections on tuning the JVM and the app server. Yes, those recommendations are for a specific benchmark, but many of the concepts are general and can be applied to any application.
Another reference is http://wiki.jboss.org/wiki/Wiki.jsp?page=JBossASTuningSliming
If you need more help than this, I suggest you hire a consultant who specializes in tuning web applications. -
6. Re: Problem in Multiple instance
stanatbics Apr 4, 2007 12:55 AM (in response to stanatbics)Hi..Peter
Thanks for the reply.
The link JBossTuning gives more information.
We will try to work and see the performance of JBoss.
Thanks for the timely help.
Regards,
Stan