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?
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
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.
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)
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.
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.