To be determined
In the competitive world of software development, mastering performance optimization in Java can significantly enhance the efficiency and responsiveness of your applications. The High-Performance Java Training Course is meticulously designed to equip developers with the skills and knowledge needed to write high-performance Java code that meets the demands of modern applications.
This comprehensive training course spans over ten intensive days, combining theoretical lessons with practical, hands-on exercises. It covers a wide range of performance-related topics, ensuring that participants gain a deep understanding of the Java Virtual Machine (JVM), efficient coding practices, bottleneck detection, and advanced performance tuning techniques. The course touches a plethora of seemingly unrelated areas into a unique training offering.
Key Learning Objectives:
By the end of the High-Performance Java Training Course, participants will be able to:
Java Developers & Architects
Good knowledge of Java
Module 1: Performance tuning overview [6h]
● Common practices
● Tuning strategies
● Performance metrics (latency, throughput, bandwidth)
● How to improve performance
● Tools for performance measurement
● JMeter
● Writing load tests with JMeter
● How to optimize work with the database
● Database access time comparison (JDBC, Spring Data, batch, and transactions)
● Using a stress test to detect concurrency issues
● Detecting and resolving transactional problems
● How to improve performance via architecture: streams, queues, microservices, & clouds
● Common best practices for improving code performance
[Homework 3h]
Module 2: GC algorithms [6h]
● Usage of memory by Java objects
● Common approaches and algorithms of garbage collectors
● Serial GC garbage collector
● Parallel GC garbage collector
● CMS garbage collector
● G1 garbage collector
● Shenandoah garbage collector
● Garbage collectors tuning
● Instruments to gather metrics of garbage collection
● How to select the optimal garbage collector
Module 3: HotSpot JIT compiler [5h]
● JIT compilation
● Java byte code
● Tiered compilation
● Code cache and tuning
● Code optimizations
● Code deoptimization (and when it happens)
● JITWatch instrument to analyze compiling results
● Types of optimization
● Speculative optimizations
● Compiler tuning
● AOT compilation
● GraalVM
[Homework 2h]
Module 4: JVM flags [3h]
● Purpose and categories of JVM flags
● Common flags
● String-related flags
● Memory management flags
● Safepoints and related flags
● TLABs and related flags
● JVM tuning plan
Module 5: Java benchmarking with JMH [2h]
● What is benchmarking?
● Introduction to JMH
● API of JMH
● Untrivial examples
● JMH practice
[Homework 2h]
Module 6: Using off-heap memory and efficient data structures [4h]
● What is sun.misc.Unsafe?
● Unsafe methods
● Native memory performance
● Creation of data structures in native memory
● Measurements of the performance of native memory (and comparison with memory on the heap)
● Primitive collections
● Denormalization of data
● Foreign Memory Access API
[Homework 2h]
Module 7: Serialization and networking [3h]
● JSON serializers (GSON, Jackson)
● Binary serializers (Protobuf, Jackson Smile, Kryo, FST, One NIO)
● Performance comparison of various serializators
● Networking performance when connecting using various protocols: HTTP/REST, gRPC, TCP, Async TCP, RSocket, Netty server/client, and using libraries
Module 8: Java profiling [5h]
● When and how to do profiling
● Sampling and instrumenting profilers
● Using Java VisualVM for profiling
● Profiling with Spring AOP
● Profiling with IDEA and async profiler
● Java Flight Recorder
● Analysis of Java Flight Recorder logs using Mission Control
● Create and log custom JFR events
● Using Java agents injected into code (to record events in Java Flight Recorder)
● Writing programs for automatic analysis of JFR logs
● Collecting and analyzing SQL queries using JFR
● Collecting and analyzing REST requests using JFR
● Application Performance Management tools
● Using Glowroot for SQL queries and REST requests profiling and analysis
[Homework 2h]
Module 9: Monitoring and analysis of heap data / Memory leaks [3 hours]
● Tools for analyzing heap memory
● Signs of memory leaks
● Main causes of memory leaks
● Search and detection of memory leaks
● Weak and phantom references
● IDEA tools to analyze heap dumps
● Async profiler to analyze memory consumption
● Using VisualVM profiler generations count to detect a memory leak
● Using MissionControl/JFR for automatic memory leak analysis
● Eclipse Memory Analyser – denominators and heap analysis
Module 10: Java caching [3 h]
● Caching patterns
● HTTP caching
● Creating intermediate cache with nginx
● Caching libraries configuration
● Popular caching libraries: EhCache, Caffeine
● Service level caching
● Caching Spring Services
● Input/Output buffering
● Processor caches and contiguous memory
● JPA/Hibernate caching
● Using caches on different layers of the application
Total: theory 40h (100%), homework 11h (+28%)