Java Gets New Garbage Collector, But Only If You Buy Support
An anonymous reader writes "The monetization of Java has begun. Sun released the Java 1.6.0_14 JDK and JRE today which include a cool new garbage collector called G1. There is just one catch. Even though it is included in the distribution, the release notes state 'Although G1 is available for use in this release, note that production use of G1 is only permitted where a Java support contract has been purchased.' So the Oracle touch is already taking effect. Will OpenJDK be doomed to a feature-castrated backwater while all the good stuff goes into the new Java SE for Business commercial version?"
You used to be cool.
Hold up, wait a minute, let me put some pimpin in it
With the JavaOne starting this week, it might be a nice opening question on day one... "What the hell are you thinking, mister Schwartz??"
As a non-programmer, can someone give a brief explanation of what a garbage collector is as it pertains to programming.
We will bankrupt ourselves in the vain search for absolute security. -- Dwight D. Eisenhower
Shouldn't we have "recycling collection" instead of "garbage collection"?
C'mon guys all those big 1MB and 4MB malloc()s are being shipped over to third world countries to be disassembled into bits and bytes. We should be recycling things HERE.... not throwing them away for Java to come and pick up.
Karma: Excellent. 15 moderator points expire sometime.
If you post a troll comment to an article tagged troll, do you get insightful mods?
In Soviet Russia, article trolls you!
No comprende? Let me type that a little slower for you...
JRockit has all kinds of monitoring features, memory profilers, and other useful metrics built into the JRE, but you need a license key to unlock them. Core Java was always free. You pay for the value-added stuff.
"Will OpenJDK be doomed to a feature-castrated backwater while all the good stuff goes into the new Java SE for Business commercial version?""
Perhaps. But now that its GPL, maybe IBM, RH and the rest of Java's stakeholders will get onto making openjdk better than oracle's. Ill sure contribute: this is a strategic need for the foss movement.
NO SIG
I don't see anything obvious preventing you from using it (no license/support keys?), it's just not recommended since it's experimental. If you're crazy enough to use it on a production server, you better have a support contract so Sun/Oracle can fix any problems that come along. That seems reasonable.
Although it'd be better if they just said "don't use it for production, period."
I just know you're going to make a lengthy complaint thread of this.
If you would simply put down your Silver Surfer comics, comb the crumbs and insects out of your beards, cut your straggly hair, have a bath and a good scrub, and eagerly learn all the new technologies as our Marketing department invents them (and disposes of the old technologies), we could see the dawn of a New Age of incredibly rich CEOs and VPs who live in mansions, collect cars, race boats and planes, and in general protect the freedoms that your betters fought so hard to establish.
The meek shall inherit my EULA.
Rich And Stupid is not so bad as Working For Rich And Stupid.
The G1 collector is still a "work in progress" so they are suggesting that you use it *in production* only if you have a support contract with Sun (Oracle?). This is not a big deal. You can still use it, just enable it with "-XX:+UnlockExperimentalVMOptions -XX:+UseG1GC" on the command line...
Put a fork() in her she's done!
Meet Vinny and Guido, my business associates in the waste management business.
You see, it's like this. I gotta eat. My kids gotta eat. Vinny and Guido's families have to eat.
We know where you live. It's a nice place, big houses, fancy cars. You can afford to eat, very well.
You wouldn't your neighboorhood to fall victim to all sorts of garbage dumpers, would you? How about a recycling plant, right next to where you work?
No? Well, I'm sure you'll understand when I say that it is in your best interest to respect our business model. Or else, Vinny and Guido might have to go hungry for a bit. And I assure you, they get very unfriendly when they get hungry.
Capiche?
Methinks they just want to make damn sure nobody uses this feature in a production environment. This is more of a sneak peek for paying customers who are contractually bound against using this in a production environment.
If this was included in the standard distribution, then people would use it no matter what the documentation said. And then Sun would be saddled with bug reports and whining.
There's no -1 for "I don't get it."
The ongoing problem with FOSS is that hard, un-cool, gritty, vital work ultimately takes money to do right. Cool gets projects only so far; money is needed for viable completion.
Can we get a "-1 Wrong" moderation option?
* <- joke
o
-|- <- you.
/ \
I know I am profoundly ignorant and as thus should be modded into oblivion, but I don't do any programming where the memory allocation is variable. Is there a good reason are people really relying on hidden mechanisms to manage it? I would think it would be a lot more robust to keep track of allocation and deallocation explicitly, add when you need, and delete when you don't need, and not count on some generic mechanism. I know it happens, I see the memory leaks, but it would seem eminently avoidable.
Brett
did anyone really think Oracle was going to continue to release fully featured JDKs for free?????.....this is why the day Oracle bought Sun, i started learning C#....
lol, yes because C# is owned by a much more FOSS-friendly company. Microsoft would never charge to support experimental features in production-code.
G1 is in the latest OpenJDK builds. Since it is GPL you are free to use it without any license restrictions.
The note in the release notes is only saying that Sun won't officially support it in their releases without a support contract.
If you are concerned, use OpenJDK.
That works as long as the only strategy used is reference counting. There are others, and I think Java uses a fancy version of mark and sweep.
No, no, no! Creating a cycle of object references does not cause a memory leak in Java!
You are assuming that a garbage collector uses reference counting. However, reference counting doesn't work for the very reason you state, and therefore GCs don't do it that way. They actually check whether an object is usable by the program, and not just whether it has any old reference to it.
To clarify, it only works if the strategy is pure reference counting. Mark-and-sweep and reference counting with cycle detection are both special cases of the same generalised algorithm (see the IBM TJ Watson papers for more info). Generally, ref counting + cycle detection plays nicer with virtual memory and non-uniform memory architectures than mark-and-sweep, although this is less true in an aggressively generational system like G1.
I am TheRaven on Soylent News
Not only did you not get the joke, you also have some misconceptions about how the Java GC works. There is no counter, instead the program state is analysed for unreachable objects. Also, memory is not freed immediately, but some unspecified time later (i.e. during the next GC cycle)
So the Oracle touch is already taking effect.
Fork you, Oracle!
[b.belong('us') for b in bases if b.owner() == 'you']
Developers may search for JRE on Android...which is also called G1.
Do you really want mixed results on Google search for "G1 Java"?
Oracle does not yet own Sun and can't (yet) set business direction for it. It's just a new, experimental feature, folks.
The slashdot summary seems to me to have a heavy dose of sensationalism.
Oracle's implementation of java is GPL'd. What more do we want from them?
I doubt that there's been any recent research that's uncovered some fantastic new mechanism for garbage collection that was never known before. Garbage collection used to suck, and that was one of the problems, historically, with LISP. Over the decades, garbage collection has gradually gotten better. All the improvements in garbage collection are in the public domain. Gc is not generally a performance bottleneck for modern garbage-collected languages.
It would be slightly more worrisome if this new gc algorithm was patented -- but I haven't seen any evidence that it is. If it's not, then nothing is preventing anyone from making a fully GPL'd version of java with the new algorithm. If it was patented, then this would be a problem for all garbage-collected languages with open-source implemtations, not just java.
Does java's performance really depend much on the efficiency of its gc? My main complaint about java's performance is that the VM and libraries take too long to load.
Find free books.
Here [http://developers.sun.com/learning/javaoneonline/j1sessn.jsp?sessn=TS-5419&yr=2008&track=javase] what sun says about it : The Garbage-First garbage collector (G1 for short) is the next-generation low-pause garbage collector that will be included in the Java HotSpot virtual machine. G1 will be the long-term replacement for the Concurrent Mark-Sweep (or CMS) garbage collector, Sun's current low-pause garbage collector. G1 targets medium to large multiprocessor machines and large heaps, relying heavily on the concurrency and parallelism such machines offer. Like CMS, G1 is generational, which benefits throughput. Unlike CMS, G1 compacts to battle fragmentation and to achieve more-consistent long-term operation. As its name suggests, G1 concentrates its collection and compaction activity first on the areas of the heap that are likely to be full of reclaimable objects, thus improving its efficiency. G1 uses a pause prediction model to meet user-defined pause time targets. It achieves smoother pause times than CMS, with fewer or no outliers at comparable or better throughput, as this presentation shows. The initial target pause times are in the low tens of milliseconds. === So this is more for entreprise multiprocessors, multiservers java. And those entreprise normally will buy a support contract. So it's almost a no news.
But that's the kind of stupid shit that's been spewing from here for the last 10 years.
PS - the look and feel of slashdot sucks
GOBACK.
Seriously, your headline is exactly backwards. Read what the pay for support is for. The G1 is beta so you pay for support... the older versions of Java that are out of date are also pay for support.
...you have explicit allocation/deallocation, you get holes in memory. There's no way to avoid it, for the same reason that fragmentation occurs on disks. Unless the chunk you allocate is exactly the same size as the chunk last deallocated, there will be a region of memory that cannot be used.
This means that your heap will end up looking like swiss-cheese, unless you have some means of shuffling things around. Unless the programmer can absolutely guarantee that mallocs and frees only occur in such a way that no space unusable to the program's next malloc is ever left, the program will always have the potential of exhausting resources even without leaking memory.
This is why there are all kinds of malloc() substitutes for C, including several with garbage collection. If the program runs for long enough, the vanilla malloc() in most C libraries is simply not good enough.
It's a small world and it smells funny; I'd buy another if it wasn't for the money; Take back what I paid (SoM)
What situation is that? If you're talking about tying a customer to a painful and harmful contract, then yes.
G1 is in OpenJDK and JDK7 as well as the new JDK6. So it's open source. So fear not. I think that as people have mentioned below they are simply trying to protect themselves from people turning on this feature in a production environment and then bitching to them about it.
Holy crap! That joke cut his head off!
Just click on the "change" button after the summary and the comment subjects display correctly. Whatever the problem is with the cached story pages, comments.pl is fine.
Use of the words "good", "bad" or "evil" is almost invariably the result of oversimplification.
From en.wikipedia.org/wiki/Java performance:
"The 1.0 and 1.1 Virtual Machines used a mark-sweep collector, which could fragment the heap after a garbage collection. Starting with Java 1.2, the Virtual Machines switched to a generational collector, which has a much better defragmentation behaviour. [2] Modern Virtual Machines use a variety of techniques that have further improved the garbage collection performance.[10]"
The entire Java Stack has long since been opened up. The community essentially owns it now. What Oracle does with "Java" I could care less.
Anything that is worth while to build design and construct/maintain Java applications and VM's is all open source.
If they want to fork and become irrelevant that is there choice.
-Hack
Got Geometrodynamics? Awe, too hard to figure out? Too bad.
.
Sounds like any other typical OSS business model from Ubuntu, Novell, RedHat, IBM, and even Microsoft.
Other than cost, I'm curious as to what you are measuring.
It's not performance. Solaris 10 on a PC outperforms Linux when stressed, sometimes by huge margins. It's not a complete blow-out with modern kernels, like it was in the 2.4 days, but it's still significant -- and there are corners where it really still is a complete blow-out (like: What does fsync() do?).
It's not stability. Again, Solaris 10 is much less likely to crash or go all wonky when stressed, and AIX is similarly robust. And again there are corners here that can have large impact on reliability of applications (e.g. I recall some annoyances with direct io, although the specifics are escaping me at 3am).
It's not core features, by and large Linux lags the commercial UNIXen in that arena (e.g. Dtrace), which isn't really surprising since Linux is effectively a clone.
Having said that, there are certainly UNIXen that do not stand up so well to Linux (*cough* HP/UX *cough*), but there certainly exist UNIXen that are generally superior.
Of course, a lot depends on what you're doing with the system. If I need to push the system as hard as possible then I want Solaris if it is an option. If I am looking for general usability I find Linux preferable. The differences in the latter case are often minor (like the -c argument to "script") but taken en-masse they make for a more pleasant experience.
That's the way I see things today. I am not at all sure we won't see Linux pull into the lead over time -- it is getting better and better with age, and most UNIX systems appear to be seeing improvement stagnation. (And that may well be universal soon: What are the odds that Solaris doesn't see its R&D budget chopped under Oracle?) In summary I would generally prefer to do development on Linux, but want production on Solaris. Best of both worlds, at least today. It may be telling, though, that on my personal server systems I run Linux even when I am concerned about performance -- the ongoing administration is significantly easier it you pick the right Linux distribution, and it isn't picky about hardware like Solaris is, and the tool suite is free as in beer without any extra effort.
Except on the desktop. There MacOS is supreme IMO. All the goodness of UNIX, plus stellar UI and commercial applications. I dunno how it does in stress situations (almost nobody buys Apple servers) but it's a great desktop system.
jim frost
jimf@frostbytes.com
Solaris is a specific case of original, commercial unix which went open source a few years ago.
Back in the '90s, when Linux distributions started to get really popular, the Linux kernel and the distributions overtook many of the old commercial unices (e.g. SCO Unix, AIX, IRIX...) and effectively killed them.
Linux was cheaper (free), the user-land was more user-friendly (GNU tools, GNOME, KDE...), and truly cross-platform.
Linux's and GNU's openness and freedom was and is the key to its success. There are now millions of people around the world proficient in Linux/Unix who wouldn't have been for this very reason. There are people like me who made it all the way to being a Software Engineer simply by having a Linux system in the home to learn on.
Solaris is still ahead by a long way on high-end technical features like ZFS and is quite possibly the only commercial unix that has a future now.
I have 3 Solaris 11 UltraSPARC boxes in my house just now: a SunBlade 100 and two Ultra 80s (4 CPU).
Stick Men