This week's book giveaway is in the Servlets forum.
We're giving away four copies of Murach's Java Servlets and JSP and have Joel Murach on-line!
See this thread for details.
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


Win a copy of Murach's Java Servlets and JSP this week in the Servlets forum!
JavaRanch » Java Forums » Products » Tomcat
Bookmark "Server Mode vs Client Mode" Watch "Server Mode vs Client Mode" New topic
Author

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?

Thanks
Tim Holloway
Saloon Keeper

Joined: Jun 25, 2001
Posts: 15951
    
  19

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/setenv.sh (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.


Customer surveys are for companies who didn't pay proper attention to begin with.
Kees Jan Koster
JavaMonitor Support
Rancher

Joined: Mar 31, 2009
Posts: 251
    
    5
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 http://java-monitor.com/forum/showthread.php?t=552, 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: http://aspose.com/file-tools
 
subject: Server Mode vs Client Mode
 
Similar Threads
server/alone command line
View the objects which are getting stored in permgen and total non heap space
For loop performance in windows vs linux
Design issue with Server
SCJD assignment changed!