Performance Guide

This guide will help you optimize ClearLaggEnhanced for your server size and type.

Quick Optimization by Server Size

Small Servers (1-20 Players)

Recommended Settings:

Entity Clearing (module/entity-clearing/config.yml):

enabled: true
interval: 600                    # 10 minutes
protect-named-entities: true
protect-tamed-entities: true

Mob Limiter (module/mob-limiter/config.yml):

enabled: true
max-mobs-per-chunk: 75
per-type-limits:
  enabled: false

Why these settings?

  • Less frequent clearing needed with fewer players
  • Higher mob limits allow more mob farms
  • Per-type limits not needed for small player count

Medium Servers (20-100 Players)

Recommended Settings:

Entity Clearing:

enabled: true
interval: 300                    # 5 minutes
protect-named-entities: true
protect-tamed-entities: true
extra-protections:
  mobs-in-boats: true
  mobs-from-breeding: true

Mob Limiter:

enabled: true
max-mobs-per-chunk: 50
per-type-limits:
  enabled: true
  limits:
    ZOMBIE: 15
    SKELETON: 15
    CREEPER: 10
    COW: 12
    CHICKEN: 15

Spawner Limiter (module/spawner-limiter/config.yml):

enabled: true
spawn-delay-multiplier: 1.5

Why these settings?

  • Balanced clearing interval
  • Per-type limits prevent specific mob overloads
  • Spawner limiter reduces farm strain

Large Servers (100+ Players)

Recommended Settings:

Entity Clearing:

enabled: true
interval: 180                    # 3 minutes
protect-named-entities: true
protect-tamed-entities: true
extra-protections:
  mobs-in-boats: true

Mob Limiter:

enabled: true
max-mobs-per-chunk: 35
per-type-limits:
  enabled: true
  limits:
    ZOMBIE: 10
    SKELETON: 10
    CREEPER: 8
    COW: 8
    CHICKEN: 10

Spawner Limiter:

enabled: true
spawn-delay-multiplier: 2.0      # Double delay

Misc Entity Limiter (module/misc-entity-limiter/config.yml):

enabled: true
limits-per-chunk:
  ARMOR_STAND: 3
  BOAT: 5
  ITEM_FRAME: 3
  PAINTING: 5

Why these settings?

  • Aggressive clearing prevents accumulation
  • Lower mob limits reduce spawn overhead
  • Misc entity limits prevent decoration lag
  • Higher spawner multiplier reduces farm impact

Optimization by Server Type

Survival/SMP Servers

Focus: Balance between gameplay and performance

entity-clearing:
  interval: 300
  protect-named-entities: true
  protect-tamed-entities: true
  extra-protections:
    mobs-in-boats: true
    mobs-from-breeding: true
  whitelist:
    - "VILLAGER"
    - "ZOMBIE_VILLAGER"
    - "IRON_GOLEM"
    - "ALLAY"

mob-limiter:
  max-mobs-per-chunk: 50
  per-type-limits:
    enabled: true
    limits:
      VILLAGER: 20             # Allow larger trading halls
      IRON_GOLEM: 5

Key Features:

  • Protect player-important mobs (villagers, named pets)
  • Allow breeding farms
  • Moderate clearing interval

Creative/Build Servers

Focus: Minimal interference with builds

entity-clearing:
  interval: 600                  # Less frequent
  protect-named-entities: true
  protect-armored-entities: true
  whitelist:
    - "ARMOR_STAND"
    - "ITEM_FRAME"
    - "GLOW_ITEM_FRAME"
    - "PAINTING"
    - "ITEM_DISPLAY"
    - "INTERACTION"

misc-entity-limiter:
  enabled: true
  limits-per-chunk:
    ARMOR_STAND: -1              # Unlimited
    ITEM_FRAME: -1               # Unlimited
  protect:
    named: true

Key Features:

  • Protect decoration entities
  • High/unlimited limits for build entities
  • Less aggressive clearing

PvP/Factions Servers

Focus: Maximum performance

entity-clearing:
  interval: 180                  # Very frequent
  protect-named-entities: false  # Don't protect named
  protect-tamed-entities: false
  whitelist:
    - "VILLAGER"                 # Only protect villagers

mob-limiter:
  max-mobs-per-chunk: 30         # Strict limit

spawner-limiter:
  spawn-delay-multiplier: 2.5    # High multiplier

misc-entity-limiter:
  enabled: true
  limits-per-chunk:
    ARMOR_STAND: 2
    ITEM_FRAME: 2

Key Features:

  • Aggressive clearing
  • Minimal protections
  • Low entity limits
  • Performance over convenience

Skyblock Servers

Focus: Support mob farms while maintaining performance

entity-clearing:
  interval: 300
  protect-named-entities: true
  extra-protections:
    mobs-from-breeding: true
  whitelist:
    - "VILLAGER"
    - "ZOMBIE_VILLAGER"
    - "IRON_GOLEM"
    - "COW"
    - "SHEEP"
    - "PIG"
    - "CHICKEN"

mob-limiter:
  max-mobs-per-chunk: 60         # Higher for farms
  per-type-limits:
    enabled: true
    limits:
      ZOMBIE: 30                 # Allow large farms
      SKELETON: 30
      COW: 25
      CHICKEN: 25

Key Features:

  • Higher mob limits for farms
  • Protect breeding mobs
  • Support passive mob farming

Performance Monitoring

Use Built-in Tools

Check TPS Regularly

/lagg tps

Interpretation:

  • Green (19-20 TPS): Excellent, server is healthy
  • Yellow (15-19 TPS): Moderate, consider optimization
  • Red (<15 TPS): Poor, immediate optimization needed

Monitor Memory

/lagg ram

When to worry:

  • Usage >80%: Consider allocating more RAM
  • Usage >90%: Critical, server may crash

Find Laggy Chunks

/lagg chunkfinder

Use to:

  • Identify problem areas
  • Find player-created lag sources
  • Target specific chunks for manual cleanup

Optimization Checklist

Step 1: Baseline Performance

Before optimization:

  1. Note current TPS: /lagg tps
  2. Check memory usage: /lagg ram
  3. Find laggy chunks: /lagg chunkfinder
  4. Document entity counts

Step 2: Enable Core Modules

Enable in this order:

  1. āœ… Entity Clearing
  2. āœ… Mob Limiter
  3. āœ… Spawner Limiter
  4. āœ… Performance Monitor

Test after each module.

Step 3: Adjust Settings

If TPS is still low:

  1. Decrease entity clearing interval
  2. Lower mob-per-chunk limits
  3. Enable misc entity limiter
  4. Increase spawner delay multiplier

If TPS improved too much (unnecessary restrictions):

  1. Increase clearing interval
  2. Raise mob limits
  3. Disable modules not needed

Step 4: Fine-tune Per-Type Limits

Identify problematic mobs:

/lagg chunkfinder

Lower limits for high-count types:

per-type-limits:
  limits:
    ZOMBIE: 8                    # If zombies are causing lag
    CHICKEN: 10                  # If chicken farms are excessive

Step 5: Monitor and Iterate

  • Check TPS daily
  • Adjust based on player feedback
  • Monitor after major events
  • Seasonal adjustments (holidays, events)

Common Performance Issues

Issue: Low TPS Despite Entity Clearing

Diagnosis: Entity clearing alone may not be enough

Solutions:

  1. Enable Mob Limiter
  2. Enable Spawner Limiter
  3. Lower per-chunk limits
  4. Check other plugins for lag

Issue: Players Complaining About Frequent Clears

Diagnosis: Too aggressive clearing

Solutions:

  1. Increase clearing interval
  2. Enable more protection options
  3. Add important entities to whitelist
  4. Customize warning messages

Issue: Specific Chunks Always Laggy

Diagnosis: Player-created lag (farms, redstone)

Solution:

/lagg chunkfinder
  • Visit laggy chunks
  • Identify cause (mob farm, item farm, redstone)
  • Work with players to optimize
  • Consider per-chunk limits more strictly

Issue: Memory Usage Climbing

Diagnosis: Entity accumulation or memory leak

Solutions:

  1. Decrease clearing interval
  2. Enable all limiter modules
  3. Check for leaks in other plugins
  4. Allocate more RAM if needed

Advanced Optimization

World-Specific Settings

While not directly supported, you can use world lists:

entity-clearing:
  worlds:
    - "world"
    - "world_nether"

Strategy:

  • Create stricter configs for laggy worlds
  • Disable modules in peaceful/creative worlds

Time-Based Optimization

Adjust settings based on server load:

High-traffic times (peak hours):

  • Decrease clearing interval
  • Lower mob limits
  • Enable all modules

Low-traffic times (night):

  • Increase clearing interval
  • Raise mob limits
  • More lenient settings

Note: Requires manual config changes or scheduled restarts.

Database Optimization

For MySQL:

database:
  type: "mysql"
  mysql:
    host: "localhost"
    port: 3306
    database: "clearlagg"
    username: "root"
    password: "password"

Benefits:

  • Shared database across multiple servers
  • Better performance for networks
  • Centralized statistics

Recommended Plugin Combinations

With Other Performance Plugins

Compatible:

  • āœ… Spark (profiling)
  • āœ… LagMonitor (monitoring)
  • āœ… ChunkHoppers (hopper optimization)
  • āœ… ClearLag (can replace, but not recommended to run both)

Conflicts:

  • āš ļø Other entity clearing plugins (choose one)
  • āš ļø Mob limiter plugins (may double-limit)

With Gameplay Plugins

Recommended:

  • RoseStacker or WildStacker (entity stacking)
  • ModernShowcase (display protection)
  • PlaceholderAPI (statistics display)
  • Vault (economy, permissions)

Optimization Matrix

Server Size Clearing Interval Mob Limit Per-Type Spawner Multiplier Misc Limiter
1-20 600s (10m) 75 No 1.0 (off) No
20-50 300s (5m) 60 Yes 1.5 No
50-100 300s (5m) 50 Yes 1.5 Optional
100-200 180s (3m) 40 Yes 2.0 Yes
200+ 180s (3m) 30 Yes 2.5 Yes