# Chunks optimizer

{% hint style="info" %}
This config allows to optimize how chunks are managed in Minecraft.\
What you can do:

* **detect chunks** with **lagging** mechanics (redstone machines, 0 tick machines, water or lava lagging the server, plugins listening to high frequency block updates)
* **lower down chunks packets** sending **frequency** to players if the server TPS is low or if the player ping is high (to avoid player losing connection if they have slow internet)
* **unload chunks** from **RAM** when players are not around them, to avoid high RAM usage, low TPS and crash
  {% endhint %}

(Description of the option is in gray)

```yaml
slow-down-chunk-packets:
  # slow down chunks packets sending when TPS is below this value
  when-tps-below:
    enabled: true
    value: 19
  # slow down chunks packets sending when player ping is below this value
  when-high-player-ping:
    enabled: true
    value: 150
  # only in these worlds
  worlds:
    - world
    - world_nether
    - world_the_end
block-physics-lag-detector:
  enabled: true
  # detect chunks lagging only when TPS is below this value
  low-tps: 18
  lag:
  # notify lag only after these ticks (example 950000) to avoid message spam
    warning-threshold: 950000
  # notify online OP players
    notify-op: true
  # enable this to cancel the lagging event (to block the lagging machine for example)
    cancel-event: false
  # only in these worlds
  worlds:
    - world
    - world_nether
    - world_the_end
unload-chunks:
  enabled: true
  # unload chunks with no players only after some ticks (example 6000)
  interval-ticks: 6000
  log:
    # log the unload event in console
    unload: true
  # only in these worlds
  worlds:
    - world
    - world_nether
    - world_the_end
```


---

# Agent Instructions: Querying This Documentation

If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://serverbooster.devs.beer/configurations/chunks-optimizer.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
