BuildersWand
  • Introduction
    • Getting Started
    • Quick Start Guide
    • Installation Guide
    • First Steps
  • Core Features and Usage
    • Understanding Wands
    • Selection Modes
    • Settings GUI
    • Storage System
    • Durability and Repair
  • Configuration and Customization
    • Configuration Overview
    • Main Configuration (config.yml)
    • Wands Configuration (wands.yml)
    • Languages and Messages
    • Permissions Setup
    • Plugin Integrations
    • Performance Tuning
  • Commnds and administration
    • Commands Usage
Powered by GitBook
On this page
  1. Configuration and Customization

Performance Tuning

PreviousPlugin IntegrationsNextCommands Usage

Last updated 1 month ago

CtrlK
  • Performance Tuning
  • Anti-Lag System
  • Memory Management
  • Rendering Optimization
  • Processing Optimization
  • Usage Restrictions
  • Physics Optimization
  • Server-Specific Optimizations
  • Performance Testing
  • Troubleshooting Performance Issues
  • Performance Profiles

Performance Tuning

BuildersWand is designed to be efficient, but server performance can vary based on configuration, hardware, and usage patterns. This guide helps you optimize the plugin for your specific server setup and usage requirements.

Anti-Lag System

Configuration

performance:
  anti-lag:
    enabled: true                 # Enable anti-lag features
    max-blocks-per-tick: 100      # Maximum blocks processed per tick
    max-processing-time: 10       # Maximum processing time per tick (ms)
    operation-delay:

Anti-Lag Features

  • Block Limiting: Limits blocks processed per server tick

  • Time Limiting: Limits processing time per tick

  • Operation Spreading: Spreads large operations across multiple ticks

  • Queue Management: Queues operations when limits are reached

Tuning Guidelines

Low-End Servers (2-4GB RAM, 2-4 cores):

performance:
  anti-lag:
    max-blocks-per-tick: 50
    max-processing-time: 5
    operation-delay: 3
    spread-operations: true

Mid-Range Servers (4-8GB RAM, 4-8 cores):

performance:
  anti-lag:
    max-blocks-per-tick: 100
    max-processing-time: 10
    operation-delay: 2
    spread-operations: true

High-End Servers (8GB+ RAM, 8+ cores):

performance:
  anti-lag:
    max-blocks-per-tick: 200
    max-processing-time: 15
    operation-delay: 1
    spread-operations: false

Memory Management

Configuration

performance:
  memory:
    max-cached-selections: 10     # Maximum cached selections per player
    cache-cleanup-interval: 600   # Cache cleanup interval (ticks)
    max-memory-usage: 100         # Maximum memory usage (MB)

Memory Optimization

Selection Caching

  • Caches recent selections to avoid recalculation

  • Automatically cleans up old selections

  • Limits cache size per player

Memory Limits

  • Prevents excessive memory usage

  • Automatically frees memory when limits are reached

  • Monitors memory usage in real-time

Tuning Guidelines

Conservative Memory Settings:

performance:
  memory:
    max-cached-selections: 5
    cache-cleanup-interval: 300
    max-memory-usage: 50

Balanced Memory Settings:

performance:
  memory:
    max-cached-selections: 10
    cache-cleanup-interval: 600
    max-memory-usage: 100

Aggressive Memory Settings:

performance:
  memory:
    max-cached-selections: 20
    cache-cleanup-interval: 1200
    max-memory-usage: 200

Rendering Optimization

Configuration

wand:
  rendering:
    render-interval: 3            # Ticks between selection updates

Rendering Settings

Low-End Servers:

wand:
  rendering:
    render-interval: 5            # Less frequent updates

Mid-Range Servers:

wand:
  rendering:
    render-interval: 3            # Balanced updates

High-End Servers:

wand:
  rendering:
    render-interval: 1            # Frequent updates

Particle Optimization

wands:
  basic:
    particles:
      enabled: true
      count: 2                    # Fewer particles for performance
  advanced:
    particles:
      enabled: true
      count: 3
  expert:
    particles:
      enabled: true
      count: 5

Processing Optimization

Configuration

performance:
  optimization:
    async-processing: true        # Use async processing where possible
    batch-updates: true           # Batch block updates
    chunk-based-processing: true  # Use chunk-based processing
    max-chunks-per-operation: 4   # Maximum chunks per operation

Processing Features

Async Processing

  • Processes operations in background threads

  • Reduces main thread load

  • Improves server responsiveness

Batch Updates

  • Groups multiple block updates together

  • Reduces server tick impact

  • Improves overall performance

Chunk-Based Processing

  • Processes blocks by chunks

  • Reduces memory fragmentation

  • Improves cache efficiency

Tuning Guidelines

Conservative Processing:

performance:
  optimization:
    async-processing: true
    batch-updates: true
    chunk-based-processing: true
    max-chunks-per-operation: 2

Balanced Processing:

performance:
  optimization:
    async-processing: true
    batch-updates: true
    chunk-based-processing: true
    max-chunks-per-operation: 4

Aggressive Processing:

performance:
  optimization:
    async-processing: true
    batch-updates: true
    chunk-based-processing: true
    max-chunks-per-operation: 8

Usage Restrictions

Rate Limiting

restrictions:
  limits:
    max-blocks-per-use: 10000     # Maximum blocks per wand use
    max-blocks-per-second: 100    # Anti-lag rate limiting
    daily-limit: 0                # Daily usage limit (0 = unlimited)
    session-limit: 0              # Session usage limit (0 = unlimited)

Restriction Guidelines

Strict Restrictions (Low-End Servers):

restrictions:
  limits:
    max-blocks-per-use: 5000
    max-blocks-per-second: 50
    daily-limit: 100000
    session-limit: 10000

Moderate Restrictions (Mid-Range Servers):

restrictions:
  limits:
    max-blocks-per-use: 10000
    max-blocks-per-second: 100
    daily-limit: 0
    session-limit: 0

Loose Restrictions (High-End Servers):

restrictions:
  limits:
    max-blocks-per-use: 50000
    max-blocks-per-second: 500
    daily-limit: 0
    session-limit: 0

Physics Optimization

Configuration

wand:
  physics:
    break-enabled: true           # Enable physics for block breaking
    place-enabled: true           # Enable physics for block placement
    update-delay: 1               # Delay between physics updates
    max-blocks-per-update: 50     # Maximum blocks per physics update

Physics Settings

Performance-Focused:

wand:
  physics:
    break-enabled: false          # Disable physics for performance
    place-enabled: false
    update-delay: 5
    max-blocks-per-update: 25

Balanced:

wand:
  physics:
    break-enabled: true
    place-enabled: true
    update-delay: 1
    max-blocks-per-update: 50

Realistic:

wand:
  physics:
    break-enabled: true
    place-enabled: true
    update-delay: 1
    max-blocks-per-update: 100

Server-Specific Optimizations

Small Servers (1-10 players)

performance:
  anti-lag:
    max-blocks-per-tick: 200
    max-processing-time: 20
    operation-delay: 1
    spread-operations: false
  
  memory:
    max-cached-selections: 20
    cache-cleanup-interval: 1200
    max-memory-usage: 200
  
  optimization:
    async-processing: true
    batch-updates: true
    chunk-based-processing: true
    max-chunks-per-operation: 8

Medium Servers (10-50 players)

performance:
  anti-lag:
    max-blocks-per-tick: 100
    max-processing-time: 10
    operation-delay: 2
    spread-operations: true
  
  memory:
    max-cached-selections: 10
    cache-cleanup-interval: 600
    max-memory-usage: 100
  
  optimization:
    async-processing: true
    batch-updates: true
    chunk-based-processing: true
    max-chunks-per-operation: 4

Large Servers (50+ players)

performance:
  anti-lag:
    max-blocks-per-tick: 50
    max-processing-time: 5
    operation-delay: 3
    spread-operations: true
  
  memory:
    max-cached-selections: 5
    cache-cleanup-interval: 300
    max-memory-usage: 50
  
  optimization:
    async-processing: true
    batch-updates: true
    chunk-based-processing: true
    max-chunks-per-operation: 2

Performance Testing

Testing Commands

# Test performance with specific settings
/bw test performance

# Benchmark current configuration
/bw benchmark

# Stress test with multiple players
/bw stresstest <players> <duration>

Performance Metrics

Monitor these key metrics:

  • TPS (Ticks Per Second) - Should stay above 18

  • Memory Usage - Should not exceed 80% of available RAM

  • CPU Usage - Should not exceed 80% of available CPU

  • Block Processing Rate - Should match your settings

Troubleshooting Performance Issues

Common Problems

High CPU Usage:

  1. Reduce max-blocks-per-tick

  2. Increase operation-delay

  3. Enable spread-operations

  4. Reduce particle counts

High Memory Usage:

  1. Reduce max-cached-selections

  2. Decrease cache-cleanup-interval

  3. Lower max-memory-usage

  4. Enable more frequent cleanup

Low TPS:

  1. Reduce processing limits

  2. Enable async processing

  3. Increase operation delays

  4. Limit concurrent operations

Lag Spikes:

  1. Enable operation spreading

  2. Reduce batch sizes

  3. Increase cleanup frequency

  4. Monitor for memory leaks

Performance Profiles

Minimal Performance Impact

performance:
  anti-lag:
    enabled: true
    max-blocks-per-tick: 25
    max-processing-time: 2
    operation-delay: 5
    spread-operations: true
  
  memory:
    max-cached-selections: 3
    cache-cleanup-interval: 300
    max-memory-usage: 25
  
  optimization:
    async-processing: true
    batch-updates: true
    chunk-based-processing: true
    max-chunks-per-operation: 1

Balanced Performance

performance:
  anti-lag:
    enabled: true
    max-blocks-per-tick: 100
    max-processing-time: 10
    operation-delay: 2
    spread-operations: true
  
  memory:
    max-cached-selections: 10
    cache-cleanup-interval: 600
    max-memory-usage: 100
  
  optimization:
    async-processing: true
    batch-updates: true
    chunk-based-processing: true
    max-chunks-per-operation: 4

Maximum Performance

performance:
  anti-lag:
    enabled: true
    max-blocks-per-tick: 500
    max-processing-time: 25
    operation-delay: 1
    spread-operations: false
  
  memory:
    max-cached-selections: 50
    cache-cleanup-interval: 1800
    max-memory-usage: 500
  
  optimization:
    async-processing: true
    batch-updates: true
    chunk-based-processing: true
    max-chunks-per-operation: 16

This comprehensive performance tuning guide ensures BuildersWand runs efficiently on your server while providing the best possible user experience.

2
# Delay between large operations
spread-operations: true # Spread operations across multiple ticks