Home » Tag Archives: JVM

Tag Archives: JVM

Running -XX:CompileCommand on Windows

java-logo

The HotSpot JVM provides several command-line arguments related to Just In Time (JIT) compilation. In this post, I look at the steps needed to start applying the command-line flag -XX:CompileCommand to see the just-in-time compilation being performed on individual methods. JIT Overview Nikita Salnikov-Tarnovski’s blog post Do you get Just-in-time compilation? provides a nice overview of the JIT compiler and ...

Read More »

Java on Steroids: 5 Super Useful JIT Optimization Techniques

java-logo

Java developer? Optimize your production monitoring. See the source code, call stack, and variable state behind all logged errors, warnings, and exceptions – Try Takipi. What are some of the most useful JVM JIT optimizations and how to use them? Even when you’re not actively planning for it, the JVM has quite a few tricks up its sleeve to help ...

Read More »

Benchmarking High-Concurrency HTTP Servers on the JVM

java-logo

After a first post about HTTP clients, to which I redirect you for an introduction about efficient HTTP on the JVM, let’s now talk about HTTP servers. There are several benchmarks about HTTP servers out there but they’re often hindered by shortcomings such as: Not exercising effectively high-concurrency scenarios and, more generally, considering unrealistic and unrepresentative ones, for example: The pure-overhead scenario, ...

Read More »

Elastic infrastructure in practice

java-logo

A couple of weeks ago I got a rare opportunity to get my hands dirty in the infrastructure field. Being an interesting change to my day-to-day hours deep under the hood of the JVM internals, I thought to share the motivation and results with you. Hopefully it serves as an inspiration to similar problem categories out there. Background I will ...

Read More »

HotSpot Incremental Java Garbage Collector

java-logo

In my recent blog post Determining the Active HotSpot Garbage Collector, I described different approaches that can be used to determine the garbage collector that is being used by HotSpot JVM (Java process) when it is not obvious from the command-line arguments (flags) passed to the Java launcher. For significant Java applications, I prefer to explicitly specify the appropriate garbage ...

Read More »

Determining the Active HotSpot Garbage Collector

java-logo

The StackOverflow questions find which type of garbage collector is running, Default Garbage collector for a jvm, How can I see what garbage collector is running by looking at gc logs?, and How to know the current GC strategy of the HotSpot jvm?, and the blog post How to programmatically obtain GC information demonstrate the desire at times to know ...

Read More »

Looking at DiagnosticCommandMBean in JConsole and VisualVM

java-logo

I’ve used JConsole for many years as a suitable generic JMX client. This tool is generally available with the Oracle JDK and is easy to use. In terms of JMX interaction, the most significant advantage of JConsole over VisualVM is that JConsole comes with a built-in MBeans tab while a plugin must be applied for this same functionality in VisualVM. ...

Read More »

Printing arrays by hacking the JVM

java-logo

Overview One the most common gotchas in Java, is knowing how to print arrays. If an answer on how to print an array get more than 1000 upvotes, you have to wonder if there is a simpler way. Just about every other popular language has that simpler way, so it’s not clear to me why Java still does this. Unlike ...

Read More »

Default HotSpot Maximum Direct Memory Size

java-logo

In my previous blog post Improved Documentation of HotSpot Options in Java 8, I wrote about the misunderstandings surrounding the HotSpot JVM‘s default setting for non-standard option -XX:MaxDirectMemorySize. In this post, I look at a simple way to determine the “default” maximum direct memory size in the HotSpot JVM. The Java 8 documentation for the Java launcher states the following ...

Read More »

Want to take your Java skills to the next level?

Grab our programming books for FREE!

Here are some of the eBooks you will get:

  • Spring Interview QnA
  • Multithreading & Concurrency QnA
  • JPA Minibook
  • JVM Troubleshooting Guide
  • Advanced Java
  • Java Interview QnA
  • Java Design Patterns