File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
The moose likes Tomcat and the fly likes Server Mode vs Client Mode Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Products » Tomcat
Bookmark "Server Mode vs Client Mode" Watch "Server Mode vs Client Mode" New topic

Server Mode vs Client Mode

Kerry Baer
Ranch Hand

Joined: Jun 23, 2010
Posts: 39
I've been digging around trying to get more information about this and haven't found a decent source yet. So I thought I would try here.

I am getting the impression that running Tomcat in Server Mode is recommended.

What are the benefits of running in Server Mode compared to Client?

How do I can I check which mode Tomcat is currently running on my servers?

Tim Holloway
Saloon Keeper

Joined: Jun 25, 2001
Posts: 17421

Client and Server mode are JVM startup options. Basically, they're 2 different optimization strategies, with Client mode being geared towards fast application startup and Server mode being geared towards long-term performance.

Actually, last time I looked, I think that Tomcat was starting up by default in Client mode, which is simply the default Sun/Oracle JVM startup mode. But you should be able add an entry to bin/ (or .bat) and override that.

The difference between the modes isn't usually going to kill you if you start under the "wrong" mode. Presumably the JVM is going to adapt as it sees how it's being used.

An IDE is no substitute for an Intelligent Developer.
Kees Jan Koster
JavaMonitor Support

Joined: Mar 31, 2009
Posts: 251
Dear Kerry and Tim,

Actually, the difference is huge. The server VM is about twice as fast as the client VM in my experience. In fact, newer JVMs are shipped without the client VM completely. You can find more about this on, scroll down to the executive summary if you don't want that whole reading thing.

Tomcat by default leaves the JVM to decide for itself. On machines with limited RAM and only one CPU it will default to the client VM.

Kees Jan

Java-monitor, JVM monitoring made easy <- right here on Java Ranch
I agree. Here's the link:
subject: Server Mode vs Client Mode
jQuery in Action, 3rd edition