Posts

Showing posts from August, 2022

J Forum

I joined an online conference called J Forum which explored the current state of Java ecosystem, ahead of this September's release of Java 19. Here are some takeaways: Garbage Collector Ergonomics . There are several GC selections for various situations. Here are the recommendations: Serial: single core, smal heaps Parallel: multi-core small heaps; batch jobs with any heap size G1: responsive in medium to large heaps (request-response/DB interactions); only when processors 2+ and memory 1728MB+ Z: responsive in medium to large heaps (request-response/DB interactions); JDK 17+; Pause < 1ms Shenandoah: responsive in medium to large heaps (request-response/DB interactions); JDK 17+; Pause <10ms GC Tuning does not only rely on setting heap size ( -Xmx for well-sized workloads,  -XX:MaxRAMPercentage for workloads to be scaled along container memory limits, -XX:ActiveProcessorCount ), but also understanding the workload. You should select appropriate GC and have enough CPUs (che

YFinance4J and Java 17 New Features

Java 17 as LTS has been released since Sep 2021 while Java 8 remains widely used. I have prepared a Java library for Yahoo! Finance called YFinance4J to demonstrate some new features after Java 8. Hopefully the new features may tempt you to switch.