Java-Gaming.org    
Featured games (79)
games approved by the League of Dukes
Games in Showcase (477)
Games in Android Showcase (107)
games submitted by our members
Games in WIP (536)
games currently in development
News: Read the Java Gaming Resources, or peek at the official Java tutorials
 
    Home     Help   Search   Login   Register   
Pages: [1]
  ignore  |  Print  
  JVM -serve Option  (Read 3540 times)
0 Members and 1 Guest are viewing this topic.
Offline Mojomonkey

Senior Member




ooh ooh eee eeee


« Posted 2003-07-21 14:43:45 »

I was talking to a colleague about the -serve JVM option, or rather he was talking to me about it. I realized I really knew nothing about it, nor did he. I was wondering if anyone has experiences with it, what are the advantages vs. regular client?

He was under the impression that -serve compile to native, which I'm CERTAIN is false, but didn't want to say anything before I had it confirmed.

Don't send a man to do a monkey's work.
Offline swpalmer

JGO Coder




Where's the Kaboom?


« Reply #1 - Posted 2003-07-21 16:09:35 »

Both client and server VMs compile bytecode to native code.

The server VM has more optimizations and compiles more aggressively.  It tends to have a slower startup time because of this, and perhaps longer pauses caused by compiling the "hot spots", but has generally better performance after it has decided to compile everything.

The client VM was designed for faster startup, followed by improved performance from compiling.  The server doesn't care so much about startup time - just performance.  It may also use more memory.

Offline Mojomonkey

Senior Member




ooh ooh eee eeee


« Reply #2 - Posted 2003-07-21 16:14:23 »

Quote
Both client and server VMs compile bytecode to native code.


Well, yeah, heh. What I meant is he was under the impression that it compiles the byte code into native leaving the native code where it can be used later. Sounded like misinformation to me then, and still does after your response.

So basically it comes down to server slower start up faster running, client faster slower running. With memory issues thrown in.

Don't send a man to do a monkey's work.
Games published by our own members! Check 'em out!
Legends of Yore - The Casual Retro Roguelike
Archimedes
Guest
« Reply #3 - Posted 2003-07-21 16:19:01 »

Sounds well.

However if I try to run a Java application (with the official JRE) with the -server option, Java says it can't find the server/jvm.dll (Win32) and indeed: there's just a directory Jre\bin\client\ with jvm.dll inside.

The server JVM is "only" in the SDK's Jre subdirectory.
So... normal JRE users cant use the server option...?
Offline Markus_Persson

JGO Wizard


Medals: 14
Projects: 19


Mojang Specifications


« Reply #4 - Posted 2003-07-21 16:42:30 »

I've played some with the -server option (after actually finding the .dll for it.. had to uninstall 1.4.2 and reinstall the sdk), and noticed three things:

1) A resonably tight loop I've got used to allocate more objects than the GC could be bothered to collect with the client jvm. This went away with the -server option.

2) The time required to read a bytebuffer from a random access file dropped to about 1/10th of the time it took with the client jvm.

3) It started a bit slower.

Play Minecraft!
Offline swpalmer

JGO Coder




Where's the Kaboom?


« Reply #5 - Posted 2003-07-21 19:01:53 »

The server VM is included with the SDK, but is not in the runtime-only download.
It currently does not cache the compiled code.
There is a command line option to force everything to compile to native code.  I think it is -Xcomp

Offline Spiff

Senior Newbie




Java games rock!


« Reply #6 - Posted 2003-07-24 15:37:05 »

Anyone doing significant floating point work should try out 1.4.2's with the -server option. It uses SSE and I've seen large performance increases with it.
Archimedes
Guest
« Reply #7 - Posted 2003-07-24 17:46:40 »

Oh well, the server JVM is only included in the SDK then.
That's a pity. Then it's useless to me because I don't want to programm just for me. :-)
Offline swpalmer

JGO Coder




Where's the Kaboom?


« Reply #8 - Posted 2003-07-24 20:34:32 »

You can program for me too.. I have the server VM Smiley... actually on the mac you only get the SDK, there is no separate JRE.  So you can program for Mac users too Smiley

Archimedes
Guest
« Reply #9 - Posted 2003-07-25 06:10:37 »

Quote
You can program for me too.. I have the server VM :)... actually on the mac you only get the SDK, there is no separate JRE.  So you can program for Mac users too :)


Didn't know that. Mac is different. Think different. :-)
Anyway, that's good news.

Now if Microsoft could be convinced to include a recent Java SDK (or JRE) in every new Windoze and Service Packs. But before that happens, the hell will freeze... :-|
Luckily quite some Linux distributions (like Suse) include Java. Redhat too? Mandrake not, I read here in the forum. Those which do include Java: is it SDK oder JRE?

One day, I hope to go for a Mac.
Games published by our own members! Check 'em out!
Legends of Yore - The Casual Retro Roguelike
Offline GergisKhan

Junior Member




"C8 H10 N4 O2"


« Reply #10 - Posted 2003-07-25 14:15:15 »

Archimedes, you've missed a few lawsuits.

Microsoft thinks Java is EVIL.  Sun sued them over your very point, won an injunction, and ultimately lost that particular point.  Yes, Microsoft is in violation of screwing up the JVM they licensed, so guess what?  They are NOT allowed to distribute any newer versions of Java.

Since they're not allowed to write their own version of the JVM, I can pretty much assure you they would NEVER distribute Sun's.

Oh, and have you heard about C# yet?  The Java clone Microsoft wrote for .NET?  That's the other reason.  

gK

"Go.  Teach them not to mess with us."
          -- Cao Cao, Dynasty Warriors 3
Offline blahblahblahh

JGO Coder


Medals: 1


http://t-machine.org


« Reply #11 - Posted 2003-07-25 15:19:03 »

Quote

2) The time required to read a bytebuffer from a random access file dropped to about 1/10th of the time it took with the client jvm.


There are some pretty extreme benchmark figures floating around for how server VM performance beats client hands down in the NIO.* classes.

I recall one which looked only at memory-mapped I/O, and deduced that Server-MMIO was better than IO.* for medium sized files and above, whereas client-MMIO was always worse than IO.* (even on files up to many megabytes, IIRC).

...except that Solaris slaughtered everything elsem and Solaris-server-mmio was able to beat IO.* on nearly all file sizes.

If I were hazarding a guess, I'd say it's something to do with the fact that much of NIO is claimed to have extreme startup costs (allocation of BB's etc), and that full heavyweight NIO isn't performed in client mode because this really is so extreme.

Witness the fact that things like BB aren't recommended except for very large or very long-lived buffers, and yet many of us are using them almost exclusively, since they have so many functional benefits over IO.* code.

Shrug. Just a guess.

PS: IIRC server used to be more aggressive about re-compiling bytecode to native code multiple times, seeking better versions, on the assumption that it would typically be running for days, so the extra costs could be amortized and the benefits realized - things that would not manifest with less than hours of unbroken runtime.

I have a vague memory of server being advised only if you run the VM for "at least days" at a time, typically.

malloc will be first against the wall when the revolution comes...
Offline swpalmer

JGO Coder




Where's the Kaboom?


« Reply #12 - Posted 2003-07-25 17:26:35 »

Quote
Since they're not allowed to write their own version of the JVM, I can pretty much assure you they would NEVER distribute Sun's.


Actually I think they are allowed to write their own.. it just has to comply with Sun's standards.   They have choosen to not upgrade their VM and they can only distribute the version that they last complied with.. which is way too old.   But they still have the option to compete fairly with the rest of the world.  They simply choose to abuse their monopoly instead.

Offline GergisKhan

Junior Member




"C8 H10 N4 O2"


« Reply #13 - Posted 2003-07-25 18:05:33 »

True, very true, however, didn't Sun cancel Microsoft's Java license, or they chose not to renew, or something, preventing them from writing a 1.4 JRE or SDK?

gK

"Go.  Teach them not to mess with us."
          -- Cao Cao, Dynasty Warriors 3
Offline tortoise

Junior Member




<3 Shmups


« Reply #14 - Posted 2003-07-25 18:53:58 »

Quote

Luckily quite some Linux distributions (like Suse) include Java. Redhat too? Mandrake not, I read here in the forum. Those which do include Java: is it SDK oder JRE?


Does Suse really come with a recent JRE? Is this a recent change in Sun's licensing or Linux distros's attitudes towards it?  I know Mandrake 9.1 only comes with Kaffe and Slackware comes with nada (Debian, of course, will strike you down on the spot if you install a Sun JDK Smiley). Both Gentoo and FreeBSD refuse to install the JDK unless you go and download the file yourself and agree to the license, then they'll take over and finish the job for you. I wonder what the deal is with Suse.

Sorry, lil off topic there...
Offline erikd

JGO Ninja


Medals: 16
Projects: 4
Exp: 14 years


Maximumisness


« Reply #15 - Posted 2003-08-04 12:03:21 »

Quote
True, very true, however, didn't Sun cancel Microsoft's Java license, or they chose not to renew, or something, preventing them from writing a 1.4 JRE or SDK?


IIRC, Microsoft has a license for only 1.1.4 and that there will be no problem if they wanted to license the most recent java as long as they conform to the standards. It's just that MS never will for known reasons.

Zynaps
Guest
« Reply #16 - Posted 2003-08-04 12:42:39 »

http://www.suse.com/us/company/press/press_releases/archive03/sun.html

Head: "SANTA CLARA, Calif. and OAKLAND, Calif., 08/01/2003
SuSE Linux to Become a Java (tm) Source Licensee and Distribute Sun's Java, Sun to Distribute SuSE Linux Enterprise Server"

"SuSE commits to (..) to distribute Sun's Java Virtual Machine(tm) (JVM) to further expand the deployment of the world's most popular application environment."

No mention however if it's Java SDK or JRE what SUSE is going to ship. Anybody?
Offline Jeff

JGO Coder




Got any cats?


« Reply #17 - Posted 2003-08-04 18:32:03 »

Quote


Well, yeah, heh. What I meant is he was under the impression that it compiles the byte code into native leaving the native code where it can be used later. Sounded like misinformation to me then, and still does after your response.


Then you arent listening, i fear.

The Sun VM is really 2 VMs in one. a "Client" VM and a "server" VM. -server tells the VM launcher to run the server VM.

BOTH CLIENT AND SERVER VMs CONTAIN Just-in-Time COMPILERS THAT COMPILE THE BYTECODE DOWN To NATIVE ASSEMBLY CODE.

The differences are  in how they go about doing that. SWp did an excellent job of describing the differences on a high level so I won't go into that again.

Is that all clear enough?

What your friend MIGHT be getting confused  by is the -Xcompile flag on the Sun VM.  This flag forces the VM to compile all the code  at program start-up rather then on-the flay as-needed.  It results in a longer pause til start of the prgoram but eliminates most of the "glitchiness" caused by the advanced optimizatio nanbalysis of the server VM during the early parts of a run.

Got a question about Java and game programming?  Just new to the Java Game Development Community?  Try my FAQ.  Its likely you'll learn something!

http://wiki.java.net/bin/view/Games/JeffFAQ
Offline Jeff

JGO Coder




Got any cats?


« Reply #18 - Posted 2003-08-04 18:35:35 »

Quote
Oh well, the server JVM is only included in the SDK then.
That's a pity. Then it's useless to me because I don't want to programm just for me. :-)


I dont want to make any specific promises here because I'm not a Sun lawyer, but you should look at the latest license for the SDK.  Its become seignificantly more liberal on how and when it can be destributed then it used to.

Got a question about Java and game programming?  Just new to the Java Game Development Community?  Try my FAQ.  Its likely you'll learn something!

http://wiki.java.net/bin/view/Games/JeffFAQ
Offline Mojomonkey

Senior Member




ooh ooh eee eeee


« Reply #19 - Posted 2003-08-04 19:08:43 »

Quote
Then you arent listening, i fear.

The Sun VM is really 2 VMs in one. a "Client" VM and a "server" VM. -server tells the VM launcher to run the server VM.

BOTH CLIENT AND SERVER VMs CONTAIN Just-in-Time COMPILERS THAT COMPILE THE BYTECODE DOWN To NATIVE ASSEMBLY CODE.

The differences are  in how they go about doing that. SWp did an excellent job of describing the differences on a high level so I won't go into that again.

Is that all clear enough?


No, I was listening and understand perfectly well. What I meant is HE was under the impression that it build natively permanently (think exe or dll), where you could then use it WITHOUT the jvm.

I was certain that it worked just the way you so passionately explained it, Jeff. Smiley However, due to his insistance that this is how it worked, I wanted to make sure.

Don't send a man to do a monkey's work.
Offline Jeff

JGO Coder




Got any cats?


« Reply #20 - Posted 2003-08-04 19:28:33 »

Quote


I was certain that it worked just the way you so passionately explained it, Jeff. Smiley However, due to his insistance that this is how it worked, I wanted to make sure.


Ah hokay.

Yep then tell him he's wrong.

And pardon the passion but you have no idea how often I end up having to explain these things.




Got a question about Java and game programming?  Just new to the Java Game Development Community?  Try my FAQ.  Its likely you'll learn something!

http://wiki.java.net/bin/view/Games/JeffFAQ
Offline Jeff

JGO Coder




Got any cats?


« Reply #21 - Posted 2003-08-04 19:29:25 »

Quote


Ah hokay.

Yep then tell him he's wrong. If he wants to pre-compile he needs a pre-compiler.  The VMs don't do that.


And pardon the passion but you have no idea how often I end up having to explain these things.





Got a question about Java and game programming?  Just new to the Java Game Development Community?  Try my FAQ.  Its likely you'll learn something!

http://wiki.java.net/bin/view/Games/JeffFAQ
Zynaps
Guest
« Reply #22 - Posted 2003-08-05 06:25:16 »

The -server option I like. :-)
If I understand the things right which have been said in the topic "CD re-distribution of JDK"
http://www.java-gaming.org/cgi-bin/JGNetForums/YaBB.cgi?board=announcements;action=display;num=1059518247 , you may distribute even the SDK now with your Java application. Ok, makes more sense for CDs and that like, but still a real good thing. Thanks to SW and Jeff for the clarifications on JVM/Client/Server/...
Offline winkman

Senior Newbie




Java games !


« Reply #23 - Posted 2003-08-05 11:15:27 »

Current Suse 8.2 Professional  (i don't know about Personal) comes with  sun  JRE 1.4.1 and SDK 1.4.1 + IBM Jikes (java Compiler) gcc-java 3.3 (gnu java compiler) ANT ...

the server vm seem to be in the jre package here ?!?

Suse Professional Edition always had up to date java versions  AFAIK

regards
Martin
Pages: [1]
  ignore  |  Print  
 
 
You cannot reply to this message, because it is very, very old.

 

Add your game by posting it in the WIP section,
or publish it in Showcase.

The first screenshot will be displayed as a thumbnail.

Riven (20 views)
2014-07-29 18:09:19

Riven (13 views)
2014-07-29 18:08:52

Dwinin (12 views)
2014-07-29 10:59:34

E.R. Fleming (31 views)
2014-07-29 03:07:13

E.R. Fleming (12 views)
2014-07-29 03:06:25

pw (42 views)
2014-07-24 01:59:36

Riven (42 views)
2014-07-23 21:16:32

Riven (28 views)
2014-07-23 21:07:15

Riven (29 views)
2014-07-23 20:56:16

ctomni231 (60 views)
2014-07-18 06:55:21
HotSpot Options
by dleskov
2014-07-08 03:59:08

Java and Game Development Tutorials
by SwordsMiner
2014-06-14 00:58:24

Java and Game Development Tutorials
by SwordsMiner
2014-06-14 00:47:22

How do I start Java Game Development?
by ra4king
2014-05-17 11:13:37

HotSpot Options
by Roquen
2014-05-15 09:59:54

HotSpot Options
by Roquen
2014-05-06 15:03:10

Escape Analysis
by Roquen
2014-04-29 22:16:43

Experimental Toys
by Roquen
2014-04-28 13:24:22
java-gaming.org is not responsible for the content posted by its members, including references to external websites, and other references that may or may not have a relation with our primarily gaming and game production oriented community. inquiries and complaints can be sent via email to the info‑account of the company managing the website of java‑gaming.org
Powered by MySQL Powered by PHP Powered by SMF 1.1.18 | SMF © 2013, Simple Machines | Managed by Enhanced Four Valid XHTML 1.0! Valid CSS!