← Back to documentation

Server documentation

LeanCore

Active

Hytale • Version 1.8.0

Install, commands, config, permissions, LITE profile, live-heap tiers, chunk retention, chunk rate brake, QuantumHy coexistence, HUD, heatmap, and zone pin for LeanCore.

Install, commands, config, and permissions for LeanCore.


Overview

LeanCore is a server-side memory governor for Hytale. It reads the heap left after each garbage collection (plus old gen after GC and its growth trend) and acts on that: it trims view and simulation radius under real pressure, keeps recently visited chunks loaded while there is spare heap so walking back does not reload them from disk, and brakes chunk streaming when memory is tight. The engine already unloads every chunk no player tracks after about 7.5 seconds; LeanCore never removes chunks itself. Solo embedded runs profile LITE; STANDARD and FULL add the full governor paths when enabled. Includes Activity Sense, session heap reporting (/leancore savings), dedicated bootstrap, always-on [diag] diagnostics, learning snapshot v9, and world-thread-safe dispatch. Requires Hytale server >=0.7.0. Does not touch client FPS, GPU, or TPS.


Installation

  1. Download LeanCore-1.8.0.jar from the CurseForge Files tab
  2. Place the JAR in your server’s mods/ folder
  3. Start the server. Config is generated at mods/durkz_LeanCore/LeanCore.json
  4. Grant staff HUD/admin access (see Permissions below)
  5. Run /leancore memory and /leancore status after about a minute

Singleplayer / local host: use default hudViewerGroups / hudAdminGroups (OP, Admin) or grant permission nodes with /perm.


Embedded host profiles

PlayersProfileTickWhat runs
1 (solo local)LITE30s (60s idle), pressure check every 5sLite governor, adaptive view, retention, lite learning
1 + embeddedStandardProfileSTANDARD15sLocal dogfood of govern/learning without FULL 5s tick
2–8 (friends)STANDARD15sClassifier; govern/learning/HUD if enabled in config
9+ (dense local)FULL5sFull runtime per config
Dedicated JVMFULL5sFull runtime per config

Config: localHostMode: "AUTO" (default). Use "PASSIVE" to disable background runtime entirely. Set dedicatedServerMode: true on a dedicated JVM host.

Boot log (solo): LeanCore 1.8.0 setup (localHostMode=AUTO). and Runtime started profile=LITE. Friend joins → profile LITE -> STANDARD.


Memory tiers

TierHeap after GC (default)What LeanCore does
COMFORTunder watchHeapRatio (0.70)full view, chunk retention active
WATCHfrom 0.70gentle view trims, held chunks released
TIGHTfrom tightHeapRatio (0.82)stronger trims, smaller simulation radius, chunk rate brake
CRITICALfrom criticalHeapRatio (0.90)most aggressive trims, harder brake, optional webhook

Old gen is read after GC too, so dead chunk data waiting for collection does not count. Raw heap alone only means CRITICAL at 97%. A climbing live set can raise the tier early. Changes need two readings to confirm, policy changes are spaced by policyChangeMinIntervalSec, and giving view back is undone if the heap climbs right after. A cut is never undone just because the heap kept rising.


Chunk retention

When a chunk leaves every player’s view the engine unloads it about 7.5 seconds later, whatever the heap looks like. While the tier is COMFORT and the heap after GC stays under chunkRetentionMaxPostGcRatio (0.50), LeanCore takes an engine keep-loaded reference on such chunks, up to a budget sized from that headroom (chunkRetentionMbPerChunk, capped by chunkRetentionMaxChunks). The engine stops ticking held chunks.

  • Player walks back: the chunk is already loaded, nothing is read from disk.
  • Any tier above COMFORT: everything is released on the next check (every 2s).
  • A held chunk is released after chunkRetentionMaxHoldSeconds (600).
  • Chunks closest to an online player are taken first, and nothing farther than chunkRetentionMaxDistanceBlocks (1024) is held. Over budget, the farthest go first, 64 per check, so a short rise in the heap does not drop the whole trail. The trail of someone who left the area is the last thing kept.
  • At most 64 new chunks per check, so the heap reading keeps up, and none once the heap after GC is within 5% of the ceiling.

LeanCore never removes chunks; releasing only drops the reference and the engine unloads as usual. /leancore status shows retention held=… budget=….


Chunk rate brake

On TIGHT and CRITICAL each player’s chunk send rate is capped at chunkRateBrakeTightPerSecond (512) and chunkRateBrakeCriticalPerSecond (192) sections per second; COMFORT and WATCH restore the engine’s own rate. It only ever lowers the rate. Skipped while QuantumHy is loaded, or when chunkThroughputGovernanceEnabled is on.


Working with QuantumHy

With both mods installed, QuantumHy takes the client view radius and the chunk send rate (its anti-stutter smoothing). LeanCore keeps memory: tiers, simulation radius, and chunk retention. QuantumHy reads LeanCore’s tier and tightens its render radius on TIGHT or CRITICAL. LeanCore’s chunk rate brake stays off while QuantumHy is loaded. Setting chunkThroughputGovernanceEnabled: true hands the send rate to LeanCore instead.


Features

  • Runtime profiles: LITE, STANDARD, FULL on embedded vs dedicated hosts
  • Live-heap tiers: COMFORT, WATCH, TIGHT, CRITICAL from heap after GC, old gen after GC and growth trend; rollback when giving view back backfires
  • Chunk retention (1.8): spare heap keeps recently left chunks loaded
  • Chunk rate brake (1.8): slows streaming on TIGHT/CRITICAL; off with QuantumHy
  • View-radius trims (LITE) and simulation radius trims under real pressure, never below liteMinClientViewRadius
  • Cinematic view boost (motionViewRadiusBoostEnabled, opt-in): raises view distance for fast movers; off by default (per-tick view radius rewrites churn chunk loading on the current engine)
  • Always-on diagnostics (diagnosticLogEnabled): startup/shutdown summaries and [diag] decision logs per profile
  • Learning data: heap windows (60s / 15m / 24h), demand model, zone reuse stats; saved across restarts (schema v9)
  • Activity Sense: online softmax classifier (MINER, LUMBERJACK, FARMER, BUILDER, FIGHTER, EXPLORER)
  • Session savings: /leancore savings reports JVM heap peak/baseline/delta and governor activity
  • Dedicated bootstrap: one-time preset on first dedicated boot
  • Admin HUD (/leancore hud on): small heap/tier overlay. Off by default.
  • Heatmap, zone pin, optional CRITICAL webhook

Commands

Main command: /leancore

CommandAccessDescription
/leancore statusEveryoneProfile, tier, pressure line (heap after GC, old gen, allocation, GC time, trend), retention line
/leancore memoryEveryoneHeap snapshot, tier, footprint
/leancore savingsEveryoneSession JVM heap and governor state
/leancore zonesEveryoneZone counters
/leancore learnEveryoneLearning diagnostics
/leancore learn playerEveryoneDemand features, posterior, activity EMAs
/leancore probeEveryoneAPI capability probe (S1–S5), diagnostic only
/leancore hud onHUD viewersEnable opt-in memory HUD overlay
/leancore hud offHUD viewersDisable HUD overlay
/leancore hud statusHUD viewersHUD eligibility and toggle state
/leancore heatmap [limit]StaffZone heatmap
/leancore zone pinStaffPin current zone as HOT
/leancore zone unpinStaffUnpin current zone
/leancore zone pinsStaffList pinned zones
/leancore status
/leancore memory
/leancore savings
/leancore zones
/leancore learn
/leancore learn player
/leancore probe
/leancore hud on|off|status
/leancore heatmap [limit]
/leancore zone pin|unpin|pins

Permissions

LeanCore uses permission nodes and/or config group lists. Either path can grant access.

PermissionDescription
durkz.leancore.hudToggle and view the opt-in memory HUD (/leancore hud …)
durkz.leancore.adminHeatmap, zone pin/unpin/pins, and admin HUD tools
  • HUD viewers: groups in hudViewerGroups and/or durkz.leancore.hud
  • Admin heatmap, zone pin: hudAdminGroups and/or durkz.leancore.admin

Config groups (default)

"hudViewerGroups": ["OP", "Admin"],
"hudAdminGroups": ["OP", "Admin"]

Quick setup with Hytale /perm

/perm group add OP durkz.leancore.admin

Configuration (LeanCore.json)

Path: mods/durkz_LeanCore/LeanCore.json

KeyDefaultDescription
enabledtrueMaster enable
localHostModeAUTOAUTO, PASSIVE, or FULL on embedded host
governEnabledfalseSTANDARD/FULL governor
learningEnabledfalseSTANDARD/FULL learning
embeddedStandardProfilefalseSolo embedded → STANDARD instead of LITE
dedicatedServerModefalseForce FULL profile
dedicatedViewRadiusGraceSeconds600Dedicated hosts: no view-radius cuts for this long after start
watchHeapRatio0.70WATCH threshold, heap after GC
tightHeapRatio0.82TIGHT threshold, heap after GC
criticalHeapRatio0.90CRITICAL threshold, heap after GC
liteMemoryGovernorEnabledtrueSolo lite governor
liteLearningEnabledtrueSolo demand model + persistence
liteViewRadiusEnabledtrueAdaptive view on solo
liteMinClientViewRadius8Never trim view below this
liteViewPressureThreshold0.85COMFORT cap when chunk saturation is high
chunkRetentionEnabledtrueKeep recently left chunks loaded while there is spare heap
chunkRetentionMaxPostGcRatio0.50Ceiling for heap after GC (kept below watchHeapRatio). New holds stop 5% under it; above it the farthest go first, 64 per check
chunkRetentionMbPerChunk1.0Heap estimate per held chunk for the budget
chunkRetentionMaxChunks2048Hard cap on held chunks
chunkRetentionMaxHoldSeconds600Release a held chunk after this long
chunkRetentionMaxDistanceBlocks1024Hold nearest-first; nothing farther than this from an online player
chunkRateBrakeEnabledtrueBrake chunk streaming on TIGHT/CRITICAL
chunkRateBrakeTightPerSecond512Sections/s cap per player on TIGHT
chunkRateBrakeCriticalPerSecond192Sections/s cap per player on CRITICAL
chunkThroughputGovernanceEnabledfalseHand the send rate to LeanCore’s tier-scaled throughput (QuantumHy then yields)
motionModelEnabledtruePer-player motion model
zoneReuseModelEnabledtrueReuse-distance + survival model per zone
motionViewRadiusBoostEnabledfalseOpt-in cinematic view boost for fast movers
diagnosticLogEnabledtrueAlways-on [diag] session/decision logs
checkForUpdatestrueNotify ops/admins when a newer JAR is published
gcHintEnabledfalseExperimental LITE idle GC nudge

No longer used since 1.8.0, kept so old configs load: unloadEnabled, liteUnloadEnabled, liteUnloadIdleSeconds, unloadProbeGateEnabled, probePassedAtMs.

Learning snapshot: mods/durkz_LeanCore/learning.state.gz (schema v9, gzip).

HUD toggles per player: mods/durkz_LeanCore/hud.state.


  • Solo / local: keep localHostMode: AUTO. LITE governor, retention and learning are on by default.
  • Dedicated or friends: enable governEnabled and learningEnabled. More heap means more room for retention.
  • With QuantumHy: install both and leave chunkThroughputGovernanceEnabled off.
  • Use /leancore savings after 15+ minutes on dedicated hosts to read heap delta and governor counters.

Verifying it works

  1. Log should show LeanCore 1.8.0 setup (localHostMode=AUTO). and profile=LITE on solo
  2. /leancore status: profile LITE, a pressure= line and a retention on held=… budget=… line
  3. Walk away from spawn and stop: held goes up while the tier stays COMFORT
  4. Friend joins → log profile LITE -> STANDARD
  5. Mine ore → /leancore learn player shows posterior=MINER and demand/viewScale

What matters is server JVM heap, not client FPS or GPU.


License

MIT License. Copyright (c) 2026 DurkzPRG