RSS feed [root] /weblog /performance /java



title search:


Mon Jul 03 07:37:43 GMT 2023


(google search) (amazon search)
download zip of files only

Sat Jul 01 14:23:08 GMT 2023 From /weblog/java/performance


Another blog of discussion of difference profiler -

Introduction to jmap, visualvm and btrace -

JMP is an easy to setup and provide real time data choice. However it will crash JVM occasionally. So may be the one using web interface is better for us:

Articles -
Onjava -
Eclipsecolorer profiler, however that plugin require you install binary yourself, somehow tedious if you move from one machine to another machine -[..]tss?l=EclipseProfiler&asrc=EM_NLN_476666

A total java version of profiler!!:

Few other profiler haven't get time to try:

Eclipse plugin:

Need $$:

See if the information useful.

How to measure with less than milli second -[..]15/10/measuring-microsecond-in-java.html

Unleash the Power of Open Source Java Profilers: Comparing VisualVM, JMC, and async-profiler -

(google search) (amazon search)

Thu Apr 20 13:08:46 GMT 2023 From /weblog/java/performance


Will you get any performance improvement if you manage memory yourself? -[..]ne-is-faster-java-heap-or-native-memory/

More heap, GC will get slower -[..]ing-heap-size-beware-of-the-cobra-effect

Collection of tools to analysis GC activities -

Another presentation of performance hint for hotspot or memory -

Show how to enable and analyze the verbose:gc out data -[..]3/01/java-verbose-gc-tutorial-video.html

Discussion and comparison of difference GC at Java 1.7 -[..]7/java-garbage-collection-distilled.html . And here is the detail experiment among those difference GC, look like G1 is quite promising -[..]ng-and-benchmarking-java-7s-garbage.html

Memory is not allocate to single block, thus even you allocate enough memory in term of size, it may not enough to held individual object -

Introduction to metaspace -[..]optimising-memory-consumption-first.html

Some comments about System.gc() -[..]om/2015/12/why-i-dont-like-systemgc.html[..]ng-your-java-garbage-collection-overhead

Logging stop-the-world pauses in JVM -[..]log/logging-stop-the-world-pauses-in-jvm

Why we should put difference app in same VM -[..]0/generational-disparity-in-garbage.html

Atlassian GC tuning guide -[..]ollection-gc-tuning-guide-461504616.html

Using jemalloc to get to the bottom of a memory leak -[..]c-to-get-to-the-bottom-of-a-memory-leak/

Troubleshooting-Java-Memory-Issues -

Useful parameters for OOME -

Why Java's TLABs are so important and why write contention is a performance killer in multicore environments -

MMU gang wars: the TLB drive-by shootdown -

Latency implications of virtual memory -

foreign-memaccess -[..]cimadamore/panama/foreign-memaccess.html

Detect proactively whether application’s memory is under-allocated -

Panama: Not-so-Foreign Memory. Using MemorySegment as a high-performance ByteBuffer replacement without a 2GB limit. -[..]soforeign_memory_using_memorysegment_as/

What’s the deal with humongous objects in Java? -[..]-the-deal-with-humongous-objects-in-java

Netflix on Java: How to build a 1TB Non-Heap, ultra-efficient application for video streaming - an example -[..]on-heap-application-for-video-streaming/

(google search) (amazon search)

Wed Mar 08 12:41:52 GMT 2023 From /weblog/java/performance


Debugging RAM: Java Garbage Collection - Java Heap Deep Dive, Part 1 -[..]ge-collection-java-heap-deep-dive-part-1

Concurrent Marking in G1 -

What Should I Know About Garbage Collection as a Java Developer? -[..]t-garbage-collection-as-a-java-developer

(google search) (amazon search)

Mon Apr 25 00:31:35 GMT 2022 From /weblog/java/performance


Performance comparison for various implementation -[..]-sachs-hppc-koloboke-trove-january-2015/

Java Hashtable, HashMap, ConcurrentHashMap – Performance impact -[..]ap-concurrenthashmap-performance-impact/

Using Red-Black tree in Map -[..]shmaps-keys-and-the-comparable-interface

(google search) (amazon search)

Sun Dec 19 13:06:15 GMT 2021 From /weblog/java/performance


List some common causes of memory leak in application restart. -[..]/Weblog/your_web_app_is_leaking#comments[..]/20/the-top-java-memory-problems-part-1/

Incorrect use of threadlocal -

Memory leak if load JDBC class incorrectly -

Serialization and ResourceBundle issue from core library (fixed) -

PermHeap bloat in and only in server VM -

String.subString() still held a big big char[] -

One pitfall of URLClassLoader, it cause leak from classloader, which is not obvious from the code -

Steps of finding out a memory leak by native code -[..]e/v/Dp7Rf33tij5BFBNRpVja#YnJRjM4IVyt54TV

Interesting Garbage Collection Patterns -[..]interesting-garbage-collection-patterns/

(google search) (amazon search)

Thu Dec 02 01:03:52 GMT 2021 From /weblog/java/performance

option list

java -XX:+PrintFlagsFinal -version | findstr HeapSize , find out actual Xmx default in bytes -[..]default-parameters-of-xms-and-xmx-in-jvm

-XX:+PerfDisableSharedMem , prevent locking by sharedmem in linux -

How linkedin turn the GC -[..]ughput-and-low-latency-java-applications

Using generational & concurrent GC collector -[..]/04/ibm-jvm-tuning-gencon-gc-policy.html

Full VM option list :, update for Java7 -[..][..]ost-complete-list-of-xx-options-for.html

A simplified list for some frequency use options -[..]rbage-collector-guidelines-and-tips.html

HotSpot JVM garbage collection options cheat sheet -[..]spot-jvm-garbage-collection-options.html[..]va/javase/tech/vmoptions-jsp-140102.html

An example and story about effect of difference VM parameter affecting the performance -

Clear the code cache automatically with -XX:+UseCodeCacheFlushing -[..]time-for-long-running-java-applications/

Discussion about -XX:MinHeapFreeRatio parameter -[..]

The other detailed guide for VM parameters tuning -

Here is a more simple cookbook -

A outdated (1.4) , compehensive but still not really too detailed, overview of various GC tuning -

Some say following VM parameter is good enough
-server -Xmx -XX:+UseParallelGC[..]/page/binublog?entry=java_tuning_for_xml

Some say is useful if you have huge memory

Some say below parameter keep GC in low pause
Some say below parameter are very optimal
-XX:+DisableExplicitGC -XX:+UseConcMarkSweepGC -XX:NewSize=1200m -XX:SurvivorRatio=16[..]d.tss?thread_id=41258&ASRC=EM_NNL_347804
Some say those parameter is good

Just in case anyone is curious, the flags enabled by -XX:+AggressiveOpts in JDK 1.6.0_25 are:


Generate dump with OOME - -XX:+HeapDumpOnOutOfMemoryError

GC log sample of -XX:+UseConcMarkSweepGC -XX:PrintFLSStatistics=1 -XX:+PrintGCDetails -

A case study of tuning VM GC parameters -[..]ld-you-trust-the-default-settings-in-jvm

Explanation for few performance related VM parameters -[..]ine-options-jvm-performance-improvement/

Show the exact vm flag that java using -[..]/looking-inside-a-jvm-xxprintflagsfinal/

For G1GC -[..]e-first-garbage-collector-tuning-flags-1[..]otspot-jvm-performance-tuning-guidelines

(google search) (amazon search)

Sun Nov 28 13:19:57 GMT 2021 From /weblog/java/performance


A case showing java is faster than C++ -[..]mgroups#!topic/comp.lang.c++/7aNw3PzPvMI

Case show how to improve GC time spend on a java application -[..]11/java-vm-beware-of-younggen-space.html

A case study of solving thread contention -[..]fighting-thread-contention-in-your-code/[..]-of-java-application-performance-tuning/

Notes about measuring map performance -[..]ronicle-map-and-yahoo-cloud-service.html

High Performance Java - Binary instead of Objects - John Davies -

jemalloc, look like a really nice tool -[..]c-to-get-to-the-bottom-of-a-memory-leak/

story of finding why there is so many GC -[..]horough-jvm-thorough-analysis-ygc-part01

GC thread blocked by system call -

We always need benchmark -[..]2017/06/15/forward-vs-backward-loop.html

Investigation and solutions of performance issue caused by GC log -[..]c-pauses-caused-by-background-io-traffic

Using jemalloc to get to the bottom of a memory leak -[..]c-to-get-to-the-bottom-of-a-memory-leak/

Parallel Collection Processing: Leveraging Batching -

Maybe good to careful about collection initalization -[..]ars-with-a-single-character-code-change/

Issue of using non-thread safe collection in multi-thread -[..]oting-cpu-spike-in-a-major-trading-appli

Performance comparison of difference JVM vendor -[..]stopping_openj9_from_overtaking_hotspot/

Why we chose java for HFT -[..]equency-trading-application-600f7c04da94

5 Mundane Java Performance Tips -[..]/posts/5-java-mundane-performance-tricks

(google search) (amazon search)

Thu Jun 24 13:52:43 GMT 2021 From /weblog/java/performance


5 tips for proper Java Heap size -[..]07/5-tips-for-proper-java-heap-size.html

What does JVM do -[..]t/uploads/2011/03/2011_WhatDoesJVMDo.pdf

How Azul do pauseless GC -

New feature, DoEscapeAnalysis

A very nice blog about VM detail

Tips for configing 64bit system with large pagesize -[..]garbage-collector-in-latest-openjdk.html[..]-optimize-hot-loops-and-allow-debugging/
Just an idea -[..]aded-virtual-memory-in-java.1-46188.html
How java use native memory ( in aix ) -[..]erworks/java/library/j-nativememory-aix/

How JRebel enable dynamic adding or removing method in running VM, using existing Java technology like classloading and agent to breakthough hotswap limitation -[..]loading_java_classes_401_hotswap_jrebel/

Biased locking -

Aleksey Shipilëv: One Stop Page -

Discussion about safepoint -

JVM Pauses - It's more than GC -

(google search) (amazon search)

Sun Dec 20 14:24:50 GMT 2020 From /weblog/java/performance


How can jruby take advantage of hotspot -[..]nderstanding-jvm-jit-and-helping-it.html

Discussion about OOME -[..]01/14/jvm_lies_the_outofmemory_myth.html

How hotspot optimization ofoptimzate Polymorphism -

List of tools -

an issue of hotspot but haven't handle in 5 year -

A test for how hotspot inline method -[..]ggressive-is-method-inlining-in-jvm.html

Various JIT optimization that JVM doing -[..]uper-useful-jit-optimization-techniques/[..]ava_as_fast_as_c_when_it_comes_to_stack/

(google search) (amazon search)

Wed Apr 10 09:06:39 GMT 2019 From /weblog/java/performance


Improvement from io -> nio, then -> MappedByteBuffer -[..]blog&show=File-IO-in-Java.html&Itemid=29

How to improve performance by tuning the IO -[..]enefits-of-stream-buffering-in-Java.html

(google search) (amazon search)

Sat Mar 09 15:32:04 GMT 2019 From /weblog/java/performance


(google search) (amazon search)

Tue Dec 01 02:06:11 GMT 2015 From /weblog/java/performance


Use of LatencyUtil -[..]ime-and-latency-measurements-119298.html

performance-problems-pre-production-tests -[..]roblems-pre-production-tests-114128.html

(google search) (amazon search)

Fri Mar 27 09:19:52 GMT 2015 From /weblog/java/performance

java performance summary

A short summary of various aspect about performance -[..]07/07/javaone-talk-on-performance-myths/

Any other discussion -[..]eloperworks/java/library/j-jtp09275.html

Paper to show some prevalent methodologies can be misleading, and can even lead to incorrect conclusions. -[..]lly-rigorous-java-performance-evaluation

Discussion about various issue on microbenchmark, try to do premature optimzation -[..]/performance-anxiety-on-performance.html

Java vs C performance... again...[..]2009/09/java-vs-c-performance-again.html[..]-easy-performance-optimisations-in-java/

(google search) (amazon search)

Tue Feb 10 09:33:40 GMT 2015 From /weblog/java/performance

various tips

-XX:+TieredCompilation, -XX:+UseCompressedOops, Escape Analysis and -XX:+UseNUMA -[..]uides/vm/performance-enhancements-7.html

Interestingly, PrintWriter, if pooled, shows considerable performance improvement. The creation of the object is expensive because of a call to get the line separator in its constructor.[..]/08/experiences-in-java-performance.html

Experience in twitter -

Cases study on how to test performance from using difference GC algo -

A lot of information -[..]-1-of-3-synopsis-of-articles-videos.html

Basically use lower level construct -[..]-easy-performance-optimisations-in-java/

(google search) (amazon search)

Tue Dec 23 08:38:16 GMT 2014 From /weblog/java/performance


Comparing the Java Serialization Options -[..]_id=57871&asrc=EM_NLN_9286283&uid=703565

Use Unsafe for best performance Serialization -[..]native-cc-like-performance-for-java.html

off heap serialization -[..]/a-persistent-keyvalue-server-in-40.html

(google search) (amazon search)

Sat Jan 05 05:18:39 GMT 2013 From /weblog/java/performance


An example about improving performance by replace synchronized with volatile -

Log4j can have deadlock due to performance -[..]09/log4j-thread-deadlock-case-study.html

There is always some cost for synchronization -[..]-synchronization-be-optimisede-away.html

(google search) (amazon search)

Mon Aug 15 15:40:53 GMT 2011 From /weblog/java/performance


Offline parsing heap dump, good for analysis huge heap dump at server with GTK -[..]index.php?t=rview&goto=703990#msg_703990

Nice explanation of GC -[..]sualising-garbage-collection-in-the-jvm/

Get call back for memory allocation, should be very useful -[..]s/applying-kanban-to-it-processes-part-2

Detailed discussion of analysis memory consumption in Java -[..]mory-consumption-of-netbeans-versus.html

it probably one of the nicest feature of java 5 - dump VM for you to analyst[..]apdumponoutofmemoryerror_option_in_5_0u7

This article present a simple, and possible not accurate method to track object creation and finalization. May be not that useful in general but sometime is convenience -

checking memory consumption at object level -[..]im?entry=again_about_determining_size_of

Sun contain a nice library for we to investigate heap stat -[..]om/2005/01/java-equivalent-of-heap1.html

Use java.util.Observable to Monitor Object State changes -

(google search) (amazon search)

Sun Apr 10 01:54:33 GMT 2011 From /weblog/java/performance

dynamic compilation

Introduce the idea of using dynamic compilation to replace reflection using Janino - , but actually reflection isn't that slow -[..]1/01/is-java-reflection-really-slow.html

How to use eclipse compiler as API -[..]atch%20compile/batchCompile.html?rev=1.2

Support of annotation -

Some cases that block method inlining -[..]f/2011-04-04-fixing-the-inlining-problem

(google search) (amazon search)

Fri Mar 30 11:04:10 GMT 2007 From /weblog/java/performance

multi-core cpu

A simple test to see how your code work at multi-core CPU -

JRocky tested their JVM can use 4.5 TB memory -[..]ahl/archive/2007/03/the_biggest_jvm.html

(google search) (amazon search)

Thu Jan 18 08:05:38 GMT 2007 From /weblog/java/performance


In this article, the authors draw from their practical experience to list and discuss some critical considerations when building J2EE applications so that they can be deployed in a clustered environment without requiring any code changes.

Someone tested that using Terrcotta is much better than RMI broadcast -[..]educing-bottlenecks-in-jee-stack_14.html

(google search) (amazon search)

Thu Oct 12 10:20:38 GMT 2006 From /weblog/java/performance


Improving performance in distributed Web applications

* Keep the session minimal - generally a bad idea to store shared objects in the session.
* Don't bypass setAttribute - if you just call getAttribute() to retrieve the Vector and then add something to it without then calling setAttribute again, the container might not realize that Vector has been changed.
* Use fine-grained session attributes - finer-grained objects in the session rather than one big monolithic object.
* Invalidate when done - call HttpSession.invalidate()
* Keep the session clean - remove reference to unuse thing to help GC

(google search) (amazon search)

Thu Mar 23 07:44:36 GMT 2006 From /weblog/java/performance


Show common pitfall of cleaning up non-memory resource, stream, database resource and class level collection.[..]rks/java/library/j-jtp03216.html?ca=drs-

(google search) (amazon search)