RSS feed [root] /weblog /performance /java




login:

password:

title search:




 


Sun Nov 13 09:31:09 HKT 2016

performance



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

Thu Mar 30 14:48:57 HKT 2017 From /weblog/java/performance

memory


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

More heap, GC will get slower - http://plumbr.eu[..]ing-heap-size-beware-of-the-cobra-effect

Collection of tools to analysis GC activities - http://www.fasterj.com/tools/gcloganalysers.shtml

Another presentation of performance hint for hotspot or memory - http://www.infoq.com/presentations/Extreme-Performance-Java

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

Discussion and comparison of difference GC at Java 1.7 - http://mechanical-sympathy.blogspot.com.au[..]7/java-garbage-collection-distilled.html . And here is the detail experiment among those difference GC, look like G1 is quite promising - http://java-is-the-new-c.blogspot.com.au[..]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 - https://plumbr.eu/blog/outofmemoryerror-on-overprovisioned-heap

Introduction to metaspace - http://www.infoq.com/articles/Java-PERMGEN-Removed

http://vanillajava.blogspot.com.au[..]optimising-memory-consumption-first.html

Some comments about System.gc() - http://jeremymanson.blogspot.com[..]om/2015/12/why-i-dont-like-systemgc.html

http://blog.takipi.com[..]ng-your-java-garbage-collection-overhead

Logging stop-the-world pauses in JVM - https://plumbr.eu[..]log/logging-stop-the-world-pauses-in-jvm

Why we should put difference app in same VM - http://mydailyjava.blogspot.hk[..]0/generational-disparity-in-garbage.html

Atlassian GC tuning guide - https://confluence.atlassian.com[..]ollection-gc-tuning-guide-461504616.html

Using jemalloc to get to the bottom of a memory leak - https://gdstechnology.blog.gov.uk[..]c-to-get-to-the-bottom-of-a-memory-leak/

Troubleshooting-Java-Memory-Issues - https://www.infoq.com/articles/Troubleshooting-Java-Memory-Issues

(google search) (amazon search)


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

tools


Free online GC log Analyzer - http://gceasy.io/

Free online thread analyzer - http://fastthread.io/

https://dzone.com[..]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 - http://www.evanjones.ca/jvm-mmap-pause.html

How linkedin turn the GC - http://engineering.linkedin.com[..]ughput-and-low-latency-java-applications

Using generational & concurrent GC collector - http://www.javacodegeeks.com[..]/04/ibm-jvm-tuning-gencon-gc-policy.html

Full VM option list : http://blogs.sun.com/roller/resources/watt/jvm-options-list.html, update for Java7 - http://nerds-central.blogspot.com[..]ot.com/2011/07/all-jvm-7-xx-options.html http://stas-blogspot.blogspot.com[..]ost-complete-list-of-xx-options-for.html

A simplified list for some frequency use options - http://rdafbn.blogspot.com.au[..]rbage-collector-guidelines-and-tips.html

HotSpot JVM garbage collection options cheat sheet - http://aragozin.blogspot.com[..]spot-jvm-garbage-collection-options.html http://www.oracle.com[..]va/javase/tech/vmoptions-jsp-140102.html

An example and story about effect of difference VM parameter affecting the performance - http://www.javaspecialists.eu/archive/Issue191.html

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

Discussion about -XX:MinHeapFreeRatio parameter - http://www.gossamer-threads.com[..]s.com/lists/lucene/java-user/44286#44286

The other detailed guide for VM parameters tuning - http://java.sun.com/j2se/1.5/pdf/jdk50_ts_guide.pdf

Here is a more simple cookbook - http://java.sun.com/performance/reference/whitepapers/tuning.html

A outdated (1.4) , compehensive but still not really too detailed, overview of various GC tuning - http://www.petefreitag.com/articles/gctuning/

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

Some say is useful if you have huge memory
-XX:+UseLargePages
http://blogs.sun.com[..]dagastine?entry=java_se_tuning_tip_large

Some say below parameter keep GC in low pause
-XX:MaxGCPauseMillis=5000
Some say below parameter are very optimal
-XX:+DisableExplicitGC -XX:+UseConcMarkSweepGC -XX:NewSize=1200m -XX:SurvivorRatio=16
http://www.theserverside.com[..]d.tss?thread_id=41258&ASRC=EM_NNL_347804
Some say those parameter is good
-XX:+UseConcMarkSweepGC
-XX:ParallelCMSThreads=1
-XX:+CMSIncrementalMode
-XX:+CMSIncrementalPacing
-XX:CMSIncrementalDutyCycleMin=0
-XX:CMSIncrementalDutyCycle=10
http://blog.mikiobraun.de/2010/08/cassandra-gc-tuning.html

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

-XX:+EliminateAutoBox
-XX:AutoBoxCacheMax=20000
-XX:BiasedLockingStartupDelay=500
-XX:+DoEscapeAnalysis
-XX:+OptimizeStringConcat
-XX:+OptimizeFill

Generate dump with OOME - -XX:+HeapDumpOnOutOfMemoryError

GC log sample of -XX:+UseConcMarkSweepGC -XX:PrintFLSStatistics=1 -XX:+PrintGCDetails - https://gist.github.com/1329783

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

Explanation for few performance related VM parameters - http://www.techpaste.com[..]ine-options-jvm-performance-improvement/

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

For G1GC - https://dzone.com[..]e-first-garbage-collector-tuning-flags-1

(google search) (amazon search)


Fri Jul 29 15:20:32 HKT 2016 From /weblog/java/performance

hotspot


How can jruby take advantage of hotspot - http://headius.blogspot.com[..]nderstanding-jvm-jit-and-helping-it.html

Discussion about OOME - http://www.codingthearchitecture.com[..]01/14/jvm_lies_the_outofmemory_myth.html

How hotspot optimization ofoptimzate Polymorphism - http://blogs.azulsystems.com/cliff/2008/03/another-round-o.html

List of tools - http://www.jroller.com/lmchung/entry/java_performance_tools

an issue of hotspot but haven't handle in 5 year - http://bugs.sun.com/view_bug.do?bug_id=6186134

A test for how hotspot inline method - http://java.dzone.com/articles/how-aggressive-method-inlining http://nurkiewicz.blogspot.com.au[..]ggressive-is-method-inlining-in-jvm.html

Various JIT optimization that JVM doing - http://blog.takipi.com[..]uper-useful-jit-optimization-techniques/

(google search) (amazon search)


Wed Jun 01 18:48:52 HKT 2016 From /weblog/java/performance

vm


5 tips for proper Java Heap size - http://javaeesupportpatterns.blogspot.hk[..]07/5-tips-for-proper-java-heap-size.html

What does JVM do - http://www.azulsystems.com[..]t/uploads/2011/03/2011_WhatDoesJVMDo.pdf

How Azul do pauseless GC - http://www.artima.com/forums/flat.jsp?forum=226&thread=309917

New feature, DoEscapeAnalysis http://www.google.com.hk/search?q=DoEscapeAnalysis

A very nice blog about VM detail
http://blogs.sun.com/roller/page/jonthecollector?catname=%2FJava

Tips for configing 64bit system with large pagesize - http://andrigoss.blogspot.com/2008/02/jvm-performance-tuning.html

http://jeremymanson.blogspot.com[..]garbage-collector-in-latest-openjdk.html

http://www.cliffc.org[..]-optimize-hot-loops-and-allow-debugging/
Just an idea - http://jaxenter.com[..]aded-virtual-memory-in-java.1-46188.html
How java use native memory ( in aix ) - https://www.ibm.com[..]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 - http://www.zeroturnaround.com[..]loading_java_classes_401_hotswap_jrebel/

Biased locking - http://blogs.sun.com/dave/entry/biased_locking_in_hotspot

Aleksey Shipilëv: One Stop Page - http://shipilev.net/

Discussion about safepoint - http://psy-lob-saw.blogspot.se/2015/12/safepoints.html

(google search) (amazon search)


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

collection


Performance comparison for various implementation - http://java-performance.info[..]-sachs-hppc-koloboke-trove-january-2015/

http://marxsoftware.blogspot.com/2015/12/discovering-trove.html

Using Red-Black tree in Map - https://dzone.com[..]shmaps-keys-and-the-comparable-interface

(google search) (amazon search)


Wed May 18 18:52:26 HKT 2016 From /weblog/java/performance

cases


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

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

A case study of solving thread contention - http://blogs.mulesoft.org[..]fighting-thread-contention-in-your-code/

http://www.cubrid.org[..]-of-java-application-performance-tuning/

Notes about measuring map performance - http://vanillajava.blogspot.com.au[..]ronicle-map-and-yahoo-cloud-service.html

High Performance Java - Binary instead of Objects - John Davies - https://vimeo.com/138956045 http://www.infoq.com/presentations/java-low-latency

jemalloc, look like a really nice tool - https://gdstechnology.blog.gov.uk[..]c-to-get-to-the-bottom-of-a-memory-leak/

story of finding why there is so many GC - http://www.infoq.com[..]horough-jvm-thorough-analysis-ygc-part01

(google search) (amazon search)


Tue Dec 01 10:06:11 HKT 2015 From /weblog/java/performance

measurement


Use of LatencyUtil - https://jaxenter.com[..]ime-and-latency-measurements-119298.html

performance-problems-pre-production-tests - https://jaxenter.com[..]roblems-pre-production-tests-114128.html

(google search) (amazon search)


Mon Nov 09 15:46:49 HKT 2015 From /weblog/java/performance

profiler


http://java-performance.info/introduction-jmh-profilers/

Another blog of discussion of difference profiler - http://blog.orange11.nl/2012/03/13/java-profiler-comparison/

Introduction to jmap, visualvm and btrace - http://www.infoq.com/articles/java-profiling-with-open-source

JMP http://www.khelekore.org/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: http://oss.metaparadigm.com/jmemprof/

Articles -
Onjava - http://www.onjava.com/lpt/a/6689
Eclipsecolorer profiler, however that plugin require you install binary yourself, somehow tedious if you move from one machine to another machine - http://www.theserverside.com[..]tss?l=EclipseProfiler&asrc=EM_NLN_476666

A total java version of profiler!!: http://jiprof.sourceforge.net

Few other profiler haven't get time to try:
Free:
http://jcoverage.sourceforge.net/
http://www.tagtraum.com/gcviewer.html
http://profiler4j.sourceforge.net/
http://www.jamonapi.com

Eclipse plugin:
http://jmechanic.sourceforge.net/
http://eclipsecolorer.sourceforge.net/index_profiler.html
http://www.eclipse.org/mat/

Need $$:
http://www.ej-technologies.com/products/jprofiler/overview.html

See if the information useful.

How to measure with less than milli second - http://www.rationaljava.com[..]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 - http://codeperformance.com[..]07/07/javaone-talk-on-performance-myths/

Any other discussion - http://www-128.ibm.com[..]eloperworks/java/library/j-jtp09275.html

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

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

Java vs C performance... again... http://blogs.azulsystems.com[..]2009/09/java-vs-c-performance-again.html

http://blog.jooq.org[..]-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 - http://docs.oracle.com[..]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.

http://sachinhejip.blogspot.com[..]/08/experiences-in-java-performance.html

Experience in twitter - http://www.umbrant.com/blog/2012/twitter_jvm_tuning.html

Cases study on how to test performance from using difference GC algo - http://plumbr.eu/blog/g1-vs-cms-vs-parallel-gc

A lot of information - http://www.javaadvent.com[..]-1-of-3-synopsis-of-articles-videos.html

Basically use lower level construct - http://blog.jooq.org[..]-easy-performance-optimisations-in-java/

(google search) (amazon search)


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

serialization


Comparing the Java Serialization Options - http://www.theserverside.com[..]_id=57871&asrc=EM_NLN_9286283&uid=703565

Use Unsafe for best performance Serialization - http://mechanical-sympathy.blogspot.com.au[..]native-cc-like-performance-for-java.html

off heap serialization - http://java-is-the-new-c.blogspot.com.au[..]/a-persistent-keyvalue-server-in-40.html

(google search) (amazon search)


Mon Mar 25 21:00:46 HKT 2013 From /weblog/java/performance

leak


List some common causes of memory leak in application restart. - http://www.patrickpeak.com[..]/Weblog/your_web_app_is_leaking#comments http://blog.dynatrace.com[..]/20/the-top-java-memory-problems-part-1/

Incorrect use of threadlocal - http://www.szegedi.org/articles/memleak.html

Memory leak if load JDBC class incorrectly - http://www.szegedi.org/articles/memleak2.html

Serialization and ResourceBundle issue from core library (fixed) - http://www.szegedi.org/articles/memleak3.html

PermHeap bloat in and only in server VM - http://bugs.sun.com/bugdatabase/view_bug.do?bug_id=4957990

String.subString() still held a big big char[] - http://bugs.sun.com/bugdatabase/view_bug.do?bug_id=4513622

One pitfall of URLClassLoader, it cause leak from classloader, which is not obvious from the code - http://www.zeroturnaround.com/blog/rjc201/

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

(google search) (amazon search)


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

synchronization


An example about improving performance by replace synchronized with volatile - http://hg.openjdk.java.net/jdk8/tl/jdk/rev/fecba6a8b78e

Log4j can have deadlock due to performance - http://javaeesupportpatterns.blogspot.com.au[..]09/log4j-thread-deadlock-case-study.html

There is always some cost for synchronization - http://vanillajava.blogspot.com.au[..]-synchronization-be-optimisede-away.html

(google search) (amazon search)


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

usage


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

Nice explanation of GC - http://redstack.wordpress.com[..]sualising-garbage-collection-in-the-jvm/

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

Detailed discussion of analysis memory consumption in Java - http://kohlerm.blogspot.com[..]mory-consumption-of-netbeans-versus.html

it probably one of the nicest feature of java 5 - dump VM for you to analyst http://blogs.sun.com[..]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 - http://www.devx.com/tips/Tip/30833?trk=DXRSS_JAVA

checking memory consumption at object level - http://www.jroller.org[..]im?entry=again_about_determining_size_of

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

Use java.util.Observable to Monitor Object State changes - http://www.devx.com/tips/Tip/22592?trk=DXRSS_JAVA

(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 - http://today.java.net/lpt/a/351 , but actually reflection isn't that slow - http://buzdin.blogspot.com[..]1/01/is-java-reflection-really-slow.html

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

Support of annotation - http://jroller.com/page/eu?entry=compiler_for_jsr_308

Some cases that block method inlining - http://www.azulsystems.com[..]f/2011-04-04-fixing-the-inlining-problem

(google search) (amazon search)


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

io


Improvement from io -> nio, then -> MappedByteBuffer - http://dobbscodetalk.com[..]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 - http://www.cretesoft.com/archive/newsletter.do?issue=135

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

(google search) (amazon search)



Thu Jan 18 16:05:38 HKT 2007 From /weblog/java/performance

clustering


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.

http://www.onjava.com/lpt/a/4993

Someone tested that using Terrcotta is much better than RMI broadcast - http://pojomojo.blogspot.com[..]educing-bottlenecks-in-jee-stack_14.html

(google search) (amazon search)


Thu Oct 12 18:20:38 HKT 2006 From /weblog/java/performance

web


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

http://www-106.ibm.com/developerworks/library/j-jtp07294.html

(google search) (amazon search)


Thu Mar 23 15:44:36 HKT 2006 From /weblog/java/performance

housekeeping


Show common pitfall of cleaning up non-memory resource, stream, database resource and class level collection.

http://www-128.ibm.com[..]rks/java/library/j-jtp03216.html?ca=drs-

(google search) (amazon search)