The Tool Desk
Outbyte Driver Updater FREEScan for outdated or missing drivers - takes under a minuteDriver Scan →Outbyte PC Repair FREEClear out junk files and repair common Windows errorsFree Scan →To improve a Java application on Linux, first identify what is limiting the workload—CPU execution, garbage collection, blocking, synchronization, I/O, or another factor—then change one plausible cause and rerun the same representative test. Start with a defined success metric such as p95 latency, throughput, CPU per request, total GC pause time, or memory use. There is no JVM flag or garbage collector that is fastest for every application.
Build a repeatable performance test
Before changing JVM settings, record the conditions that affect the result. A comparison is useful only when the workload and environment are sufficiently consistent.
- Runtime and host: JDK vendor and version, Linux distribution and kernel, and hardware or virtual-machine shape.
- Resource limits: container CPU and memory limits, along with the resources the JVM actually detects.
- Application and workload: application version, JVM arguments, traffic shape, and whether the application is cold, warming up, or at steady state.
- Success metric: choose the outcome before the test. Throughput, response-time percentiles, CPU per request, allocation rate, GC pauses, and memory footprint can move in different directions.
Use application-level tests to support application-level conclusions. A microbenchmark can help isolate a small operation, but it does not establish that a deployed service will improve. Scott Oaks’s Java Performance, 2nd Edition covers performance testing, JMH, operating-system tools, JFR, and profiling; its 2020 publication predates current JDK releases, so consult the documentation for the runtime you use when applying version-specific guidance.
Use JFR to find the kind of bottleneck
Java Flight Recorder (JFR) is built into the JVM and can capture diagnostics under representative load. Oracle’s JDK 26 troubleshooting guide says default fixed-duration profiling recordings have less than 2% overhead for most applications; this is vendor guidance, not a guarantee for every workload. Oracle also says standard continuous recording generally has no measurable effect. Heap statistics can trigger extra old collections, so avoid enabling them in latency-sensitive profiling unless that data is needed. See Oracle’s JDK 26 troubleshooting guide.
Use a recording to distinguish time spent in application execution from time spent waiting or contending. Useful event families include file and socket reads and writes, monitor contention, waits, sleeps, parks, and thread lifecycle. For most Java Application event types, Oracle records only events longer than 20 ms by default; short operations may therefore be absent from the recording.
Long monitor waits can point to serialized critical sections. Socket waits may indicate network or remote-service latency rather than slow Java computation. If threads appear busy without meaningful waits, investigate CPU execution, including native code. JFR is evidence for choosing the next investigation, not by itself proof of a single cause.
Rank #2
For command-line inspection, the JDK’s jfr command can print, filter, and summarize recording events, including machine-readable output. The JDK 26 jfr command reference documents its options. For visual analysis, Oracle documents JDK Mission Control 9 as a tool for analyzing recordings, including diagnostics during production operation.
Investigate garbage collection when measurements point to it
GC matters when its pauses, frequency, allocation behavior, or CPU use affect the metric you chose. Examine individual pauses and their total, collection frequency, allocation sites, and heap occupancy. Do not judge GC impact only by the collector’s total work duration: concurrent work can happen in the background, while the sum of application pauses is a useful measure of user-visible GC interruption.
Quick wins for a faster PC:
Repair Windows errors before they cause bigger problemsFix Now →Scan for outdated or missing drivers - takes under a minuteDriver Scan →Interpret GC symptoms before changing settings
- Long individual pauses: Oracle says these may suggest a mismatch between the collector strategy and the workload.
- High total paused time: examine the pattern of collections and allocation behavior, rather than assuming one long pause is the cause.
- Heavy allocation: use allocation data to find avoidable temporary objects or hot spots before changing heap size.
- Growing occupancy: investigate whether the application retains memory unexpectedly. A larger heap can increase the time between collections, but consumes more memory and does not fix a leak.
Choose a collector against service requirements
Collector choice is a trade-off among latency, throughput, CPU use, heap size, and the available memory and CPU limits. Oracle’s JDK 27 GC tuning documentation says G1 is selected by default when no collector is specified in that documented context, while cautioning that it may not be optimal for every application. Verify defaults and options against your actual JDK build in Oracle’s JDK 27 G1 documentation.
Oracle illustrates why GC CPU use can matter on large systems with an idealized scaling model: on a 32-processor system, 1% GC time on one processor is modeled as more than 20% throughput loss, and 10% GC time on one processor as more than 75%. These are illustrations of scaling effects, not benchmark results for a particular application.
Rank #4
Check Linux CPU profiling and container visibility
If recordings indicate CPU execution or native code, Linux system profiling can help locate where processor time goes. The perf tooling is subject to Linux permission checks. Kernel documentation describes CAP_PERFMON as the least-privilege capability for performance monitoring and observability; actual access depends on kernel version, system configuration, and credentials. Follow the host’s security policy rather than broadly weakening access controls. See the Linux kernel perf security documentation.
For more accurate external profiler stack traces, Oracle documents the HotSpot option -XX:+PreserveFramePointer. Measure its impact on the target application and JDK rather than assuming it is free. The cited JDK 21 java command reference also documents automatic Linux container resource detection as enabled by default. To inspect container information on that JDK, use unified logging with -Xlog:os+container=trace. These details are version-specific; verify them against the runtime actually deployed.
Free tools Windows power users keep installed
One-click scans. No signup required.
Best Value
Choose recording detail to fit the diagnostic question
The JDK 21 reference distinguishes between recording configurations: default.jfc is designed for low-overhead continuous use, while profile.jfc gathers more data and can impose more overhead, making it suitable for shorter periods when additional detail is needed. Select the configuration according to the question you are investigating and validate overhead in context.
Change one factor, then rerun the same workload
- Capture a baseline. Save the workload description, environment, JVM arguments, raw measurements, and any JFR recording.
- Form a specific hypothesis. For example, test whether a measured allocation hot spot contributes to GC pauses, or whether a long monitor wait constrains throughput.
- Change one factor where practical. Keep other settings and workload conditions steady so the comparison remains interpretable.
- Repeat the test. Compare the selected metric and relevant trade-offs, including variability and regressions in latency, throughput, CPU, pauses, and memory.
- Keep the evidence. Retain configuration, recordings, and raw results so the change can be reviewed or reversed.
Do not treat a heap setting, collector choice, JVM option, or kernel adjustment as universally faster. A result applies to the runtime, host, limits, and workload under which it was measured.
Quick Recap
Product prices and availability are accurate as of the date/time indicated and are subject to change. Any price and availability information displayed on Amazon at the time of purchase will apply.

