views:

1093

answers:

2

I have now 1gb ram at work(i hope that will change soon) and jboss takes almost half of it and that is too much, i turned off logging to file, what more can i do to reduce memory usage ?

+4  A: 

Which configuration are you using? JBoss comes with 3 standard server configurations

  • The minimal configuration starts the core server container without any of the enterprise services. It is a good starting point if you want to build a customized version of JBoss AS that only contains the services you need.
  • The default configuration is the mostly common used configuration for application developers. It supports the standard J2EE 1.4 and most of the Java EE 5.0 programming APIs (e.g., JSF and EJB3).
  • The all configuration is the default configuration with clustering support and other enterprise extensions.

If you only want a specific subset of JBoss services, then start with the minimal?

Or you can configure your own?

toolkit
In newer versions there is also a server configuration mentioned in the [documentation][docs] called 'web' which is somewhere between minimal and default - just enough to deploy and serve a WAR web app.[docs]: http://www.jboss.org/file-access/default/members/jbossas/freezone/docs/Installation_And_Getting_Started_Guide/5/html_single/index.html#The_JBoss_Server___A_Quick_Tour-Server_Configurations
Nick
+5  A: 

You can limit the maximum memory used using the -Xmx parameter, as in any java process. Edit the $JBOSS_HOME/bin/run.conf and set this parameter to the desired maximum memory you want to allocate to JBoss.

Also, you can remove from the deploy directory of the server configuration you are using, the services you are not using. To be sure about what files you must remove in order to remove unused services, check the documentation

Alexandre