lhotari commented on PR #23903: URL: https://github.com/apache/pulsar/pull/23903#issuecomment-2621381939
> Sharing some test result: object pooling vs jvm young gc performance test Thank you @heesung-sn for conducting these performance tests comparing object pooling and JVM young generation garbage collection. While the initial results are interesting, I have some concerns about the reliability of manual benchmarking on the JVM. Microbenchmarks are particularly susceptible to JVM optimizations and warmup effects that can skew results. I'd strongly recommend using JMH (Java Microbenchmark Harness) for this type of analysis, as it: - Handles JVM warmup properly - Provides detailed GC statistics - Accounts for common benchmarking pitfalls - Offers consistent methodology The good news is that we already have JMH configured in our project at https://github.com/apache/pulsar/tree/master/microbench, so adding new benchmarks should be straightforward. Some specific suggestions for the next round of testing: - Create comparative benchmarks for RangeCache with and without object recycling - Include tests with both G1GC and ZGC ZGenerational on Java 21 to understand performance across different garbage collectors Once we have these JMH results, we can make a data-driven decision about whether to remove the recycled objects usage from RangeCache entirely. Let me know if you'd like help setting up these JMH benchmarks. -- This is an automated message from the Apache Git Service. To respond to the message, please log on to GitHub and use the URL above to go to the specific comment. To unsubscribe, e-mail: [email protected] For queries about this service, please contact Infrastructure at: [email protected]
