Win a copy of The Java Performance Companion this week in the Performance forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

Server Mode vs Client Mode

 
Kerry Baer
Ranch Hand
Posts: 39
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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
Pie
Posts: 18212
53
Android Eclipse IDE Linux
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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.
 
Kees Jan Koster
JavaMonitor Support
Rancher
Posts: 251
5
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic