Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.

For most Java server applications without strict pause-time requirements, start with the garbage collector selected by your runtime—G1 in Oracle JDK 25’s server-class configuration—and measure before changing it. Consider ZGC or Shenandoah when application tail latency makes pauses a demonstrated problem, then compare them under the same workload and resource limits. None is universally fastest: pause behavior, throughput, CPU use, and memory headroom depend on the application and JDK build.

How G1, ZGC, and Shenandoah differ

Collector Design and objective Trade-offs and qualifications When to test it
G1 Generational, region-based collector that combines concurrent work with stop-the-world evacuation pauses. It adapts collection to pursue pause-time goals while maintaining throughput. Its pause target is a soft goal, not a maximum guaranteed for every pause. Concurrent work uses CPU, and large or humongous allocations, marking pressure, and evacuation problems can affect behavior. A sensible starting point for conventional server workloads, particularly when pause needs are not strict. Use logs and measurements to guide tuning.
ZGC Concurrent low-latency collector designed to make pause times independent of heap size. Oracle’s Java SE 25 command reference describes pauses of a few milliseconds, at some throughput cost. Concurrent collection consumes CPU, and the heap needs room for the live set and allocations that occur while collection runs. Oracle’s documented heap range is 8 MB to 16 TB; that range is not a performance promise. Test when tail latency is a priority, including with large heaps, and measure throughput, CPU, and allocation headroom.
Shenandoah OpenJDK describes concurrent marking and compaction intended to reduce pauses so they are no longer directly proportional to heap size. Current command documentation distinguishes single-generation satb and generational modes. Availability and supported modes depend on the JDK vendor and build. Concurrent work needs CPU and memory headroom; no universal performance winner is established. Test when low-pause behavior matters and the deployed build supports the collector and desired mode.

What G1’s pause-time goal actually means

G1 divides the heap into regions, tracks candidate regions, and evacuates live objects from selected regions. Some collection work happens concurrently, while operations such as evacuation take place during pauses. Its adaptive policy tries to meet a pause goal with high probability over time; it does not guarantee a maximum pause duration. Oracle explicitly says G1 is not a real-time collector in its Java SE 25 G1 guide.

Oracle’s Java SE 25 command reference documents 200 ms as the default value of -XX:MaxGCPauseMillis, but that value is a target, not a promise that each pause will finish within 200 ms. Raising or lowering the target can shift the latency/throughput balance; it does not turn G1 into a hard real-time system. See Oracle’s G1 tuning guide before changing settings.

Oracle positions G1 for a broad range of workloads, including heaps in the tens of gigabytes or larger, substantial live sets, variable allocation or promotion, and fragmentation concerns. This is workload guidance, not a minimum heap size or a reason to rule G1 out on smaller heaps. Oracle’s general advice is to start with the VM default unless pause requirements are strict; the choice depends on live data, heap size, and processor availability. See Available Collectors.

Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.
#1 Best Overall
Elebase USB to USB C Adapter for iPhone 18 Pro Max,USBC Car Charger Adapter
  • Read Before You Buy — No Video Output: These adapters support charging and USB 2.0 data transfer, but cannot transmit video signals. Except for standard USB webcams (which use USB data only), they are not compatible with HDMI/DisplayPort cables, video-capable USB-C hubs, or docking stations with video output.
  • Convert USB-A Ports to USB-C: Designed to connect USB-C earphones, cables, flash drives, card readers, and other USB-C accessories to standard USB-A ports. Plug-and-play with no drivers or software required.
  • Aluminum Alloy Housing: Built with a sturdy aluminum alloy shell that aids in heat dissipation and protects against daily wear and scratches. Designed to maintain a stable and secure connection.
  • Compact & Travel-Friendly: The ultra-compact design allows the adapter to stay plugged into your device without blocking adjacent ports or adding bulk, reducing wear and tear on your original USB ports.
  • 12-Month Warranty: Backed by a 12-month manufacturer warranty for peace of mind. Designed to meet strict quality control standards for reliable everyday performance.

What low-pause collectors can—and cannot—solve

ZGC

Oracle’s Java SE 25 java command reference describes ZGC as a low-latency collector with maximum pause times of a few milliseconds, at some throughput cost, and says pause times are independent of heap size. Treat that as the documented design and behavior description for that release, not as a guarantee of zero pauses, identical performance across workloads, or a fixed end-to-end application response time.

Concurrent collection moves more work out of pauses, but does not make that work free. ZGC still needs CPU to collect and enough heap capacity to accommodate the live set and allocations during a cycle. A workload with high allocation rates or limited CPU can therefore see costs elsewhere even if pauses are short. Oracle documents a supported heap-size range of 8 MB to 16 TB for ZGC in Java SE 25; compatibility and performance should still be verified for the actual runtime.

Rank #2
Anker USB-C Hub, 5-in-1 USB Hub for Laptops, 4K HDMI Multiport Adapter
  • 5-in-1 USB-C Hub: Experience comprehensive connectivity featuring a Power Delivery input, two USB-A 2.0 ports, a USB-A 3.0 port, and an HDMI port. (Note: The USB-C power delivery input port is only for connecting an external wall charger to power your laptop and cannot power peripheral devices.)
  • 90W Pass-Through Charging: Achieve optimal charging with 90W pass-through power to your laptop, supported by a total input of 100W, with the hub reserving 10W for operational efficiency. (Note: Wall charger not included.)
  • Quick Data Transfers: Accelerate your productivity with rapid data transfers using a high-speed 5Gbps USB 3.0 port and two 480Mbps USB 2.0 ports.
  • 4K HDMI Display: Enhance your visual experience with a hub capable of delivering 4K resolution at 30Hz in both mirror and extend modes. Please note that this hub is compatible with MacBook (macOS 12 and newer), Windows 10 and 11, ChromeOS, and laptops equipped with DP Alt Mode and Power Delivery. Note: This device is not compatible with Linux.
  • What You Get: Anker USB-C Hub (5-in-1, 4K HDMI), welcome guide, 18-month warranty, and our friendly customer service.

Shenandoah

OpenJDK describes Shenandoah as reducing pauses by doing more work concurrently, including compaction, so pause times are no longer directly proportional to heap size. Its project documentation explains the design. The current OpenJDK command-line documentation identifies satb as single-generation and generational as generational.

Do not assume those modes or flags exist in every Java distribution. Check the documentation for the exact vendor, version, and build deployed, then confirm that the collector and requested mode are supported before adding flags. The OpenJDK command-line document is on the moving main branch, so its details can change.

Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.
Rank #3
Sale
Anker USB C Hub, 7in1 Multi-Port USB Adapter, 4K@60Hz USBC to HDMI Splitter
  • Sleek 7-in-1 USB-C Hub: Features an HDMI port, two USB-A 3.0 ports, and a USB-C data port, each providing 5Gbps transfer speeds. It also includes a USB-C PD input port for charging up to 100W and dual SD and TF card slots, all in a compact design.
  • Flawless 4K@60Hz Video with HDMI: Delivers exceptional clarity and smoothness with its 4K@60Hz HDMI port, making it ideal for high-definition presentations and entertainment. (Note: Only the HDMI port supports video projection; the USB-C port is for data transfer only.)
  • Double Up on Efficiency: The two USB-A 3.0 ports and a USB-C port support a fast 5Gbps data rate, significantly boosting your transfer speeds and improving productivity.
  • Fast and Reliable 85W Charging: Offers high-capacity, speedy charging for laptops up to 85W, so you spend less time tethered to an outlet and more time being productive.
  • What You Get: Anker USB-C Hub (7-in-1), welcome guide, 18-month warranty, and our friendly customer service.

How to choose for your workload

  • Start with the runtime default if your application meets its latency objective and you have no measured evidence that GC pauses are the bottleneck.
  • Evaluate ZGC or Shenandoah if GC pauses materially contribute to tail-latency problems and the application can afford the concurrent CPU and memory costs.
  • Compare ZGC with Shenandoah empirically only after confirming both are available in your deployed build and the modes being tested are supported.
  • Make the decision against application behavior, not collector labels: heap size, live-set size, allocation rate, processor capacity, throughput needs, and tail-latency objectives all affect the result.

GC pause time is only one contributor to application response-time tails. A collector with short pauses may not improve p99 or p99.9 latency if another part of the system dominates, and its concurrent work may reduce throughput or consume CPU the application needs.

How to benchmark collectors fairly

Use the same JDK build, machine or container limits, application version, data set, heap settings, warm-up, and load profile for each run. Capture GC logs and application-level latency at the same time, and repeat representative tests rather than drawing conclusions from a single run.

Rank #4
Sale
UGREEN USB to USB C Adapter Combo 4-Pack, 10Gbps USB C Converter Space Gray
  • Dual Converters, Infinite Potential:Includes 2× USB C male to USB A female adapters and 2× USB A male to USB C female adapters. Perfect for a wide range of uses—tablets with Bluetooth keyboards, expand USB ports on macbook, and more. Two different converters for all your daily needs
  • Next-Level 10Gbps & 3A Charging: No more slow 480Mbps, this usb to usb c adapter has a transfer speed of up to 10Gbps, allowing you to do more transferring in less time. This usb adapter fits both USB A and USB C charger, supporting up to 3A fast charging
  • Upgraded Exquisite Craftsmanship: With an aluminum alloy housing and metal connector, the usbc to usb adapter is extremely durable and sturdy. Rigorously tested to withstand more than 10,000 times of plugging and unplugging, ensuring long-lasting performance
  • Broad Compatible: The usb c to usb adapter widely supports all USB C/ USB A devices like laptops, tablets, cellphones, car chargers, and phone chargers. Such as compatible with MacBook Pro/Air 2023/2022, Thunderbolt 4/3 Devices,Apple MagSafe Watch 9/8/7/SE/Ultra, iPad Pro 2022/2021, Samsung Galaxy S23/S20/S10, and iPhone 17/16/15 Pro. Plug and play
  • Please Note: To reach 10Gbps speed, keep the cable under 3.3 ft. For USB A Male to USB C adapters, try flipping the USB C connector. USB C Male to USB A adapters support bidirectional 10Gbps transfer within 3.3 ft
  • Compare application latency at p95, p99, and p99.9 alongside the GC pause distribution; averages can hide damaging spikes.
  • Measure throughput under a fixed CPU and memory budget, and record CPU used by GC and concurrent threads.
  • Track live-set size, heap occupancy, allocation rate, and free headroom while collection is running.
  • Record pause frequency and total time in collection, not only the longest pause.
  • Exercise bursts, high promotion, and memory pressure; watch for full collections, allocation stalls or failures, and out-of-memory events.

For G1, use the logs to investigate symptoms rather than applying generic tuning recipes. Oracle’s tuning guide discusses humongous allocations, marking that starts too late, remembered-set work, and concurrent refinement. If you change heap sizing or the pause goal, change one variable at a time and rerun the same representative workload.

Independent reader supportYour contribution helps us test, update, and keep practical guides available for everyone.Support on Ko-Fi

Practical recommendation

Use the default collector when it already meets the application’s latency and throughput requirements. If measurements show that GC pauses are hurting tail latency, test a concurrent low-latency option and judge the gain against throughput, GC CPU, and memory headroom. Choose between ZGC and Shenandoah only after checking the exact JDK build and comparing both under production-like conditions.

Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.
Best Value
Anker USB C Hub, 5-in-1 USBC to HDMI Splitter with 4K Display
  • 5-in-1 Connectivity: Equipped with a 4K HDMI port, a 5 Gbps USB-C data port, two 5 Gbps USB-A ports, and a USB C 100W PD-IN port. Note: The USB C 100W PD-IN port supports only charging and does not support data transfer devices such as headphones or speakers.
  • Powerful Pass-Through Charging: Supports up to 85W pass-through charging so you can power up your laptop while you use the hub. Note: Pass-through charging requires a charger (not included). Note: To achieve full power for iPad, we recommend using a 45W wall charger.
  • Transfer Files in Seconds: Move files to and from your laptop at speeds of up to 5 Gbps via the USB-C and USB-A data ports. Note: The USB C 5Gbps Data port does not support video output.
  • HD Display: Connect to the HDMI port to stream or mirror content to an external monitor in resolutions of up to 4K@30Hz. Note: The USB-C ports do not support video output.
  • What You Get: Anker 332 USB-C Hub (5-in-1), welcome guide, our worry-free 18-month warranty, and friendly customer service.

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.