Thread: [Java-gnome-developer] JVM benchmarks: kaffe takes the cake
Brought to you by:
afcowie
From: Tiago C. <cog...@li...> - 2003-11-12 01:11:59
|
Hi all, i've been playing around with open-source JVMs and decided to perform a benchmark on those who could run my CDMirror project, as mentioned before in the mailing list the great loss is SableVM, unfornatly they are with some JNI problems, and until that solves Java-gnome won't be able to run on it. I did 2 simple benchmarks, startup time and memory consumption, Kaffe was the great winner with impressive results, makes me realize how heavy sun's VM really is on memory. Check it out: http://s1x.homelinux.net/content.php?id=9 |
From: Clemens E. <lin...@we...> - 2003-11-12 12:28:36
|
Hi Tiago! Your benchmarks ment nice, but they are not really useful. 1.) What does the *9, *3 mean for memory-consumption? Have you ever heard of threads? Threads are under Linux(o.k., thats not really correct) processes that share stuff between. That means Sun´s JVM does need 7,5% of your memory, not 67,5%. 2.) Your startup-results seem that you´ve started the JVMs already, not really fair, because JVMs like Sun´s one need to load a lot of shared stuff. It would be fair to measure with and without haveing started it before and listing both values. 3.) You forgot a really important point: Execution speed. GIJ wasnt designed to be fast, it runs java-code only in interpreted mode, because it was ment to be a way for GCJ to load dynamically classes. Kaffe has two fifferent JITs. IBMs JVM is the fastest one, when only measuring execution speed. -> 100% After IBM theres Sun. -> 90% after Sun theres kaffe ->25-45% after kaffe theres GIJ -> 5-10% However these percentages are not 100% correct and depend heavily on what you do with the VMs. However IBMs VM is based on Suns classes, that means Kaffe is the fastest OPenSource-JVM laying arround. Suns&IBMs JVMs are as fast or faster than GCJ, which compiles java statically. Even GCJ developers commented that Sun-JVM is impressive! 4.) > better choice then Sun's java. This makes you wonder how good is Sun > investing in the Linux platform. Sun is currently rewriting their whole Java2D/x11 rendering pipeline. They will use OpenGL starting from 1.5 for drawing things. I´ve spoken with a Java2D-enginier and he told me that the results are impressive. If Linux would not matter, they wouldnt spend so much time improving it on Linux/Desktop. lg Clemens |
From: Tiago C. <cog...@li...> - 2003-11-12 13:48:25
|
On Qua, 2003-11-12 at 11:27, Clemens Eisserer wrote: > Hi Tiago! >=20 > Your benchmarks ment nice, but they are not really useful. >=20 > 1.) What does the *9, *3 mean for memory-consumption? > Have you ever heard of threads? Threads are under Linux(o.k., thats not= =20 > really correct) processes that share stuff between. That means Sun=B4s = JVM=20 > does need 7,5% of your memory, not 67,5%. Thanks for clearing this up, i did know that threads under sun JVM appear as processes, i did not know about the shared memory issue, but still Kaffe is the winner in this field, it has 6,5% while sun's JVM has a 7.5% consumption >=20 > 2.) Your startup-results seem that you=B4ve started the JVMs already, n= ot=20 > really fair, because JVMs like Sun=B4s one need to load a lot of shared= =20 > stuff. It would be fair to measure with and without haveing started it=20 > before and listing both values. Don't the other JVM's load shared libs too? How do i control this? =20 >=20 > 3.) You forgot a really important point: Execution speed. > GIJ wasnt designed to be fast, it runs java-code only in interpreted=20 > mode, because it was ment to be a way for GCJ to load dynamically=20 > classes. Kaffe has two fifferent JITs. > IBMs JVM is the fastest one, when only measuring execution speed. -> 10= 0% > After IBM theres Sun. -> 90% > after Sun theres kaffe ->25-45% > after kaffe theres GIJ -> 5-10% >=20 > However these percentages are not 100% correct and depend heavily on=20 > what you do with the VMs. >=20 > However IBMs VM is based on Suns classes, that means Kaffe is the=20 > fastest OPenSource-JVM laying arround. Suns&IBMs JVMs are as fast or=20 > faster than GCJ, which compiles java statically. Even GCJ developers=20 > commented that Sun-JVM is impressive! I did not forgot, i just didn't measured this. Yet from what I've seen it seems that GCJ is faster then Kaffe: http://klomp.org/mark/free-vm-benchmarks/ http://www.shudo.net/jit/perf/ >=20 > 4.) > > better choice then Sun's java. This makes you wonder how good is Sun > > investing in the Linux platform. > Sun is currently rewriting their whole Java2D/x11 rendering pipeline. > They will use OpenGL starting from 1.5 for drawing things. I=B4ve spoke= n=20 > with a Java2D-enginier and he told me that the results are impressive. > If Linux would not matter, they wouldnt spend so much time improving it= =20 > on Linux/Desktop. If that is really going to happen then it is a good sign but you must agree that until that happens the desktop application that run on a JVM in a windows machine is faster then on a linux machine. Finally i just wanted to make clear that these benchmarks are nothing "official" nor it ever tried to be. I was benchmarking load speed and memory consumption of an idle application, ignoring the fact that i've made the processes error, and i think i can believe in those 2 benchmarks. Kaffe is still the most light JVM around Sun's JVM is of course the fastest, the other JVM options are still, IMO, very good. |
From: Elias M. <el...@al...> - 2003-11-12 15:58:20
|
Tiago Cogumbreiro wrote: > If that is really going to happen then it is a good sign but you must > agree that until that happens the desktop application that run on a JVM > in a windows machine is faster then on a linux machine. In this context, we don't care much do we? Java-GNOME doesn't use Java2D (for good or worse). Elias |
From: Tiago C. <cog...@li...> - 2003-11-12 16:40:22
|
On Qua, 2003-11-12 at 15:18, Elias Martenson wrote: > Tiago Cogumbreiro wrote: > > > Yes, i agree that the 2D functionalities of the upcoming version of > > sun's jvm is not something relevant to java-gnome, more important are > > system responsiveness and a good JNI performance. IMO we need a JVM that > > has a low memory footprint and good execution speed, i didn't see any > > recent becnhmarks but GCJ and Kaffe seem to be a good option in either > > cases. > > I find Sun Java to be superiour in every respect. It's the fastest, it > (obviously) has the lastest stuff first, and it it only _very_ slightly > larger than kaffe (if the numbers posted are accurate). > > GCJ has it's own slew os problems, inability to do reflection being the > largest one. > > Elias > Sun's JVM is superior to GCJ and Kaffe, but nowadays these Open options are way more mature and present as a viable choice, such fact didn't happened in a few months ago. GCJ has a great advantage: being able to compile classes to native code is great to package/destribute and your program (in a single platform) and don't forget that there are alot of Java alergics out there (especially in the Linux community) that don't want anything to do with java classes and jars, also there's the Swing factor which gives a bit of a bad impression in all java programs that they are slugish. This way when they open up our java-gnome program they'll think it's an ordinary C/Gnome program. Btw, i don't know if anyone tried this, but it seems very easy to compile Java-Gnome programs to native code with this tool: http://www.freestyler-toolkit.org/ |
From: Elias M. <el...@al...> - 2003-11-12 16:50:34
|
Tiago Cogumbreiro wrote: > Sun's JVM is superior to GCJ and Kaffe, but nowadays these Open options > are way more mature and present as a viable choice, such fact didn't > happened in a few months ago. GCJ has a great advantage: being able to > compile classes to native code is great to package/destribute and your > program (in a single platform) I find this to be a huge issue. I'd much rather place a dependency on a VM and then be able to distribute the same PRM, DEB or whatever archive to everybody. The user would still never have to bother about the VM. The lack of properly working dynamic class loading and reflection is also a problem for me. > and don't forget that there are alot of > Java alergics out there (especially in the Linux community) that don't > want anything to do with java classes and jars, I don't think one problem (allergic users) should be solved by introducing another (platform dependency and neutering the Java platform). > also there's the Swing > factor which gives a bit of a bad impression in all java programs that > they are slugish. Solved with Java-GNOME. That's why we're here, isn't it? :-) > This way when they open up our java-gnome program > they'll think it's an ordinary C/Gnome program. My Java-GNOME test applications look exactly like any GNOME application written in C, and it runs in the Sun VM. Exactly what is the problem? Sorry for sounding a bit harsh. I usually try to avoid that on public forums but this is an issue that I care a lot about. Elias |
From: Elias M. <el...@al...> - 2003-11-12 17:34:09
|
Tiago Cogumbreiro wrote: > On Qua, 2003-11-12 at 15:50, Elias Martenson wrote: > >>I find this to be a huge issue. I'd much rather place a dependency on a >>VM and then be able to distribute the same PRM, DEB or whatever archive >>to everybody. The user would still never have to bother about the VM. > > Well, when i think of desktop users i think of lazy ones, and IMO > installing the sun's java vm is more difficult then loading a shared lib > (libgcj.so), yet this is a problem for distribution only. Don't forget > that on linux usually java is not installed by default, it's always > thought of a big extra. Yet applications such as PostgreSQL and 3 billion useless(:-)) KDE libraries are usually installed on a standard Linux distribution and it's not considered being a "big" extra. In my mind, what needs to be done is to lobby for the inclusing of VM's on the linux distributions. apt-based distros such as debian and fedors shouldn't be a problem at all technically, since a Java-GNOME app can include the dependencies on it and it will get downloaded automatically. >>I don't think one problem (allergic users) should be solved by >>introducing another (platform dependency and neutering the Java platform). > > I don't think it's yet another dependency, JVM is switched by a shared > lib, you lose one you gain another. No, the big difference is that every single Java-GNOME app can be distributed in a platform _indepdendent_ form. This is an anormous advantage in my opinion. >>>also there's the Swing >>>factor which gives a bit of a bad impression in all java programs that >>>they are slugish. >> >>Solved with Java-GNOME. That's why we're here, isn't it? :-) > > My point was that swing applications being slugish makes some users > think that _all_ java aplications are slugish. Of course. The funny thing is that the same people happily run various graphical applications written in for example Python and Perl without any complaints about speed. This is an education issue really. Prove a point, preferably using a killer app. That way you can tell them: "did you know that this app actually runs in the Java VM? It's not slow, is it?" >>>This way when they open up our java-gnome program >>>they'll think it's an ordinary C/Gnome program. >> >>My Java-GNOME test applications look exactly like any GNOME application >>written in C, and it runs in the Sun VM. Exactly what is the problem? > > java -Djava.library.path=/usr/lib/jni -classpath > /usr/lib/java/gnome.jar:/usr/lib/java/gtk.jar org.foo.MyCoolClass This would look like so, on a properly installed system: java -jar myapp.jar > I know that shell scripts soulve this very gracefully, but again, when > natively compiled you just don't have to think about yet another > problem, and that's basicly the difference between running a C app and a > Java app. A shellscript wrapping the above command is prefectly adequate for me. The screllscript is platform independent too, in the context of Java-GNOME. >>Sorry for sounding a bit harsh. I usually try to avoid that on public >>forums but this is an issue that I care a lot about. > > I don't think that you were harsh :) And i care alot about this topic so > i find this discussion very productive ;) Thank you. :-) Elias |
From: J. M. B. <jmb...@co...> - 2003-11-12 21:32:51
|
> Yet applications such as PostgreSQL and 3 billion useless(:-)) KDE > libraries are usually installed on a standard Linux distribution and > it's not considered being a "big" extra. > > In my mind, what needs to be done is to lobby for the inclusing of > VM's on the linux distributions. apt-based distros such as debian and > fedors shouldn't be a problem at all technically, since a Java-GNOME > app can include the dependencies on it and it will get downloaded > automatically. The Blackdown version of Sun's Java SDK (1.4.1) is already included as part of the standard gentoo distribution. And yes, it is hardly a big download compared to something like OpenOffice-bin . Anything with that level of functionality is going to be a pain to download over dialup. A lot of the bias against Java in the Linux community is because there are a lot of long-time Sun haters. Swing has an unjustified reputation for being slow. Compared to Python/Tkinter or Perl/Tk? I think not. I think that Sun's JDK should be a part of major Linux distos (other than just Gentoo). For that matter, I'd like to see RH-compatible java-gnome RPMS. :) I can't seem to find any on the net for RH9/FC1, and I prefer to use RPM for installing stuff to my system long-term. Just a hint. |
From: Elias M. <el...@al...> - 2003-11-12 23:15:31
|
I think you summarised my opinion very well. It's nice to see that I'm not alone in this. ons 2003-11-12 klockan 22.32 skrev J. Mark Brooks: > The Blackdown version of Sun's Java SDK (1.4.1) is already included as > part of the standard gentoo distribution. And yes, it is hardly a big > download compared to something like OpenOffice-bin . Anything with that > level of functionality is going to be a pain to download over dialup. Also, it is important to remember that the VM only has to be downloaded once.Just like the Python, Perl or TCL interpreters also has to be downloaded and installed only once. > A lot of the bias against Java in the Linux community is because there > are a lot of long-time Sun haters. This is a fact I just can't get me head around. Sun has done a lot of good for the Unix community. Lately they have done a lot for the GNOME community. > Swing has an unjustified reputation > for being slow. Compared to Python/Tkinter or Perl/Tk? I think not. Agreed, but their arguments aren't rational. A little reading of slashdot will make that painfully clear. > I think that Sun's JDK should be a part of major Linux distos (other > than just Gentoo). For that matter, I'd like to see RH-compatible > java-gnome RPMS. :) I can't seem to find any on the net for RH9/FC1, and > I prefer to use RPM for installing stuff to my system long-term. Just a > hint. It was rumoured that RH10 would ship with Java by default. Now with the Fedora thing I don't know if that plan is still on track. Elias |
From: J. M. B. <jmb...@co...> - 2003-11-12 23:48:49
|
>It was rumoured that RH10 would ship with Java by default. Now with the >Fedora thing I don't know if that plan is still on track. > >Elias > > It isn't in the core package, probably because of license issues. It might show up in the Extra package; only time will show. Despite some criticisms that they are "going corporate" RH has tended to not include "non-Free" stuff in their distro even when it put them at a disadvantage. Like the whole mp3 support in XMMS thing. Sun does provide a very good RPM, but I'd still rather have it come with the distro. |
From: Luca De R. <pie...@li...> - 2003-11-13 12:11:33
|
Il mer, 2003-11-12 alle 22:32, J. Mark Brooks ha scritto: > I think that Sun's JDK should be a part of major Linux distos (other > than just Gentoo). For that matter, I'd like to see RH-compatible > java-gnome RPMS. :) I can't seem to find any on the net for RH9/FC1, and > I prefer to use RPM for installing stuff to my system long-term. Just a > hint. http://zeta.zizworks.com/ here you can find java-gnome rpms (made by me and Dan) as well as the eclipse plugin. I'm building java-gnome rpms regularly, about once a week, I've also added a gcj-compile rebuild option. If anyone has the need I can post them here, let me know. However would be nice if on the java-gnome webpage there were links to the above rpms, at least. I can also provide rpms regularly if putting the packages directly on the java-gnome homepage is preferred. Ciao, Luca. -- Luca De Rugeriis <pie...@li...> |
From: J. M. B. <jmb...@co...> - 2003-11-12 13:34:13
|
Clemens Eisserer wrote: > 1.) What does the *9, *3 mean for memory-consumption? > Have you ever heard of threads? Threads are under Linux(o.k., thats > not really correct) processes that share stuff between. That means > Sun´s JVM does need 7,5% of your memory, not 67,5%. > Actually, threads aren't a problem under Linux if you are using the NPTL thread library and JDK1.4.2. > 4.) > > better choice then Sun's java. This makes you wonder how good is Sun > > investing in the Linux platform. > Sun is currently rewriting their whole Java2D/x11 rendering pipeline. > They will use OpenGL starting from 1.5 for drawing things. I´ve spoken > with a Java2D-enginier and he told me that the results are impressive. > If Linux would not matter, they wouldnt spend so much time improving > it on Linux/Desktop. I'm glad to see that they are moving to OpenGL for this. I hadn't heard this information before. Does anyone know if GCJ will be updated to include the language changes coming with 1.5 (Java ?3?) |