clojure-dev

Issues: https://clojure.atlassian.net/browse/CLJ | Guide: https://insideclojure.org/2015/05/01/contributing-clojure/
devn 2019-05-01T03:16:02.038500Z

Honest question: why?

2019-05-01T03:38:31.040400Z

Clojure doesn't leverage any new Java features, so there's not a lot of utility to upgrade the JDK quite yet

seancorfield 2019-05-01T04:52:21.041200Z

@devn Why what? Why are we still on JDK 8 or why are we deploying Clojure 1.10.1 Beta 2?

seancorfield 2019-05-01T04:53:43.042700Z

The answer to the former is we are using some libraries that are not compatible with JDK 9+ and some of them can't be updated at the moment (we have some legacy infrastructure that won't run on JDK 9+ and there is no upgrade path -- so we're rewriting that stuff in Clojure so we can upgrade the JDK behind it).

seancorfield 2019-05-01T04:54:09.043300Z

The answer to the latter is that we try to test every alpha/beta of Clojure so we can provide the core team with early feedback.

seancorfield 2019-05-01T04:54:53.043900Z

(and we're loving the cleaned-up error reporting from clojure.main in a lot of our tool chain)

alexmiller 2019-05-01T05:38:19.044100Z

that's good to hear

mpenet 2019-05-01T06:48:01.044200Z

There are improvements that impact clojure "passively" (ex compact strings in java 9)

devn 2019-05-01T17:38:16.046Z

@seancorfield was asking about the former, because I knew you ran on latest Clojure, and so assumed you probably were also bravely bumping JDKs to match.

seancorfield 2019-05-01T17:39:37.047400Z

@devn That would make sense, wouldn't it? I've had a couple of attempts to move from 8 to 11 but we have a few third-party libraries in play that need updating and -- because they're Java libs, not Clojure -- they have breaking changes in even their patch updates in some cases.

seancorfield 2019-05-01T17:39:51.047700Z

(Redisson, I'm glowering at you!)

seancorfield 2019-05-01T17:40:38.048500Z

At least we've torn down the main obstacle to running on JDK 11 for four of our production servers (by decom'ing our giant CFML app 🙂 ).

ikitommi 2019-05-01T18:09:18.051600Z

@alexmiller did a minimal perf repo: https://github.com/ikitommi/bench, my results & versions in the README. Uses deps.edn, and just tests how fast is (merge {:a 1} {:b 2}). Tested also with openjdk8, same results.

alexmiller 2019-05-01T19:08:22.054100Z

ok? not sure what you want me to do with that. my general experience has been that each major java version provides general performance improvements measurable at the macro level on real loads. you might see something different in microbenchmarks.

ikitommi 2019-05-01T20:19:47.058200Z

ok, I guess it's the new G1 GC, which is on by default in Java11, no regression on the Clojure side (my initial worry). Good read here on the impact in perf: http://blog.mgm-tp.com/2018/01/g1-mature-in-java9/

jumar 2019-05-02T12:07:57.060Z

That might be true but that's a wild guess and those are especially dangerous when it comes to performance. Given how difficult is to write reliable micro-benchmark I'd second Alex's advice to test on real loads.

ikitommi 2019-05-02T17:14:49.060200Z

@jumar rerun the java8 tests with G1 enabled, it’s 30% slower than with Java11. As the article describes, G1 is a slower GC, but works better on multicore (default criterium tests use just 1 core). G1 has gotten much faster on Java11, still bit slower on 1 core than the Java8 default one, but faster on multicore. So, the “perf regression” is a Java-thing, not Clojure. The GC defaults have just changed.

jumar 2019-05-02T18:05:02.060400Z

G1 is a different garbage collector with different tradeoffs than Parallel collector. Do you optimize for throughput / allocation rates? Btw. criterium is definitely a nice library but given JVM complexity it's still far from perfect. - still may lead to misleading results. This is a good post if you're interested in some perspective on intricacies of microbenchmarking: https://mechanical-sympathy.blogspot.com/2011/11/biased-locking-osr-and-benchmarking-fun.html I'm not saying you're not right just that you should be very careful what conclusions you drive from your benchmarks

seancorfield 2019-05-01T20:30:49.058800Z

@ikitommi FWIW we've used the G1 collector in production on JDK 8 for ages.

đź‘Ť 2
souenzzo 2019-05-01T23:34:36.059700Z

G1 @ JVM8 is a datomic recommendation