advanced
Optimize Garbage Collection Pauses
Analyze and tune garbage collection parameters for a low-latency Java application.
📝 提示内容
Act as a Java Performance Expert. Analyze a latency-sensitive financial trading application experiencing frequent Stop-The-World (STW) pauses. Provide a deep dive into tuning the G1 Garbage Collector or ZGC for minimal latency. Explain specific JVM flags to adjust, how to analyze GC logs, and trade-offs between throughput and pause times. Suggest code-level changes to reduce allocation pressure in the critical path.