graalvm

Discuss GraalVM related topics. Use clojure 1.10.2 or newer for all new projects. Contribute to https://github.com/clj-easy/graal-docs and https://github.com/BrunoBonacci/graalvm-clojure. GraalVM slack: https://www.graalvm.org/slack-invitation/.
Ben Sless 2021-06-08T05:19:14.073100Z

Is there a difference between the JVM distributed as part of GraalVM and other distributions?

borkdude 2021-06-08T07:08:44.076Z

Yes, the compiler is different, more optimizations

Ben Sless 2021-06-08T08:07:45.076200Z

huh, I did not know that. You mean the JIT compiler? Should it be considered experimental?

borkdude 2021-06-08T08:24:50.076400Z

No, GraalVM is supported as part of the Java SE subscription even

borkdude 2021-06-08T08:25:00.076600Z

They have LTS releases as well

borkdude 2021-06-08T08:25:41.076800Z

https://www.graalvm.org/why-graalvm/#run-java-faster

Hukka 2021-06-08T05:21:51.074600Z

Somewhat tangentially related to graalvm, but has anyone heard of a helper that would kick up the native-image binary, and immediately after that start up the JVM version, and switch to that? Doing it in place would require support in graalvm itself, but perhaps even on http level (assuming that there are many small requests, not just one huge one)? You know, eating and having the cake and so on…

Hukka 2021-06-08T05:22:59.074700Z

I guess Kubernetes could handle this for me, but I was thinking about making a single container that could do this internally, without depending on any external orchestration

Ben Sless 2021-06-08T06:40:47.074900Z

How would you deal with port bindings? Seems like you'd have to use a container You'll also need some time to warm the jit up

Hukka 2021-06-08T06:47:23.075100Z

If I'd have to start from scratch, I guess I would make a small proxy that has the external port open, it then starts first the native image and starts forwarding to that, and then the JVM and starts forwarding there instead

Hukka 2021-06-08T06:48:24.075300Z

Pragmatically I wouldn't really be making that, it's not that much of a cost to just keep a long running JVM instance on all the time, and scale that up when load increases, instead of scaling all the way down to zero

Hukka 2021-06-08T11:06:08.077800Z

Ugh, looks like Clojure running on Truffle is super slow. Startup is 10× and trying to run the test dataset actually froze the computer, before I had time to react to memory running out

borkdude 2021-06-08T11:09:46.078300Z

@tomi.hukkalainen_slac What exactly did you do to run Clojure on Truffle? Did you make a Truffle interpreter for Clojure?

Hukka 2021-06-08T11:11:38.078700Z

Just gu install espresso and java -truffle on the jar file

borkdude 2021-06-08T11:12:55.079200Z

This is very much expected. espresso is a truffle interpreter that interprets bytecode.

borkdude 2021-06-08T11:13:09.079500Z

It is not expected to be faster than executing bytecode directly.