JVM tuning

Getting C/C++ Performance from Java Object Serialisation

http://architects.dzone.com/articles/getting-cc-performance-java 001. import sun.misc.Unsafe; 002. import java.io.ByteArrayInputStream; 003. import java.io.ByteArrayOutputStream; 004. import java.io.ObjectInputStream; 005. import java.io.ObjectOutputStream;

HeapAudit – JVM Memory Profiler for the Real World | Foursquare Engineering Blog

Feb 02nd HeapAudit is not a monitoring tool, but rather an engineering tool that collects actionable data – information sufficient for directly making code change improvements. It is created for the real world, applicable to live running production servers. HeapAudit is a foursquare open source project designed for understanding JVM heap allocations. It is implemented as a Java agent built on top of ASM . http://engineering.foursquare.com/2012/02/02/heapaudit-jvm-memory-profiler-for-the-real-world/
http://java.dzone.com/articles/java-7-how-write-really-fast

Java 7: How to write really fast Java code

We Recommend These Resources When I first wrote this blog my intention was to introduce you to a class ThreadLocalRandom which is new in Java 7 to generate random numbers. I have analyzed the performance of ThreadLocalRandom in a series of micro-benchmarks to find out how it performs in a single threaded environment. The results were relatively surprising: although the code is very similar, ThreadLocalRandom is twice as fast as Math.random()! The results drew my interest and I decided to investigate this a little further. I have documented my anlysis process.
Oracle Blog Frank Kieviet Software matters « Classloader leaks:... | Main | More on... How to... » https://blogs.oracle.com/fkieviet/entry/how_to_fix_the_dreaded

How to fix the dreaded "java.lang.OutOfMemoryError: PermGen space" exception (classloader leaks) (Frank Kieviet)

https://blogs.oracle.com/jmxetc/entry/troubleshooting_connection_problems_in_jconsole ... I've seen a few posts in the Java and JMX forums from developers who were wondering how to find out why JConsole wouldn't connect to their application. So I have decided to write this short blog entry in order to outline a few diagnosing tips...

Troubleshooting connection problems in JConsole (JMX, SNMP, Java, etc...)

Endre's Tech Corner!: Linux Java Thread Priorities workaround

For some annoying reason, Sun has decided that to run with threads with working thread priorities on Linux, you have to be root. The logic behind this decision, is that to heighten thread priorities, you have to be root. But, says many of us, could you not just let us lower thread priorities, at least? No, says Sun. http://tech.stolsvik.com/2010/01/linux-java-thread-priorities-workaround.html
Memory is stored within the cache system in units know as cache lines. Cache lines are a power of 2 of contiguous bytes which are typically 32-256 in size. The most common cache line size is 64 bytes. False sharing is a term which applies when threads unwittingly impact the performance of each other while modifying independent variables sharing the same cache line.

False Sharing

http://mechanical-sympathy.blogspot.com/2011/07/false-sharing.html
http://java.dzone.com/articles/collections-library-millions We Recommend These Resources If you want to efficiently store large collections of data in memory. This library can dramatically reduce Full GC times and reduce memory consumption as well. When you have a data type which can be represented by an interface and you want a List for this type. 1.

Collections Library for millions of elements

I didn’t come up with this. I was shown how to do this by an esteemed college at work. Introduction Most (if not all) productive systems doing anything important will use more than 1 java thread. And when something goes crazy and your cpu usage is on 100%, it is hard to identify which thread(s) is/are causing this.

Identifying which Java Thread is consuming most CPU | Nomad Labs Code

http://code.nomad-labs.com/2010/11/18/identifying-which-java-thread-is-consuming-most-cpu/
Daniel Smith details some of the new features prepared for Java 8 by Project Lambda: lambda expressions, default methods, and parallel collections. Daniel Smith Mar 28, 2013 Scott González explains what BrowserStack offers for cross-browser testing, how debugging in BrowserStack works, and how to leverage its API. Paul Buhler, Steve Hamby, Johan Kumps, Art Ligthart, Markus Zirn, and Clemens Utschig discuss the relationships between Big Data and established Semantic Web technologies. Emad Benjamin explains how to deploy and tune a JVM on a virtual infrastructure (vSphere), and how to tune the garbage collector in this environment. Emad Benjamin Mar 28, 2013

Java without the GC Pauses: Keeping Up with Moore’s Law and Living in a Virtualized World

http://www.infoq.com/presentations/Java-without-the-GC-Pauses
We Recommend These Resources I found this article series very interesting All about 64-bit programming in one place which collects "a lot of links on the topic of 64-bit C/C++ software development." However some of these issues are relevant to Java and can make a difference.

Java: All about 64-bit programming

How to tame java GC pauses? Surviving 16GiB heap and greater.

Memory is cheap and abundant on modern servers. Unfortunately there is a serious obstacle for using these memory resources to their full in Java programs. Garbage collector pauses are a serious treat for a JVM with a large heap size. There are very few good sources of information about practical tuning of Java GC and unfortunately they seem to be relevant for 512MiB - 2GiB heaps size.

Visualising Garbage Collection in the JVM | RedStack

Recently, I have been working with a number of customers on JVM tuning exercises. It seems that there is not widespread knowledge amongst developers and administrators about how garbage collection works, and how the JVM uses memory. So, I decided to write a very basic introduction and an example that will let you see it happening in real time!
Joshua Bloch had a great talk called Performance Anxiety (30min, via Parleys; slides also available ) at Devoxx 2010, the main message as I read it was Nowadays, performance is completely non-predictable. You have to measure it and employ proper statistics to get some meaningful results. Microbenchmarking is very, very hard to do correctly.

Joshua Bloch: Performance Anxiety – on Performance Unpredictability, Its Measurement and Benchmarking

This document provides information on typical command-line options and environment variables that can affect the performance characteristics of the Java HotSpot Virtual Machine. Unless otherwise noted, all information in this document pertains to both the Java HotSpot Client VM and the Java HotSpot Server VM. Categories of Java HotSpot VM Options Standard options recognized by the Java HotSpot VM are described on the Java Application Launcher reference pages for Windows , Solaris and Linux .

Java HotSpot VM Options