8 ms·
GraalVM 19.0
- jarym 8y agoI like Graal a lot but a lot of the performance benefits are in the EE version. That’s not in and of itself an issue except we are talking Oracle here. Several months ago I emailed them to ask what the pricing would be for my SaaS service to license GraalEE. I got a reply stating they’re working on it and will get back to me.. haven’t heard a peep since. So the EE version is available for evaluation but not even Oracle can tell you how much it costs or how to get a license :-/
- paulddraper 8y agoSeriously though. Anyone have any idea what it might cost?
- xfer 8y agoHave you benchmarked anything to see any difference between CE and EE or are you just going by their download page? I am super interested in meta-compilation approaches and reading a bit of literature on Rpython and Graal.
- chrisseaton 8y ago> a lot of the performance benefits are in the EE version I think Twitter get something like 13% with the CE version. That’s absolutely massive in terms of JVM performance increase for the same code.
- walkingolof 8y agoProfile guided optimization is part of the EE version, that is probably the biggest difference. I also saw that the EE version is free of charge on Oracles cloud, smart !
- StevePerkins 8y agoI was at a Java conference recently, and sat in a session with an Oracle guy showing this off and answering a lot of questions about this topic. It's really not that nefarious. The bottom line is that they haven't come up with pricing yet, because it's not at a point where the people who would pay are interested yet. Oracle's target audience is large companies that will pay out the wazoo for something enterprise-grade and fully-baked. And it's just not there yet. It doesn't support the current version of Java. It doesn't run on Windows, which is 95+% of the developer workstations in those environments. The debugger story is pretty weak (i.e. do all your debugging in a regular JVM, and hope for the best after you compile to native). For that crowd, it truly is at the stage of, "Check it out at conferences, and be aware that it's coming, but don't plan any project work around it yet". At that stage of a product's lifecycle, the architects might be tinkering with it, but the management and business stakeholders with budget authority don't even want to hear about it. Spoiler alert: it's probably going to be expensive. If you're hung up on this question, then you probably aren't going to get to use it. How many HN and Reddit commenters use any paid Oracle products at all? But for the startup/indie/student crowd that dominates here... there's plenty of interesting benefit to the open-source version, and there's no "catch" to its licensing beyond that of OpenJDK itself.
- jarym 8y agoI’d say it is nefarious to put out an EE version that’s marked ‘production use requires a license’ and then make it impossible to figure out how to get a license or what one would cost. Even enterprises would deep budgets would not let their devs near such an arrangement - they could be held to ransom by Oracle! If it’s not ready or ‘fully baked’ as you say then mark it as beta and say that future versions will require a license.
- StevePerkins 8y agoWell, yes. Devs in that environment would not go near it (at least not for anything beyond a POC). In those environments, you have to go through a review board process in order to use some new open source JSON-parser library from Maven Central. Devs aren't just cowboy'ing a new compiler into their workflow. "Production use requires a license" is a NOT an indicator that it's ready for production use (there are a number of warnings against this). The fact that you need a license, yet can't get one, is a clear signal that it isn't ready for production use. The people in Oracle's target audience see this sort of thing a lot with preview software, and aren't confused by it.
- deleted 8y ago[deleted]
- jarym 8y ago> The fact that you need a license, yet can't get one, is a clear signal that it isn't ready for production use. Everything you said is reasonable except this. If it isn’t ready for production use then no need to beat about the bush by advertising a commercial license you can’t get? And if one doesn’t exist by the way how are Twitter using it in production?
- StevePerkins 8y agoI honestly don't know how to explain this more clearly. They are not "advertising a commercial license". They are saying NOT to use the Enterprise version in production, because licensing is not yet available. The only reference I've ever seen to Twitter using GraalVM in production is in this discussion thread. And that commenter clearly states that Twitter is using the open-source community edition. No one who would ever conceivably be a paying Oracle customer would be confused by any of this. When that much money is on the table, there are experienced people in the room with reading comprehension.
- suyash 8y agoHere is more information about EE version : https://docs.oracle.com/en/graalvm/enterprise/19/guide/overview/technical-architecture.html https://docs.oracle.com/en/graalvm/enterprise/19/guide/overv...
- karussell 8y agoWe have compared both versions and for the most use cases performance are similar and EE is a bit faster but for some even the CE is faster. I know projects that are 100% open source would be nice, but the reality is that it is not a bad idea to have a business model attached to an open source IMO increasing its sustainability.
- tom_mellior 8y ago> Several months ago I emailed them [...] haven’t heard a peep since. Stupid question: Why don't you ask again? Several months ago it was in release candidate mode, while now it is a real product. You should probably be able to get more concrete information now.
- taneq 8y agoFor people like me who've never heard of this before: > GraalVM is a universal virtual machine for running applications written in JavaScript, Python, Ruby, R, JVM-based languages like Java, Scala, Kotlin, Clojure, and LLVM-based languages such as C and C++.
- blunte 8y agoIt's worth noting that the project is also owned by Oracle. Regardless of how great GraalVM is, that fact may give some people pause...
- deleted 8y ago[deleted]
- pron 8y agoOK, but four of the five FAANG companies are betting very heavily on OpenJDK (even Facebook uses it, but not as heavily as the others), which is also owned by Oracle. Oracle has been good to OpenJDK over the decade they've owned it (disclosure: I work on OpenJDK at Oracle).
- suyash 8y agoalso worth noting is that Oracle has completely open sourced the Community Edition and actively developing it https://github.com/oracle/graal https://github.com/oracle/graal (I work at Oracle)
- rightbyte 8y agoThis seems useful I need to look into it. It could mean having a convinient runtime for calling Java db drivers?
- deleted 8y ago[deleted]
- azhenley 8y agoHow come it seems like none of the smaller, general-purpose VMs took off? Did .Net and the JVM win? I recall there being several contenders 6-10 years ago. Like the Parrot VM [1], which was driven by Perl but aimed to support a large variety of languages. [1] https://en.wikipedia.org/wiki/Parrot_virtual_machine https://en.wikipedia.org/wiki/Parrot_virtual_machine
- aardvark179 8y agoMaking a VM isn’t too difficult. Making s VM with an optimising JIT is a lot more work, and adding things like tooling, instrumentation and debugging increases the work needed.
- pron 8y agoI estimate that developing OpenJDK + Graal/Truffle costs ~$100M a year (hundreds of full-time developers). That's a lot of money.
- chrisseaton 8y agoNobody did the hard work to add advanced optimising backends to those projects. They were all new ideas for the frontend - great but someone somewhere has to do the work to get it to perform well, and few people know how to do that so it never got done.
- pawelmurias 8y agoParrot never reached a point where it didn't suck. GraalVM has the futurama projection tech to make the universal vm dream possible.
- tempguy9999 8y agofutamura? :)
- chvid 8y agoIf Oracle can make this project the heart of a cloud offering; I will guess they will have an advantage over Amazon, Google and so on.
- deleted 8y ago[deleted]
- suyash 8y agoYou can run Graal VM on Oracle cloud today: https://docs.oracle.com/en/graalvm/enterprise/19/guide/overview/oci/create-instance.html https://docs.oracle.com/en/graalvm/enterprise/19/guide/overv...
- cfallin 8y agoFor anyone with a bit of an academic bent, the ideas behind GraalVM are really really cool -- basically, they compile by partially evaluating an interpreter for X with a program in language X. Simple idea at a high level but they actually made it work well, with some clever tricks like annotated partial-eval boundaries in the interpreter and an API for first-class speculative assumption objects. Their paper is a good read: https://dl.acm.org/citation.cfm?id=3062381 https://dl.acm.org/citation.cfm?id=3062381
- pron 8y agoYes! While not quite mature yet, Graal is now an industrial-strength implementation of some heretofore-theoretical compsci ideas (Futamura projections [1]). You give it an interpreter and it gives you an optimizing compiler. It is, IMO, the biggest technological breakthrough in compilers in the last decade. I picture it as automatically specializing or "templatizing" (as in C++ templates), on a use-site basis, and doing so speculatively, even when proving that the transformation is correct is impossible. Other JITs do so as well, but Graal does it generally for any language expressed as a Truffle interpreter. BTW, the amount of groundbreaking technological innovation in the Java space these days -- be it with optimizing compilers like Graal, GCs like ZGC, and low-overhead production profiling (JFR) -- going on at Oracle (where I work) is quite phenomenal. [1]: https://en.wikipedia.org/wiki/Partial_evaluation https://en.wikipedia.org/wiki/Partial_evaluation
- quelltext 8y agoFutamura projections were not theoretical-only before Graal. There exist several partial evaluators and benchmarks for the use case of Futamura projections. I will admit that I know too little about the internals of Graal but I haven't seen any papers describing how the traditional issues with partial evaluation have been solved for the general case, so my guess is that all this still only works and yields good results under certain assumptions and designs, i.e. just throwing any generic interpreter code at the partial evaluator alone will not necessarily yield a compiler that is particularly good. [1] The idea of general partial evaluation and the Futamura projections is well, rather general. Take code and static input and produce a specialized program to that code. In case of an interpreter being the code and a program the static input produce compiled code, etc. It's rather hard to deliver on the promise that this always works and in particular yields performant results on arbitrary code and inputs. And I don't think Graal delivers this either (not saying it has to). It's possible that Graal can be considered the first industry compiler for a full mainstream language that does a high degree of partial evaluation and allows tooling around it (i.e. Truffle for implementing language interpreters that can be optimized/become compilers). However it would be disingenuous to claim it's the first compiler/partial evaluator to yield practical results of applying the Futamura projections. (You didn't quite claim that bit the previously "theroretical" part kind of goes there). [1] > Writing language interpreters for our system is simpler than writing specialized optimizing compilers. However, it still requires correct usage of the primitives and a PE mind- set. It is therefore not straightforward to convert an existing standard interpreter into a high-performance implementation using our system. > Our experience shows that all code that was not explicitly designed for PE should be behind a PE boundary. We have seen several examples of exploding code size or even non- terminating PE due to infinite processing of recursive meth- ods. For example, even the seemingly simple Java collection method HashMap.put is recursive and calls hundreds of dif- ferent methods that might be processed by PE too. https://chrisseaton.com/truffleruby/pldi17-truffle/pldi17-truffle.pdf https://chrisseaton.com/truffleruby/pldi17-truffle/pldi17-tr...
- jacques_chester 8y agoThe announcement blog post: https://medium.com/graalvm/announcing-graalvm-19-4590cf354df8 https://medium.com/graalvm/announcing-graalvm-19-4590cf354df... The HN thread didn't get upvoted much: https://news.ycombinator.com/item?id=19873081 https://news.ycombinator.com/item?id=19873081
- jdormit 8y agoFor those interested in this sort of thing, this video showcases Graal's ability to compile JVM bytecode to native binaries in a really impressive way: https://youtu.be/topKYJgv6qA https://youtu.be/topKYJgv6qA
- hmottestad 8y agoI just watched the entire video. Thanks. TLDR for others: GraalVM lets you compile your code to native, which makes startup times 1000x faster and memory footprint 10x lower. This is great for things like "java/clojure based command line tools", and maybe even micro services. Long running processes on the JVM are about 2x faster than a GraalVM compiled program, so it won't make your normal backend any faster. This is because JIT is better since it can understand how your program is used when selecting which types of optimisations to apply. Also GraalVM doesn't support everything in the dynamic class loading and reflection space.
- unregistered88 8y agoNOTE: You are describing the native-image feature of GraalVM. GraalVM is primarily a full featured JVM so you can run your normal backend and it will probably be a bit faster, and it does support everything in the dynamic class loading and reflection space.
- jmiskovic 8y agoI started using zprint code formatter for clojure. The binary is running GraalVM. I invoke it form editor and the result is instantaneous! No startup, no warmup, just nicely formatted code where the jungle used to be. I'm really excited about this technology.
- ksec 8y agoQuestions, Native Image is basically SubstrateVM ? Is Sulong part of GraalVM? I never seen it mentioned in those release notes. I am just wondering if running the C extension task is even possible in real world. Timeline on Project Loom? And I know this is annoying, TuffleRuby, when can it run rails?
- pron 8y agoI'm the lead for Project Loom. We don't commit to a timeline on any OpenJDK projects, partly because the question of "is it good enough to release?" depends on feedback. I can say that early access builds will be available in a couple of months, and that I don't think it's too soon to take Loom into consideration if you're now planning a new long-term project. Native image is, indeed, Substrate VM, but I'll let Graal people address the Graal questions.
- apta 8y ago> I can say that early access builds will be available in a couple of months, and that I don't think it's too soon to take Loom into consideration if you're now planning a new long-term project. That's great to hear. Can anyone contribute to the project to help out?
- pron 8y agoSure. What we need most is for people to try the API and give us feedback, try running various frameworks with fibers and give us feedback etc..
- eklavya 8y agoHoping to see some Scala speedups with tail call optimisations finally possible :)
- pron 8y agoTail calls will come later. We're focusing on fibers, first (there's a cost/benefit consideration).
- hhjinks 8y agoCan someone provide a simple explanation of Graal for those of us who are completely oblivious of all of the concepts of Graal?
- shubhamaggarwal 8y agoHere's a nice intro video: https://www.youtube.com/watch?v=MN6jNIwl2FQ https://www.youtube.com/watch?v=MN6jNIwl2FQ
- nimish 8y agoIs there a good tutorial on contributing to the language implementations like graalpython?
- aardvark179 8y agoThere is an example simple language which may be a good place to start. It’s also worth asking on gitter as most language teams either have some good introductory tasks they can give you, or can come up with something. It’s very different from working with a bytecode compiler and a normal vm and interpreter, but lots of fun to work with.