Home » Tag Archives: JVM

Tag Archives: JVM

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 »

Simplicity and Value of HotSpot’s -XshowSettings Flag

java-logo

A handy HotSpot JVM flag (option for the Java launcher java) is the -XshowSettings option. This option is described in the Oracle Java launcher description page as follows:                 -XshowSettings:category Shows settings and continues. Possible category arguments for this option include the following: all Shows all categories of settings. This is the default ...

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:

  • Advanced Java Guide
  • Java Design Patterns
  • JMeter Tutorial
  • Java 8 Features Tutorial
  • JUnit Tutorial
  • JSF Programming Cookbook
  • Java Concurrency Essentials