[clug] Why isn't Java popular on the Linux Desktop? [SEC=PERSONAL]

Martijn van Oosterhout kleptog at svana.org
Tue Jul 14 02:22:34 MDT 2009


On Mon, Jul 13, 2009 at 09:47:00PM -0700, Jason Stokes wrote:
> > You are aware, Sam, that there are a whole slew of systems that use garbage
> > collection, and which /don't/ require this same preallocation, right?
> 
> Sure, including the current Sun Java implementation, in which you can specify
> an initial allocation and a maximum heap size, and the VM will vary between
> those two limits.  An awful lot of the stereotypes about Java performance
> seem to date from a very early incarnation of the VM.

Is this new?

$ java -Xmx1024m -jar /home/kleptog/osm/josm.jar&
$ ps aux |grep java
kleptog   8150  5.4  2.7 1207916 28264 pts/1   Sl   10:14   0:00 java -Xmx1024m -jar /home/kleptog/osm/josm.jar

Sure looks like preallocation to me. There's even:

$ java -Xmx3072m -jar /home/kleptog/osm/josm.jar
Error occurred during initialization of VM
Could not reserve enough space for object heap
Could not create the Java virtual machine.

Clearly it's not just a maximum, it really tries to allocate it all, at
startup. All I want is a Java VM with no predefined maximum memory
limit, so that I don't have to decide before I start the program how
much work I want to do. That's not too much to ask for, is it? Always,
specifying a large maximum is not an option, since it does take memory
away from other things I'm doing.

Do get me wrong, I think Java itself is a reasonable language, better
than C++ in many ways and getting better. But I've always felt the VM
implementations have let it down.

$ java -version
java version "1.6.0_12"
Java(TM) SE Runtime Environment (build 1.6.0_12-b04)
Java HotSpot(TM) Client VM (build 11.2-b01, mixed mode, sharing)

Have a nice day,
-- 
Martijn van Oosterhout   <kleptog at svana.org>   http://svana.org/kleptog/
> Please line up in a tree and maintain the heap invariant while 
> boarding. Thank you for flying nlogn airlines.
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 189 bytes
Desc: Digital signature
URL: <http://lists.samba.org/pipermail/linux/attachments/20090714/73c7c80f/attachment-0001.pgp>


More information about the linux mailing list