Skip to main content

Java -server

15 replies [Last post]
oneguyks
Offline
Joined: 2008-04-28

java -server
Error: no `server' JVM at `C:\Program Files\Java\jre6\bin\server\jvm.dll'.

Can we end this problem on Windows system with the new consumer Jre? It's really annoying that you can't use -server flag without downloading JDK (or changing some other settings) on Windows.

Reply viewing options

Select your preferred way to display the comments and click "Save settings" to activate your changes.
mbien
Offline
Joined: 2007-04-29

@demonduck
sorry, but i think you simple don't want to understand.

linuxhippy
Offline
Joined: 2004-01-07

> Everybody wants faster. Conversely, who would want
> slower?

The question is however, what is "faster"?
Large swing applications can become very slow by using -server, not slow because processing is that slow, but because response time (time you do something until you get feedback) is simply bad with it.
The user does not care wether hotspot ran into an uncommon trap, because it optimized so aggressivly, and now fell back to interpreter until the next threshold is reached. The user just sees "stuttering" when using it and is unhappy.

Furthermore, there are scenarios where startup-time really matters. Sun has years of beeing bulled behind them because their JVM started up slow, especially for applets this _is_ really extremly important.
So you say 2s more are not important (until the whole app is initialized) - I bet there are thousands of developers thinking different.

This is the "I driver before others because I am important" analogy ;)

lg Clemens

demonduck
Offline
Joined: 2008-03-14

> > Everybody wants faster. Conversely, who would
> want
> > slower?
>
> The question is however, what is "faster"?
[stuff deleted]
> This is the "I driver before others because I am
> important" analogy ;)
>
> lg Clemens

I don't have a clue about what you are prattling on about. You want faster -- I want faster -- all Gods children want faster...

So make it faster...

linuxhippy
Offline
Joined: 2004-01-07

> I don't have a clue about what you are prattling on
> about. You want faster -- I want faster -- all Gods
> children want faster...

And thats the problem, you need define what is "fast" and what is "slow", you need to know what to optimize for.
Thats quite a good example what happens if you don't define whats fast: http://forums.java.net/jive/thread.jspa?threadID=41117&tstart=0

So yes, in a benchmark which runs for 30s, server is actually _slower_ than client, but the question is wether this matters at all.

lg Clemens

oneguyks
Offline
Joined: 2008-04-28

>Thats quite a good example what happens if you don't define whats fast: >http://forums.java.net/jive/thread.jspa?threadID=41117&tstart=0

>So yes, in a benchmark which runs for 30s, server is actually _slower_ than >client, but the question is wether this matters at all.

You continue to mistate what is in that other thread. What I said was that HotSpot (both -server and client) are twice slower than GCJ and JET in fannkuch benchmark. You mentioned that client is faster than server in fannkuch. I said no such thing.

In the regexdna, if using jregex package, -server is twice slower than client regardless of how long you run it, 30 seconds or 3 minutes.

oneguyks
Offline
Joined: 2008-04-28

>You're forgetting about the target market of the JRE.

The target market would prefer a faster JVM, I am sure. The startup time is not that much worse for serve rand most people have large memories. However, the difference in performance is large.

>server is included with the JDK, where it belongs

How about moving the client to JDK and giving everyone server? Everyone is happy then.

demonduck
Offline
Joined: 2008-03-14

Everybody wants faster. Conversely, who would want slower?

Trading off less memory use for something else that is not defined is not a convincing argument to me.

A good JVM design would support both modes -- if they are really different -- and use startup parameters or default configuration to pick the startup mode.

This is tilting at windmills...

mbien
Offline
Joined: 2007-04-29

The server vm is optimized for throughput and long running tasks not for startup time, footprint and low GC pauses what you like on the desktop.
The server vm profiles the interpreted bytecode before compiling and uses therefore a different compiler which takes longer and speeds up later compared to the client VM.

(its like a truck vs. car analogy)

There are plans to merge both VMs, google for tiered compilation. First the client then the server compiler is used to get the best of both at least in theory.

Take a look at the latest jdk7 builds and test the early access Tiered VM if you like.

demonduck
Offline
Joined: 2008-03-14

> The server vm is optimized for throughput and long
> running tasks not for startup time, footprint and low
> GC pauses what you like on the desktop.
> The server vm profiles the interpreted bytecode
> before compiling and uses therefore a different
> compiler which takes longer and speeds up later
> compared to the client VM.
>
> (its like a truck vs. car analogy)
>
> There are plans to merge both VMs, google for tiered
> compilation. First the client then the server
> compiler is used to get the best of both at least in
> theory.
>
> Take a look at the latest jdk7 builds and test the
> early access Tiered VM if you like.

Seems easy to me...

As the two VM's are merged, they are merged with the design strategy of supporting incremental speedup and optimization.

So the VM starts in "client" mode with fast startup, small footprint and low GC then gradually shifts into "server" mode loading additional capability as needed and performing progressively deeper optimization of the applet or app that it's running.

It's the automatic transmission analogy -- start in a low gear to get moving then shift smoothly into high gear for longer running applets/apps...

linuxhippy
Offline
Joined: 2004-01-07

Well here you see the discrepancy between low download size and feature-richness. I guess many users would not be happy about the descision to make java's download size +3mb larger.

However, wouln't it be a great idea if it could be installed with JavaKernel later, if reuqested by an application, applet or webstart-app?
If no download is possible, fall back to client...

lg Clemens

oneguyks
Offline
Joined: 2008-04-28

Well, no replies? I guess they have no interest to fix this program on Windows. There is no -server in Windows JRE! That means, the most optimized VM is not even available on Windows. In some cases (like doing a lot of math or created random numbers), -client is twice slower than -server.

What is the reaon that kernel can't download -server in the background?

andrewherron
Offline
Joined: 2008-04-03

You're forgetting about the target market of the JRE. This is a world where people complain about putting an icon in the system tray and that the VM spinup time 300ms too slow. Adding anything to the download size isn't going to make Sun any friends.

server is included with the JDK, where it belongs.

trembovetski
Offline
Joined: 2003-12-31

Also, there's work being done to merge the server and client jvms for Java7, to have
a single vm which would benefit both client and server apps and hopefully won't
cost as much as having two dlls combined and having user to choose.

Dmitri

demonduck
Offline
Joined: 2008-03-14

> Also, there's work being done to merge the server and
> client jvms for Java7, to have
> a single vm which would benefit both client and
> server apps and hopefully won't
> cost as much as having two dlls combined and having
> user to choose.
>
> Dmitri

Excellent idea. Why have two JVM's where one is not as fast as the other?
Give everybody the best...

dserodio
Offline
Joined: 2004-02-10

> > Also, there's work being done to merge the server
> and
> > client jvms for Java7, to have
> > a single vm which would benefit both client and
> > server apps and hopefully won't
> > cost as much as having two dlls combined and
> having
> > user to choose.
> >
> > Dmitri
>
> Excellent idea. Why have two JVM's where one is not
> as fast as the other?
> Give everybody the best...

That's called a "trade-off". Best in what? Startup time? Memory usage? Throughput?