Hydrogen Performance

Hydrogen Performance

Performance mod. It measures your CPU, GPU, monitor and frame times at runtime, then tunes core affinity, clock boosting, GC timing, VRAM eviction and dynamic resolution to your machine specifically.

43 downloads 0 followers

Hydrogen

It asks Windows, Linux, or macOS to describe your CPU. It asks your graphics driver how much VRAM actually exists. It asks GLFW what your monitor runs at and what your DPI scaling is. Then it benchmarks your game for five seconds and works out every threshold from what it measured. A 4K 60Hz computer and a 1080p 240Hz computer end up with completely different settings and neither of you opens a config file.


What it does

Puts your threads on the right cores. Hydrogen reads your real CPU topology, including P-core and E-core layout on 12th gen Intel and newer, and hyperthread siblings everywhere. Your render thread gets pinned to the fastest physical cores. Chunk meshing gets everything else. A chunk build should never land on the core drawing the frame you're waiting for.

Asks for clocks when frames get tight. Your monitor sets the target. 144Hz means 6.94ms. When frames overrun it, Hydrogen switches the Windows power plan to High Performance, or writes performance to the Linux cpufreq governor, and puts it back when things settle. On battery it leaves you alone. And if your machine genuinely can't reach your panel's refresh rate, it notices and aims at a sensible divisor instead of chasing a number forever.

Moves garbage collection out of your way. Collections get pulled forward into moments you won't feel them, like standing still, opening your inventory, or pausing the game. If you swung a sword in the last six seconds, it won't touch anything. How full the heap gets first depends on the allocation rate it measured on your setup.

Scales the world, not the HUD. When the GPU falls behind or VRAM fills, the 3D world renders smaller and gets scaled back up. Your HUD, text, crosshair and menus draw afterwards at full native resolution and stay sharp. You set the floor and it is respected absolutely. A setting of drs.minScale=0.70 will never go below 70%, whatever happens.

Clears VRAM before the driver panics. Free and total memory come straight from the driver. Thresholds follow the card, so a 2GB GPU starts clearing at 85% and a 12GB one at 94%. Atlases are never touched, only textures the game can re-upload on demand. If no driver extension reports memory, the feature switches itself off instead of guessing.

Stops drawing things smaller than a pixel. Entities that project to less than one physical pixel never reach the driver. The threshold follows your DPI scaling, so 150% Windows scaling needs 1.5 device pixels before something counts.

Builds chunks where you're looking. Your view direction and movement make a forward vector, and terrain inside a 60 degree cone gets built first. On 1.21.9+ this is one small change to the distance the game's own queue already sorts by, so Mojang's scheduling logic stays intact.


The five second benchmark

The first time you load a world, Hydrogen discards a second of loading frames and watches the next five with everything adaptive switched off. It records frame percentiles, jitter, allocation churn and VRAM growth, then derives its thresholds. Nothing is drawn and nothing changes while it runs. It re-runs if you change resolution or monitor.

Real output from a GT 1030 at 1440p:

Hydrogen: NVIDIA GeForce GT 1030 (2.0 GB via NVX_gpu_memory_info) | 2560x1440 @ 144Hz
Hydrogen: baseline p50 7.72ms p95 19.07ms jitter 7.46ms churn 569MB/s headroom 0.36x
Hydrogen: tuned to target 13.89ms stall 18.75ms | drs 0.70-1.00 step 0.040 | vram evict 85%

Headroom of 0.36 means 144Hz was never happening, so it retargeted to 72 and let resolution scaling do the rest.

Works with what you already run

Sodium, Iris, VulkanMod and C2ME all work fine. With Sodium installed, Hydrogen's vanilla chunk ordering switches itself off because Sodium has its own scheduler, and everything else carries on. With VulkanMod, resolution scaling switches off because there is no GL framebuffer to redirect, and the CPU and GC features keep working. Hydrogen never replaces anyone's renderer or shaders. It reads metrics around them.


Configuration

You can find the config at config/hydrogen.properties. Almost every value says auto. Replace one with a number and that value is pinned while everything else keeps tuning itself.

drs.minScale=0.70                       # never scale the world below this
target.frameTimeMs=auto                 # set 16.7 to simply target 60fps
cpu.governor.allowPowerPlanSwitch=auto  # auto = AC power only
log.verbose=false                       # log every tuning decision


Honest limits

Resolution scaling on 1.21.9+ and 26.x uses the new Blaze3D API, which is still changing between snapshots. It is implemented but opt-in behind drs.allowNewBlaze3d=true. On 1.20.x and 1.21.1 it is on by default.

Chunk deferral isn't available on 26.x, because that version reworked how sections get invalidated. Cone prioritisation still works there.

Resolution scaling doesn't mix with Fabulous graphics. Leave it off if you use Fabulous.

There is no settings GUI yet, only the config file.

If native thread pinning is denied, the power governor isn't writable, or your driver reports no VRAM extension, the affected feature degrades quietly and logs once. Nothing crashes and nothing spams your console.


Changelog for version 1.0.0

First release.

Adds:

  • Reads your real P-core, E-core and SMT layout from the OS to keep chunk meshing off the render thread cores.
  • Adjusts clock speeds based on your monitor's actual refresh rate, lifting clocks without root on Linux if needed.
  • Moves garbage collection into idle moments. It locks out during combat and sets heap triggers based on your measured allocation rate.
  • Scales the 3D world while keeping the HUD at native resolution. Your configured floor is never crossed.
  • Clears VRAM using thresholds that follow your card's actual size, reported by the driver rather than assumed.
  • Stops drawing entities smaller than a physical pixel, following your DPI scaling and live viewport.
  • Prioritises building chunks in a 60 degree forward cone based on your movement.
  • Runs a five second calibration pass on world join to derive thresholds from measured frame times, jitter and allocation churn.

Compatible with Sodium, Iris, VulkanMod and C2ME. Conflicting hooks disable themselves automatically.


Known limits include resolution scaling being opt-in on 1.21.9+ and 26.x while the new Blaze3D API settles. Chunk deferral is unavailable on 26.x. There is no settings GUI yet.

No gallery available for this project.

Version Minecraft Loader Download

Hydrogen Fabric 1.20.1 1.0.0

1.0.0

1.20, 1.20.1, 1.20.2, 1.20.3, 1.20.4, 1.20.5, 1.20.6
fabric
Download

Hydrogen Fabric 1.21.1 1.0.0

1.0.0

1.21, 1.21.1
fabric
Download

Hydrogen Fabric 26.2 1.0.0

1.0.0

26.1, 26.1.1, 26.1.2, 26.2
fabric
Download

Hydrogen Fabric 1.21.11 1.0.0

1.0.0

1.21.10, 1.21.11, 1.21.9
fabric
Download