Showing posts with label performance. Show all posts
Showing posts with label performance. Show all posts

Monday, 14 October 2013

How to connect Java Mission Control to your application with Flight Recorder enabled?

You have to:
  • Run application with java version1.7.0_40 or higher
  • Start application with flags -XX:+UnlockCommertialFeatures -XX:+FlightRecorder

Worth watching: http://www.youtube.com/watch?v=WMEpRUgp9Y4

Friday, 14 June 2013

Benchmarks of the web frameworks

Here is the site where you can see comparison of plenty of web frameworks:
http://www.techempower.com/benchmarks/

Saturday, 1 June 2013

Diagnosing Java Application tools

Console tools:

jps -v - lists java processes

jcmd - runs command on the jvm
Some examples:

  • jcmd 31435 VM.version - shows information of the virtual machine of the process with pid 31435
  • jcmd 31435 help - shows possible commands for the process with pid 31435
  • jcmd 31435 Thread.print - prints ThreadDump (same as jstack pid)
  • jcmd 31435 GC.class_histogram - prints statistics of classes in the Heap
  • jcmd 31435 GC.heap_dump file - Dump Heap to the given file
  • jcmd 31435 GC.run - runs Garbage Collection
  • jcmd 31435 VM.uptime - time that process work
  • jcmd 31435 VM.flags - flags of the VM for this process
  • jcmd 31435 VM.system_properties -m properties what process was run with
  • jcmd 31435 VM.command_line - java command that started process
  • jcmd 31435 VM.version - the virtual machine version process was run with

jstat - prints jvm statistics

  • jstat -options - lista all options
  • jstat -gc 3773 1s - prints Garbage Collection info every second for process with pid 3773
  • jstat -class 3773 1s - class loaded stats

jvisualvm - graphical tool monitoring jvm processes. We can see CPU, Thread, Heap usage. It allows comparing Heap Dumps, inspecting all objects and references to them. We can use Sampler and Profiler to check where most of the time is spent and where object are mostly allocated.

jstack -F pid - suspends process in unknown state

Tuesday, 12 March 2013

Tuesday, 8 January 2013

Java collections for primitive types

Java collections that save memory, when elements are primitive types:
http://trove.starlight-systems.com/overview

Tuesday, 3 April 2012

Java performance tuning

On the following page you will find many articles about java performance tuning. Tips, tools descriptions, ...
http://www.javaperformancetuning.com

Saturday, 10 March 2012

Analysing Thread Dumps

Tool for Thread Dumps analyzing: TDA - Thread Dump Analyzer. Plugins for JConsole and VisualVM available. More on: http://java.net/projects/tda/

Friday, 9 March 2012

Analysing garbage collection from gc.log

If you wish to visualize garbage collection using as a source gc.log file, then try HPjmeter. You will see diagrams, which makes those data more clear.
For more info and download link go to: https://h20392.www2.hp.com/portal/swdepot/displayProductInfo.do?productNumber=HPJMETER

Wednesday, 16 November 2011

Linux console tools for measuring performance

We can use following tools:
  • top, htop - processes measurement
  • df - storage space info
  • hdparm - storage performance
  • cat /proc/cpuinfo - CPU info
  • cat /proc/meminfo - RAM info
  • vmstat, dstat - processes, memory, swap, IO, CPU info
  • netstat - network info
  • mpstat - CPU summary
  • iostat - IO info
  • iptraf - many metrics