Hytaled Optimizer
A lightweight, fully automated performance plugin that keeps servers smooth under load while preserving player experience. It adapts view distance, per‑player simulation ranges, NPC AI tick rates, and idle player behavior in real time using TPS, memory, and player activity signals. The system reacts quickly to spikes and recovers quality only when conditions are stable.
Key Features
Smart Global View Distance Control
Dynamically lowers global view distance on low TPS or high heap usage, then restores only after strict recovery conditions (time delay + player drop + stable TPS/heap). Prevents oscillation and lag spikes.
Per‑Player Simulation (HOT) Radius
Automatically reduces per‑player simulation range during TPS drops to cut entity processing cost in heavy hotspots.
AI LOD for NPCs
Adjusts NPC tick rates by distance and visibility with a safety clamp to avoid over‑ticking. Built for large servers with many entities.
Idle Player Optimization
Lowers view/hot/min‑loaded radii for inactive players, reducing RAM and CPU usage while keeping active players unaffected.
Profiler & Diagnostics
Built‑in profiling command with JSON/text export for analysis. Optional event logging with cooldowns to prevent spam.
Auto‑generated & Auto‑repaired Config
Missing keys are added, invalid configs are reset safely, and defaults are enforced without server restarts.
Commands
- /optimizer status
Shows current effective settings and all active optimization ranges.
- /optimizer reload
Reloads config and applies changes immediately (no restart required).
- /optimizer profile [duration]
Starts a profiling window (20–60s). Saves a detailed report to `/mods/Hytaled_Optimizer/profiles/`.
Console has full access. Player permissions are handled through standard server permission nodes.
Installation
1) Drop `Optimizer.jar` into `/mods`
2) Start the server
3) Config is generated at `/mods/Hytaled_Optimizer/config.json`
4) Edit config and run `/optimizer reload` (or restart)
Configuration Guide (Defaults)
LoopIntervalSeconds
- How often optimizer evaluates TPS/heap and makes decisions
- Default: 3 (recommended 1–3)
ViewRadius
- Enabled: true
- BroadcastChanges: true
- Min/Max: 5 / 14
- DecreaseFactor: 0.75
- AdjustmentCooldownSeconds: 5
- RecoveryDelaySeconds: 900 (15 minutes)
- RecoveryPlayerDropPercent: 0.20 (20%)
- TpsLow: 15.0
- TpsHigh: 25.0
- HeapPressureHigh: 0.90
- HeapPressureLow: 0.80
Simulation (Per‑player HOT radius)
- Enabled: true
- Min/Max: 5 / 11
- DecreaseStep: 2
- RecoveryStep: 1
- TpsLow: 15.0
- TpsHigh: 20.0
PerPlayerDistance (Hotspot control)
- Enabled: true
- Min/Max: 5 / 11
- MinLoadedOffset: 1
- HotspotTpsLow: 15.0
- HotspotReduceBy: 2
- CooldownSeconds: 5
AiLod
- Enabled: true
- UpdateIntervalMs: 150
- UseVisibility: true
- NearDistance: 40.0
- MidDistance: 80.0
- FarDistance: 120.0
- MidTickSeconds: 0.2
- FarTickSeconds: 0.5
- VeryFarTickSeconds: 1.0
- MinTickSeconds: 0.05
Logging
- EnableEventLogging: true
- EventLogCooldownSeconds: 30
IdlePlayer
- Enabled: true
- IdleTimeoutSeconds: 90
- CheckIntervalSeconds: 10
- ReduceViewRadius: true (IdleViewRadius: 4)
- ReduceHotRadius: true (IdleHotRadius: 3)
- ReduceMinLoadedRadius: true (IdleMinLoadedRadius: 2)
- ClearWorldMapCache: true
Profiler
- Enabled: true
- AutoWindowDurationSeconds: 60
- ProfileDurationSeconds: 30
- ExportJson: true
Notes
- Recovery is intentionally strict to prevent oscillation and lag spikes.
- All thresholds and timings are configurable.
- Defaults are tuned for high‑population servers & maximizing server usages and only optimizing when really required.
A lightweight, fully automated performance plugin that keeps servers smooth under load while preserving player experience. It adapts view distance, per‑player simulation ranges, NPC AI tick rates, and idle player behavior in real time using TPS, memory, and player activity signals. The system reacts quickly to spikes and recovers quality only when conditions are stable.
Key Features
Smart Global View Distance Control
Dynamically lowers global view distance on low TPS or high heap usage, then restores only after strict recovery conditions (time delay + player drop + stable TPS/heap). Prevents oscillation and lag spikes.
Per‑Player Simulation (HOT) Radius
Automatically reduces per‑player simulation range during TPS drops to cut entity processing cost in heavy hotspots.
AI LOD for NPCs
Adjusts NPC tick rates by distance and visibility with a safety clamp to avoid over‑ticking. Built for large servers with many entities.
Idle Player Optimization
Lowers view/hot/min‑loaded radii for inactive players, reducing RAM and CPU usage while keeping active players unaffected.
Profiler & Diagnostics
Built‑in profiling command with JSON/text export for analysis. Optional event logging with cooldowns to prevent spam.
Auto‑generated & Auto‑repaired Config
Missing keys are added, invalid configs are reset safely, and defaults are enforced without server restarts.
Commands
- /optimizer status
Shows current effective settings and all active optimization ranges.
- /optimizer reload
Reloads config and applies changes immediately (no restart required).
- /optimizer profile [duration]
Starts a profiling window (20–60s). Saves a detailed report to `/mods/Hytaled_Optimizer/profiles/`.
Console has full access. Player permissions are handled through standard server permission nodes.
Installation
1) Drop `Optimizer.jar` into `/mods`
2) Start the server
3) Config is generated at `/mods/Hytaled_Optimizer/config.json`
4) Edit config and run `/optimizer reload` (or restart)
Configuration Guide (Defaults)
LoopIntervalSeconds
- How often optimizer evaluates TPS/heap and makes decisions
- Default: 3 (recommended 1–3)
ViewRadius
- Enabled: true
- BroadcastChanges: true
- Min/Max: 5 / 14
- DecreaseFactor: 0.75
- AdjustmentCooldownSeconds: 5
- RecoveryDelaySeconds: 900 (15 minutes)
- RecoveryPlayerDropPercent: 0.20 (20%)
- TpsLow: 15.0
- TpsHigh: 25.0
- HeapPressureHigh: 0.90
- HeapPressureLow: 0.80
Simulation (Per‑player HOT radius)
- Enabled: true
- Min/Max: 5 / 11
- DecreaseStep: 2
- RecoveryStep: 1
- TpsLow: 15.0
- TpsHigh: 20.0
PerPlayerDistance (Hotspot control)
- Enabled: true
- Min/Max: 5 / 11
- MinLoadedOffset: 1
- HotspotTpsLow: 15.0
- HotspotReduceBy: 2
- CooldownSeconds: 5
AiLod
- Enabled: true
- UpdateIntervalMs: 150
- UseVisibility: true
- NearDistance: 40.0
- MidDistance: 80.0
- FarDistance: 120.0
- MidTickSeconds: 0.2
- FarTickSeconds: 0.5
- VeryFarTickSeconds: 1.0
- MinTickSeconds: 0.05
Logging
- EnableEventLogging: true
- EventLogCooldownSeconds: 30
IdlePlayer
- Enabled: true
- IdleTimeoutSeconds: 90
- CheckIntervalSeconds: 10
- ReduceViewRadius: true (IdleViewRadius: 4)
- ReduceHotRadius: true (IdleHotRadius: 3)
- ReduceMinLoadedRadius: true (IdleMinLoadedRadius: 2)
- ClearWorldMapCache: true
Profiler
- Enabled: true
- AutoWindowDurationSeconds: 60
- ProfileDurationSeconds: 30
- ExportJson: true
Notes
- Recovery is intentionally strict to prevent oscillation and lag spikes.
- All thresholds and timings are configurable.
- Defaults are tuned for high‑population servers & maximizing server usages and only optimizing when really required.