RSS feed [root] /weblog /java



title search:


Sun Dec 14 09:36:42 HKT 2014


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

Wed Feb 24 11:49:26 HKT 2021 From /weblog/java/string


String.intern() is designed for constant strings, it's implemented in C/C++ in the hotspot core code, and it has a fixed-size hashmap of around 20K entries and if more than this number of strings are interned, the performance degrades linearly since there are hash collisions and the code has to search down linked lists.

String.intern in Java 7 and 8 -[..]-intern-java-6-7-8-multithreaded-access/

Suggestion of improving string decoding -

(google search) (amazon search)

Sat Feb 20 21:10:54 HKT 2021 From /weblog/java/features


Java on Truffle — Going Fully Metacircular -[..]le-going-fully-metacircular-215531e3f840

(google search) (amazon search)

Sat Feb 13 22:24:00 HKT 2021 From /weblog/java/fundamental


In this post we will be looking at crash logs, the hs_err file, that is generated when the Java Virtual Machine crashes. Trying to find what is going wrong, and which component to blame, is important to understand how to interpret the crash log file. The focus will be on understanding the frames that make up the stack trace. -

(google search) (amazon search)

Sat Feb 13 22:17:38 HKT 2021 From /weblog/java/tools


Java Flight Recorder, a tool to record all detail of how the API work for undo and replay and detail profiling -

Creating Custom JFR Events -

Java Mission Control -[..]-mission-control-52-is-finally-here.html

Support of JMX from common java library -[..]ling-jmx-in-hibernate-ehcache-qurtz.html

sample code show how to get vm info at jmx -

An excellent short tutorial of JMX -

Monitoring all tomcat 5 JMX information, with free tools and java startup config -[..]illiams/20050202#monitoring_tomcat_5_5_x

Task manager like jconsole plugin -[..]is/entry/top_threads_plugin_for_jconsole

Performance cost of JMX -[..]nus/archive/2006/07/how_much_does_i.html

Monitoring Local and Remote Applications Using JMX 1.2 and JConsole -

Collections of tools -[..]/client-side-server-monitoring-with.html

remote conenction with ssh -[..]nitoring-remote-jvm-over-ssh-jmx-or-not/

IBM healthcare API -[..]rary/j-healthcareapi1/index.html?ca=drs-

JVM Statistics with jstat -[..]k/2017/05/jvm-statistics-with-jstat.html

Useful JDK tools -

(google search) (amazon search)

Sat Feb 13 22:15:00 HKT 2021 From /weblog/java/deploy


How to Publish Artifacts on Maven Central -[..]-artifacts-on-maven-central-24342fd286cd[..]ing-to-maven-central-using-apache-maven/

(google search) (amazon search)

Fri Feb 12 08:37:17 HKT 2021 From /weblog/java/fundamental


The tool that allow you write JVM instruction using assemble like command

An article about assemble Java -[..]s/content/GuideJavaBytecode/article.html

Overview of bytecode -[..]/2011/01/java-bytecode-fundamentals.html

(google search) (amazon search)

Thu Feb 04 21:57:57 HKT 2021 From /weblog/java/network


Talking to Postgres Through Java 16 Unix-Domain Socket Channels -[..]ugh-java-16-unix-domain-socket-channels/

(google search) (amazon search)

Wed Jan 06 20:49:46 HKT 2021 From /weblog/java/string


Java's String.repeat Method in Action: Building PreparedStatement with Dynamic Number of Parameters -[..]k11-string-repeat-preparedstatement.html

(google search) (amazon search)

Wed Dec 30 20:49:03 HKT 2020 From /weblog/java/concurrency


An API to get the state of a thread, but someone say it is not reliable -[..]5.0/docs/api/java/lang/Thread.State.html[..]readed-programs-tf3627394.html#a10128844

Having said that, I have to note that using Thread#getState() is not
something you can absolutely rely on as the behavior isn't guaranteed
to be the same on all platforms. That is, it can be a useful tool for
debugging and test-driving but not ideal for regression (unit)

Overview of Java thread -[..]t-thread-and-javalangthread-in-java.html

Loom -

(google search) (amazon search)

Sun Dec 20 22:24:50 HKT 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)

Tue Oct 27 08:58:16 HKT 2020 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

(google search) (amazon search)

Sat Oct 24 10:31:23 HKT 2020 From /weblog/java/tools


Generate a diff page forother toreview in HG -

Introduce a tool to keep IDE code and webcontainer code in sync -

Auto complete of IDEA is pretty cool -[..]aster-with-intellij-idea-live-templates/

use ctrl-w to select text -[..]ins-ides-their-best-feature-is-control-w

7-new-tools-java-developers-should-know -

Buggy App is a simple java application that simulates different performance problems like Memory Leak, OutOfMemoryError, CPU spike, thread leak, StackOverflowError, deadlock, unresponsiveness, … -[..]buggy-app-simulate-performance-problems/

(google search) (amazon search)

Wed Oct 14 12:11:16 HKT 2020 From /weblog/java/libraries

high performance

Reactor framework, base on disruptor -

One http library to consider, Comsat -

disruptor 高性能队列最佳选择 -

Babl High-Performance WebSocket Server -[..]l-high-performance-websocket-server.html

(google search) (amazon search)

Thu Oct 08 08:22:27 HKT 2020 From /weblog/java/features


Invoking Assembly Language Programs using java native interface -

Best practices for using the Java Native Interface -

Other library try to simple using native library -

(google search) (amazon search)

Wed Oct 07 21:52:51 HKT 2020 From /weblog/java/features


Introduction of Lambdas expression in Java - , an example show how lambdas help to clean up the duplication -[..]mplifying-readwritelock-with-java-8.html

Another article about Java8 change, where Lambdas is the highlight -

Nice tutorial -

Huge list of articles -

Use lambdas to replace for-loop -[..]creating-your-own-loop-structure-in.html

Overview for new Date/Time library -[..]/02/java-date-time-timezone-formats.html[..]om/2014/05/java-8-features-tutorial.html

Grouping and partitioning with stream -[..]/11/java-8-streams-api-grouping-and.html
In a nutshell, make sure to never override a default method in another interface -[..]va-8-default-methods-can-break-your.html

Convert SQL feature to stream -[..]and-their-equivalents-in-java-8-streams/

Simple overview of steam operation -[..]va-8-stream-intermediate-operations.html

Behind the scenes: How do lambda expressions really work in Java? -[..]o-lambda-expressions-really-work-in-java

(google search) (amazon search)

Wed Oct 07 21:11:17 HKT 2020 From /weblog/java/features


(google search) (amazon search)

Wed Aug 26 14:25:14 HKT 2020 From /weblog/java/features


Good : dynamic, generic
Bad: slow, don't work with Obfuscators and most searching and refactoring tools

A very nice tool to get parameter name - (e.g.: user of getUser(User user))

How to improve the performance -[..]-reflection-as-fast-as-direct-calls.html

The problem of using reflection to modify final field -[..]7-writing-to-final-fields-via-reflection

Using reflection for using test -[..]f-hacking-enums-and-modifying-final.html

Sharing about using invokedynamic -[..]ticles/Invokedynamic-Javas-secret-weapon

LamdbaMetafactory is pretty fast. (*) -[..]8/01/09/JavaReflectionButMuchFaster.html

(google search) (amazon search)

Wed Jul 29 14:13:02 HKT 2020 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

(google search) (amazon search)

Tue Jul 14 14:44:05 HKT 2020 From /weblog/java/fundamental


We can control how the default hashcode return, and and what the difference of default hashcode between java7 and 8 -

(google search) (amazon search)

Tue Jul 14 10:37:55 HKT 2020 From /weblog/java/tools


Understanding Apache Maven – The Series -[..]0/understanding-apache-maven-the-series/

(google search) (amazon search)

Tue Jun 09 00:02:20 HKT 2020 From /weblog/java/discussion


(google search) (amazon search)

Wed Jun 03 15:55:56 HKT 2020 From /weblog/java/discussion


How to write a (toy) JVM -

(google search) (amazon search)

Tue Jun 02 17:50:40 HKT 2020 From /weblog/java/fundamental


Some overview articles -[..]/2011/04/garbage-collection-in-java.html[..]10/01/garbage-collection-references.html[..]work/java/javase/gc-tuning-6-140523.html[..]derstand-classic-java-garbage-collection

Interview with Azul, about the pauseless GC -

A story of how to tune GC -

NewRatio ( XX:MaxNewSize ) is important, but usually ignored -[..]ector/entry/the_second_most_important_gc

Java memory configuration and monitoring -[..]ry-configuration-and-monitoring-3rd-act/

How Garbage Collection differs in the three big JVMs -[..]ollection-differs-in-the-three-big-jvms/

Garbage Collection Bootcamp 1.0 -[..]1/03/27/garbage-collection-bootcamp-1-0/[..]ollection-interview-question-answer.html

How CMS work -[..]thecollector/entry/hey_joe_phases_of_cms

Compare between difference VM -[..]IsTheFastestGarbageCollectorInJava8.html

GC handbook -

Check what GC you are using -[..]16/04/determining-garbage-collector.html

About G1 Java Garbage Collector -[..]G1-Java-Garbage-Collector.html&Itemid=29

Tools to visualize GC -

Visualizing difference algorithm -[..]sualizing-garbage-collection-algorithms/

safepoints -

Few new GCs for huge heap -

Objects are allocated with extra space for an indirection pointer. When the Java threads access the object, they first read the indirection pointer to see whether the object has moved. When the garbage collector moves an object, it updates the indirection pointer to point to the new location. New objects are allocated with an indirection pointer that points to themselves. Only when an object is copied during GC will the indirection pointer point to somewhere else. -[..]agazine/understanding-garbage-collectors

JVM Pauses - It's more than GC -

(google search) (amazon search)