1

Can anyone please help me out here ? If I am not using some modules as part of our application development , is it mandatory to have all modules extensions in standalone.xml ? If not , what is benefit we will get if we remove some unused modules and there extensions like I want to remove module="org.jboss.as.ejb3" , module="org.jboss.as.jsf" ,etc. If I clean my standalone.xml Is there any benefit I will get with respect to application performance and memory ?

Pathak
  • 183
  • 5
  • 21
  • 1
    Keep life simple and don't worry about it. There will be no difference in performance (EJBs have been demonstrated to be faster than CDI anyway) and minimal (if any) memory impact. If it's really bugging you consider [WildFly Swarm](https://github.com/wildfly-swarm). – Steve C May 24 '17 at 00:19
  • Thanks a lot Steve, your comment is really helpful for me to understand . – Pathak May 24 '17 at 07:16
  • The only possible performance you'd get would be during deployment. However I think it would be very small. The memory footprint probably wouldn't be that significant of a change either. – James R. Perkins May 24 '17 at 16:16
  • Thanks James , you are right and It is really helpful for to proceed further.. – Pathak May 25 '17 at 05:01

1 Answers1

1

Wildfly uses modular architecture, using submodules and services as feature blocks. Some are started eagerly i.e. even if your app does not need them, some are lazy i.e. they will no be initialized unless some deployment requests them(You can observe it in the server log after your server boots up).
The startup process is asynchronous and hence should be relatively fast on any reasonable hardware. That being said, nothing stops you from creating your own profile or distribution with just the submodules you need(you can for example remove everything but servlet subsystem if that is the only api you need, or remove all javaee subsystems and just use undertow as loadbalancer). However unless you are really working in a very restricted environment - where disk space or memory is very limited, I do not think it is worth spending your time on. In any real world scenario, your App memory requirements will make server overhead negligible.
First focus on your app and then (if you still need it) spent time on server tuning. Chances are, the default Wildfly config will work just fine:)
Happy hacking

yntelectual
  • 3,028
  • 18
  • 24
  • Thanks a lot Yntelectual for such a brief explanation. – Pathak May 30 '17 at 06:31
  • Just stopped here while searching a solution to figure out unused modules. I totally agree with you there is no need to spend a lot of time trying to slim JBoss/Wildfly from default which just works fine. One practical reason I have seen to for this exercise is for security. Make the attack surface smaller and to reduce the risk by removing buggy outdated modules being loaded into production systems. – NIK Apr 20 '21 at 07:14
  • yes, if have a chance to use newer versions of Wfly do have a look at Galleon - it allows you to create your custom Wildfly distribution using feature packs as building blocks, so you can omit the modules you wont need. – yntelectual Apr 20 '21 at 07:37