RSS feed [root] /weblog /java




login:

password:

title search:




 


Sun Dec 14 09:36:42 HKT 2014

java



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

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

intern


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.

http://bugs.sun.com/bugdatabase/view_bug.do?bug_id=6988220

String.intern in Java 7 and 8 - http://java-performance.info/string-intern-in-java-6-7-8/ http://java-performance.info[..]-intern-java-6-7-8-multithreaded-access/ http://java-performance.info/string-intern-java-7-8-part-3/

Suggestion of improving string decoding - https://cl4es.github.io/2021/02/23/Faster-Charset-Decoding.html

(google search) (amazon search)


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

Graal


Java on Truffle — Going Fully Metacircular - https://medium.com[..]le-going-fully-metacircular-215531e3f840 https://www.infoq.cn/article/gTHX7fc0CLTtV9FCbGjO

(google search) (amazon search)


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

crash


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. - https://inside.java/2021/02/12/deciphering-the-stacktrace/

(google search) (amazon search)


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

monitoring


Java Flight Recorder, a tool to record all detail of how the API work for undo and replay and detail profiling - http://docs.oracle.com/cd/E15289_01/doc.40/e15070/toc.htm

Creating Custom JFR Events - http://hirt.se/blog/?p=444

Java Mission Control - http://blog.eisele.net[..]-mission-control-52-is-finally-here.html http://hirt.se/blog/?p=343 http://hirt.se/blog/?p=364&cpage=1#comment-98 https://www.infoq.com/news/2016/10/Java-Flight-Recorder-Mission

Support of JMX from common java library - http://www.javacodegeeks.com[..]ling-jmx-in-hibernate-ehcache-qurtz.html

sample code show how to get vm info at jmx - http://blogs.sun.com/jmxetc/entry/how_to_retrieve_remote_jvm

An excellent short tutorial of JMX - http://java.sun.com/developer/technicalArticles/J2SE/jmx.html

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

Task manager like jconsole plugin - http://blog.luminis.nl[..]is/entry/top_threads_plugin_for_jconsole

Performance cost of JMX - http://weblogs.java.net[..]nus/archive/2006/07/how_much_does_i.html

Monitoring Local and Remote Applications Using JMX 1.2 and JConsole - http://onjava.com/lpt/a/5226

Collections of tools - http://www.javacodegeeks.com[..]/client-side-server-monitoring-with.html

remote conenction with ssh - http://theholyjava.wordpress.com[..]nitoring-remote-jvm-over-ssh-jmx-or-not/

IBM healthcare API - http://www.ibm.com[..]rary/j-healthcareapi1/index.html?ca=drs- http://www.ibm.com/developerworks/java/jdk/tools/healthcenter/

JVM Statistics with jstat - http://marxsoftware.blogspot.hk[..]k/2017/05/jvm-statistics-with-jstat.html

Useful JDK tools - https://blog.marcinchwedczuk.pl/useful-jdk-tools-part-1

(google search) (amazon search)


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

maven


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

(google search) (amazon search)


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

Assemble


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

http://jasclipse.sourceforge.net/

An article about assemble Java - http://www.theserverside.com[..]s/content/GuideJavaBytecode/article.html

Overview of bytecode - http://arhipov.blogspot.com[..]/2011/01/java-bytecode-fundamentals.html http://www.javaadvent.com/2013/12/mastering-java-bytecode.html https://blog.jamesdbloom.com/JavaCodeToByteCode_PartOne.html

(google search) (amazon search)


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

socket


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

(google search) (amazon search)


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

construction


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

(google search) (amazon search)


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

Thread


An API to get the state of a thread, but someone say it is not reliable - http://java.sun.com[..]5.0/docs/api/java/lang/Thread.State.html http://java.silke-wingens.de/2011/03/13/threads-states/?lang=en

http://www.nabble.com[..]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)
testing.

Overview of Java thread - http://java67.blogspot.hk[..]t-thread-and-javalangthread-in-java.html

Loom - https://webtide.com/do-looms-claims-stack-up-part-1/ https://webtide.com/do-looms-claims-stack-up-part-2/

(google search) (amazon search)


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

https://www.reddit.com[..]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

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

GC thread blocked by system call - http://www.infoq.com/cn/articles/GC-Log-Uncovers-Pause https://www.infoq.com/articles/GC-Log-Uncovers-Pause

We always need benchmark - https://arnaudroger.github.io[..]2017/06/15/forward-vs-backward-loop.html

Investigation and solutions of performance issue caused by GC log - https://engineering.linkedin.com[..]c-pauses-caused-by-background-io-traffic

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

Parallel Collection Processing: Leveraging Batching - https://4comprehension.com/parallel-collection-processing-2/

Maybe good to careful about collection initalization - http://blog.pitest.org[..]ars-with-a-single-character-code-change/

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

Performance comparison of difference JVM vendor - https://www.reddit.com[..]stopping_openj9_from_overtaking_hotspot/

Why we chose java for HFT - https://medium.com[..]equency-trading-application-600f7c04da94

(google search) (amazon search)


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

dev


Generate a diff page forother toreview in HG - https://blogs.oracle.com/bondolo/entry/how_i_generate_a_webrev

Introduce a tool to keep IDE code and webcontainer code in sync - http://techblog.bozho.net/?p=1246

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

use ctrl-w to select text - http://paulhammant.com[..]ins-ides-their-best-feature-is-control-w

7-new-tools-java-developers-should-know - http://blog.takipi.com/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, … - https://blog.fastthread.io[..]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 - http://www.infoq.com/news/2013/11/reactor-goes-ga

One http library to consider, Comsat - http://blog.paralleluniverse.co/2015/12/02/http-clients/

disruptor 高性能队列最佳选择 - https://xie.infoq.cn/article/7cee25201ffdaba3b8644d68d?y=qun0825

Babl High-Performance WebSocket Server - https://epickrram.blogspot.com[..]l-high-performance-websocket-server.html https://github.com/babl-ws/babl

(google search) (amazon search)


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

JNI


Invoking Assembly Language Programs using java native interface - http://today.java.net/lpt/a/330

Best practices for using the Java Native Interface - http://www.ibm.com/developerworks/java/library/j-jni/index.html

Other library try to simple using native library - https://inside.java/2020/10/06/jextract/

(google search) (amazon search)


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

java8


Introduction of Lambdas expression in Java - http://zeroturnaround.com/labs/java-8-the-first-taste-of-lambdas/ , an example show how lambdas help to clean up the duplication - http://www.nurkiewicz.com[..]mplifying-readwritelock-with-java-8.html

Another article about Java8 change, where Lambdas is the highlight - http://www.infoq.com/news/2013/08/everything-about-java-8 http://www.shaunabram.com/java8/

Nice tutorial - http://www.dreamsyssoft.com/java-8-lambda-tutorial/index.php

Huge list of articles - http://www.baeldung.com/java8

Use lambdas to replace for-loop - http://saltnlight5.blogspot.com.au[..]creating-your-own-loop-structure-in.html https://www.ibm.com/developerworks/library/j-java8idioms3

Overview for new Date/Time library - http://www.infoq.com/articles/java.time https://binkley.blogspot.com[..]/02/java-date-time-timezone-formats.html

http://www.javacodegeeks.com[..]om/2014/05/java-8-features-tutorial.html

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

Convert SQL feature to stream - http://blog.jooq.org[..]and-their-equivalents-in-java-8-streams/

Simple overview of steam operation - https://www.javaprogramto.com[..]va-8-stream-intermediate-operations.html https://mydeveloperplanet.com/2020/09/23/java-streams-by-example

Behind the scenes: How do lambda expressions really work in Java? - https://blogs.oracle.com[..]o-lambda-expressions-really-work-in-java

(google search) (amazon search)


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

java15


https://www.infoq.com/news/2020/09/java15-released

(google search) (amazon search)



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

reflection


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

http://jroller.com/page/ie?entry=time_to_reconsider_reflection

A very nice tool to get parameter name - https://github.com/paul-hammant/paranamer (e.g.: user of getUser(User user))

How to improve the performance - http://coding-masters.blogspot.com[..]-reflection-as-fast-as-direct-calls.html

The problem of using reflection to modify final field - http://www.azulsystems.com[..]7-writing-to-final-fields-via-reflection

Using reflection for using test - http://www.javaadvent.com[..]f-hacking-enums-and-modifying-final.html

Sharing about using invokedynamic - http://www.infoq.com/presentations/invokedynamic http://www.infoq.com[..]ticles/Invokedynamic-Javas-secret-weapon https://www.infoq.com/articles/Invokedynamic-Javas-secret-weapon

LamdbaMetafactory is pretty fast. (*) - https://www.optaplanner.org[..]8/01/09/JavaReflectionButMuchFaster.html

(google search) (amazon search)


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

Useful parameters for OOME - https://jaxenter.com/jvm-outofmemoryerror-161257.html

Why Java's TLABs are so important and why write contention is a performance killer in multicore environments - https://www.opsian.com/blog/jvm-tlabs-important-multicore/

MMU gang wars: the TLB drive-by shootdown - http://bitcharmer.blogspot.com/2020/05/t_84.html

Latency implications of virtual memory - https://rigtorp.se/virtual-memory/

foreign-memaccess - http://cr.openjdk.java.net[..]cimadamore/panama/foreign-memaccess.html

(google search) (amazon search)


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

object


We can control how the default hashcode return, and and what the difference of default hashcode between java7 and 8 - https://blog.codinghorror.com/complaint-driven-development/

http://sigpwned.com/2018/08/10/string-hashcode-is-plenty-unique/

https://shipilev.net/jvm/objects-inside-out

https://www.baeldung.com/jvm-measuring-object-sizes

(google search) (amazon search)


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

build


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

(google search) (amazon search)



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

books


http://www.javalobby.org/articles/5books/

https://handwiki.org/wiki/Book:ThinkJava

(google search) (amazon search)


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

VM


How to write a (toy) JVM - https://zserge.com/posts/jvm/

(google search) (amazon search)


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

garbage


Some overview articles - http://javarevisited.blogspot.com[..]/2011/04/garbage-collection-in-java.html http://jeremymanson.blogspot.com[..]10/01/garbage-collection-references.html http://www.oracle.com[..]work/java/javase/gc-tuning-6-140523.html https://www.infoq.com[..]derstand-classic-java-garbage-collection

Interview with Azul, about the pauseless GC - http://www.infoq.com/interviews/gil-tene-azul-zing

A story of how to tune GC - http://kirk.blog-city.com/why_do_i_have_this_long_gc_pause.htm

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

Java memory configuration and monitoring - http://blog.codecentric.de[..]ry-configuration-and-monitoring-3rd-act/

How Garbage Collection differs in the three big JVMs - http://blog.dynatrace.com[..]ollection-differs-in-the-three-big-jvms/

Garbage Collection Bootcamp 1.0 - http://www.lucidimagination.com[..]1/03/27/garbage-collection-bootcamp-1-0/

http://javarevisited.blogspot.sg[..]ollection-interview-question-answer.html

How CMS work - https://blogs.oracle.com[..]thecollector/entry/hey_joe_phases_of_cms

Compare between difference VM - http://www.optaplanner.org[..]IsTheFastestGarbageCollectorInJava8.html

GC handbook - https://plumbr.eu/java-garbage-collection-handbook

Check what GC you are using - http://marxsoftware.blogspot.hk[..]16/04/determining-garbage-collector.html

About G1 Java Garbage Collector - http://dobbscodetalk.com[..]G1-Java-Garbage-Collector.html&Itemid=29

Tools to visualize GC - http://gceasy.io/

Visualizing difference algorithm - https://spin.atomicobject.com[..]sualizing-garbage-collection-algorithms/

safepoints - http://performantcode.com/gc/safepoints/

Few new GCs for huge heap - https://dzone.com/articles/java-garbage-collection-3

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. - https://blogs.oracle.com[..]agazine/understanding-garbage-collectors

JVM Pauses - It's more than GC - https://blanco.io/blog/jvm-safepoint-pauses/

(google search) (amazon search)