Foliage
Get on Polymart
  • 🏠Welcome
  • Getting Started
    • 🔩First Install
    • ⌨️Foliage Commands
  • Custom Content
    • 🍂Leaves
    • 🎋Saplings
      • 🌳Trees
    • 🪵Logs
    • Twisting Vines
  • Other
    • 📑Drop Tables
  • Settings
    • 🔋Performance
    • ❇️Vanilla Blocks Behaviour
      • Leaves
      • Saplings
      • Twisting Vines
      • Cave Vines
      • Sugar Cane
    • 🖼️Resource Pack
Powered by GitBook
On this page
  • Performance Settings
  • Chunk Cache
  • Asynchronous Loading
  • Block Updates Batching
  • Save Interval
  • Dense Forest Handling
  • Troubleshooting Performance Issues
  1. Settings

Performance

Some tips to improve performances of the plugin.

Performance Settings

This part explains the settings in the config.yml file.

Chunk Cache

performance:
  chunk-cache-size: 100
  • What it does: Controls how many chunks of custom block data are kept in memory.

  • Higher values: Use more RAM but reduce disk access.

  • Lower values: Save memory but may increase disk I/O.

  • Recommended: 100 for small servers, 256-512 for larger servers with many players.

Asynchronous Loading

performance:
  async-loading: true
  • What it does: Loads custom block data in the background instead of the main server thread.

  • Enabled: Reduces impact on server TPS but may cause very slight delays when placing blocks.

  • Disabled: Blocks appear instantly but can cause server lag during chunk loading.

  • Recommended: Keep enabled (true) for most servers.

Block Updates Batching

performance:
  batch-updates: true
  batch-size: 1000
  • What it does: Groups block updates together to reduce server load.

  • batch-updates: Enables or disables batch processing.

  • batch-size: Maximum number of block updates to process at once.

  • Recommended: Keep enabled with default batch size for most servers. Lower the batch size if you experience lag spikes.

Save Interval

performance:
  save-interval: 300
  • What it does: How often (in seconds) to save custom block data to disk.

  • Higher values: Less frequent saves, better performance, more risk of data loss on crash.

  • Lower values: More frequent saves, slightly more resource usage, less data loss risk.

  • Recommended: 300 seconds (5 minutes) for most servers.

Dense Forest Handling

performance:
  dense-forest:
    emergency-threshold: 8
  • What it does: Controls when the plugin enters emergency mode in densely forested areas.

  • emergency-threshold: Forest density level (0-10) that triggers emergency optimizations.

  • How it works: The plugin measures forest density in chunks. When density exceeds this threshold, the plugin uses aggressive optimizations to maintain server performance.

  • Recommended: Keep at 8 for most servers.

Troubleshooting Performance Issues

If you experience lag with the Foliage plugin:

  1. Check server TPS first to confirm the plugin is the cause.

  2. Reduce batch-size to 500 or lower.

  3. Increase save-interval to 600 seconds.

  4. Reduce chunk-cache-size if you're low on RAM.

  5. Lower emergency-threshold to 7 if you have very dense custom forests.

Remember that the plugin automatically adjusts its processing based on server performance, so these settings serve as guidelines for the automatic system.

PreviousDrop TablesNextVanilla Blocks Behaviour

Last updated 2 months ago

🔋