Java Performans, Hafıza Ve Çöp Toplayıcı Ayarı, İyileştirmeleri Ve Yönetimi

javaperformancetuning.com
java-performance.info
javaspecialists.eu/services/performance_consulting.jsp
iteratrlearning.com/performancetesting
oracle.com /technetwork/java/javase/memorymanagement-whitepaper-150215.pdf
web.deu.edu.tr /doc/oracle/B25016_04/web/B14032_03/appA006.htm
medium.com /@peterlee2068/java-memory-management-37f5483b23c1
oracle.com /technical-resources/articles/javase/perftuning.html Java performans aracı ürünleri: kodewerk.com
jclarity.com Java performans iyileştirmeleri için uğraşabileceğiniz bazı konular: • JVM, Heap, Garbage Collector • Responsiveness & Throughput • Java Visual VM • Get Heap Dump • Get Thread Dump • IBM Thread and Monitor Analyzer for Java • Eclipse Memory Analyzer (MAT) • Sampling, Profiling Java hafıza yönetimi ile ilgili olarak aşağıdaki İngilizce yazıları inceleyebilirsiniz. dzone.com /articles/java-memory-management medium.com /@larry.l.fang/jvm-memory-optimisation-in-docker-46cda197295a Java çöp toplayıcı ayarı için ise aşağıdaki İngilizce yazı ve kursları inceleyebilirsiniz. cubrid.org/blog/how-to-tune-java-garbage-collection iteratrlearning.com/javagc Genel Java Performansı ile ilgili temel konu başlıkları aşağıdaki gibidir. – Performance Basics – Latency and throughput model – Benchmarking – Types and purpose of benchmarks – Avoiding common mistakes – Improving Observability – Taking measures – Logging – Java Management eXtensions – jPDM, A Performance Diagnostic Model – Using key metrics to categorize a performance bottleneck – OS, JVM, Application, liveliness – Java Memory Management – Java memory management (in a nutshell) – GC logging – GC tuning tactics – Profiling – Execution profiling – Memory profiling – Memory leaks Books: amazon.com Java Performance by Charlie Hunt Oracle: oracle.com/webfolder/technetwork/tutorials/obe/java/gc01/index.html https://blog.devgenius.io/java-garbage-collection-what-is-the-young-generation-old-generation-and-permanent-generation-953462ae2598 tugrulbayrak.medium.com/jvm-garbage-collector-nedir-96e76b6f6239 recepinanc.medium.com/til-12-garbage-collection-young-vs-old-generations-ab95b6a68653 To Capture HeapDump and analyze it: [code lang=”shell”] jps [/code] [code lang=”shell”] jmap -heap <pid> [/code] output: [code lang=”shell”] Attaching to process ID 96921, please wait… Debugger attached successfully. Server compiler detected. JVM version is 24.51-b03 using thread-local object allocation. Parallel GC with 4 thread(s) Heap Configuration: MinHeapFreeRatio = 40 MaxHeapFreeRatio = 70 MaxHeapSize = 1073741824 (1024.0MB) NewSize = 671088640 (640.0MB) MaxNewSize = 671088640 (640.0MB) OldSize = 5439488 (5.1875MB) NewRatio = 2 SurvivorRatio = 5 PermSize = 33554432 (32.0MB) MaxPermSize = 85983232 (82.0MB) G1HeapRegionSize = 0 (0.0MB) Heap Usage: PS Young Generation Eden Space: capacity = 480247808 (458.0MB) used = 81462752 (77.68893432617188MB) free = 398785056 (380.3110656738281MB) 16.962649416194733% used From Space: capacity = 95420416 (91.0MB) used = 61444600 (58.59813690185547MB) free = 33975816 (32.40186309814453MB) 64.39355703500601% used To Space: capacity = 95420416 (91.0MB) used = 0 (0.0MB) free = 95420416 (91.0MB) 0.0% used PS Old Generation capacity = 5767168 (5.5MB) used = 90128 (0.0859527587890625MB) free = 5677040 (5.4140472412109375MB) 1.5627774325284092% used PS Perm Generation capacity = 35127296 (33.5MB) used = 35092152 (33.46648406982422MB) free = 35144 (0.03351593017578125MB) 99.89995244723647% used 15721 interned Strings occupying 1939128 bytes. [/code] [code lang=”shell”] jmap -histo <pid> [/code] output: [code lang=”shell”] num #instances #bytes ClassName(module) ——————————————— [/code] or for live object as histogram format [code lang=”shell”] jmap -histo:live <pid> [/code] output: [code lang=”shell”] num #instances #bytes ClassName(module) ——————————————— [/code] [code lang=”shell”] jmap -finalizerinfo <pid> [/code] [code lang=”shell”] jmap -clstats <pid> [/code] To get automatically dump file you can use these VM parameters [code lang=”shell”] -XX:+HeapDumpOnOutOfMemoryError -XX:HeapDumpPath=/data/tomcat8/MYAPPNAME/logs [/code] or for all objects: [code lang=”shell”] jmap -dump:format=b,file=/tmp/ <pid> [/code] for only live objects: [code lang=”shell”] jmap -dump:live,format=b,file=/tmp/dump-20230711.hprof <pid> [/code] Analyze dump file with below tools: Eclipse MAT or VisualVM [code lang=”shell”] jcmd <pid> [/code] [code lang=”shell”] jcmd <pid> VM.info jcmd <pid> VM.flags jcmd <pid> VM.uptime jcmd <pid> GC.heap_info jcmd <pid> GC.heap_dump [/code] ]]>

Leave a Reply

Your email address will not be published. Required fields are marked *