How should I set up the services for best performance?

The performance implications of running each of the services either in-process or out-of-process will depend on the use of that service.

Running the naming service in-process or out-of-process will have a negligible performance hit on applications which make little use of naming. Thus, a typical bean which only has its home registered in JNDI at startup will see little difference. However, if that same bean needs to lookup a JNDI name as part of its business logic, then the performance hit will be substantial. (Of course, you should be running only a single naming service per deployment, otherwise each instance of the naming service will contain only a portion of the named objects. Thus, if you run multiple containers, only one will be able to have the naming service in-process.)

In general, it is best to always run the JTS in-process, as this is heavily used. JNS can generally be run out-of-process with little impact. JDB should be run in-process, assuming you make much use of entity beans (and you are storing them in JDataStore; otherwise, there is no need for the -jdb flag in the first place). Finally, JSS could be run out-of-process, if EJBPassivationTimeout is fairly large. This is so the container is not continuously doing RPCs to passivate/activate stateful session beans. However, it is likely that you would best run it in-process.