RSS feed [root] /weblog /performance /java



title search:


Sun Nov 13 09:31:09 HKT 2016


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

Sat Nov 18 16:29:46 HKT 2017 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 -

Shenandoah Garbage Collector look good -[..]emory-usage-right-garbage-collector.html

(google search) (amazon search)

Tue Nov 07 16:01:37 HKT 2017 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

(google search) (amazon search)

Tue Feb 28 16:39:40 HKT 2017 From /weblog/java/performance


Free online GC log Analyzer -

Free online thread analyzer -[..]y-and-cpu-monitoring-tools-and-technique

(google search) (amazon search)

Tue Jan 03 09:42:59 HKT 2017 From /weblog/java/performance

option list

-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

(google search) (amazon search)

Fri Jul 29 15:20:32 HKT 2016 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/

(google search) (amazon search)

Wed Jun 01 18:48:52 HKT 2016 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 -

(google search) (amazon search)

Tue May 24 10:51:03 HKT 2016 From /weblog/java/performance


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

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

(google search) (amazon search)

Tue Dec 01 10:06:11 HKT 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)

Mon Nov 09 15:46:49 HKT 2015 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

(google search) (amazon search)

Fri Mar 27 17:19:52 HKT 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 17:33:40 HKT 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 16:38:16 HKT 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)

Mon Mar 25 21:00:46 HKT 2013 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

(google search) (amazon search)

Sat Jan 05 13:18:39 HKT 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 23:40:53 HKT 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 09:54:33 HKT 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)

Wed Sep 16 01:05:41 HKT 2009 From /weblog/java/performance


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

(google search) (amazon search)

Fri Mar 30 19:04:10 HKT 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 16:05:38 HKT 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 18:20:38 HKT 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 15:44:36 HKT 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)