I wasn’t able to find any optimized builds of the JDK for riscv64 (that specifically don’t use the “Zero VM”), so I went ahead and built one for folks to use.
While debian/ubuntu provide openjdk packages, they are built with the interpreted-only Zero VM. However, JDK 19+, offer native riscv64 optimized HotSpot server VMs, if it’s built with that feature. That’s what my build does – it supports GLIBC 2.5+, so its more compatible with various ubuntu and debian versions. You can check it out here: GitHub - fizzed/nitro: Alternative OpenJDK builds for architectures such as riscv64
It has roughly 4-8 x’ed the performance of the JVM on my VF2 and it’s currently beating my RPi4 in many tests. Would love to know what you think or if there’s any other optimizations folks can think of.
Tinspin, that OpenJDK collab you posted was the work done to make the JIT (e.g. Hotspot) work well for riscv64. What I posted was a binary build of OpenJDK 19 that activated the JIT (e.g. Hotspot) for riscv64. If you try to install debian’s default “openjdk-19-jdk” package, it’ll contain the “zero vm” which isn’t JIT/hotspot and will run very slow.
Can somebody check run javac & java inside docker?
I have a crash when run java in docker containers, but its work on host machine. I tested jdk-19.0.1+10, 19.0.2+7 from source, 20-ga, with docker images riscv64/ubuntu:22.04, riscv64/ubuntu:22.10, riscv64/debian, handmade images by debootstrap based ubuntu jammy. All variants had a failure. Docker versions 20.10.12, 20.10.23 from ubuntu\debian ports
Nice to see you there, and sorry for your board.
I’m using your JDK20 nighly builds everyday without any issue (not testing extensively, just using). I’ve made a Jenkins job to download and replace the binaries every day, if they are available.