views:

124

answers:

3

What is the difference between server and client Hotspot. Is there any reason to switch production environment to -server. Please share your practical experience. Is there any performance boost? Related to Oracle UCM 10g

A: 

The server VM collects stats for a longer time than the client VM before converting Java bytecode to native code. A bit more here: http://java.sun.com/j2se/1.3/docs/guide/performance/hotspot.html#server

David Soroko
+1  A: 

Yes, there can be a huge performance boost in some cases. When benchmarking my Protocol Buffers implementation, I was comparing it against the Java implementation - and I was really pleased, until I switched on -server... and saw the Java performance double. I don't know the details of everything it does, but basically it lets the JIT work harder, as it expects the code to be running for longer.

I wouldn't expect that to be the case in every application of course, but it can make a big difference. Of course, it won't have much effect unless your application is already CPU-bound on the JVM. I have no experience with Oracle UCM, so couldn't say how much effect it will have on your specific use. Have you already performed appropriate analysis of where the bottleneck in your system is?

Jon Skeet
Yes. There is some problems with database. But I need to know whether i need to switch our production site to server mode. I have no difference on my local environment, but production site works long hours and has a lot of concurrent requests
Artic
@Artsiom, if at all possible then do a profiling test. You then have actual data from your own situation. If performance is crucial, then also consider using IBM JVM or Oracle JRockit.
Thorbjørn Ravn Andersen