Java Performance Tuning

Topics

Serializing and Deserializing

Couchbase Client Configuration

Spring Boot Configuration

JVM

Serializing and Deserializing

Serializing and Deserializing

Use Afterburner module that will add dynamic bytecode generation for standard Jackson POJO serializers and deserializers, eliminating majority of remaining data binding overhead

Use streaming api for the best performance

Streaming API instead of data binding, you may be able to increase throughput by 30-40%

Couchbase Client Configuration

Linux Netty provides a way to use edge triggered epoll instead of going through JVM NIO. This provides better throughput, lower latency and less garbage

Couchbase Client Configuration

Disable all collectors metrics !

  • Runtime collectors

The configuration of the runtime metrics collector can be modified (or completely disabled). By default, it will emit an event every hour.

  • Network Latency Metrics Collector

The configuration of the network latency metrics collector can be modified (or completely disabled). By default, it will emit an event every hour, but collect the stats all the time.

Couchbase Client Configuration

Spring Boot Configuration

  • Startup time and memory usage have been reduced by making use of proxyBeanMethods=false in Spring Boot’s @Configuration classes
  • This flag to false in order to avoid CGLIB subclass processing
  • Disable Datasource auto-configuration for fast startup time
  • Disable jmx
  • Enable lazy-initialization
  • Upgrade spring boot 2.2+

deck

By gökhan karadaş

deck

  • 223