Skip to main content

Performance Guide

Optimize SigmaOrders for your server size and requirements.

Database Performanceโ€‹

SQLite Optimizationโ€‹

For Small Servers (< 50 players):

  • Default settings are sufficient
  • No optimization needed

For Medium Servers (50-200 players):

  • Monitor database file size
  • Consider periodic cleanup of old orders
  • Default settings usually sufficient

For Large Servers (200+ players):

  • Consider switching to MySQL
  • Monitor database performance
  • Optimize order expiration times

MySQL Optimizationโ€‹

Connection Pool:

database:
mysql:
pool-size: 10 # Increase for high-traffic servers (max 50 recommended)

Database Server:

  • Use dedicated database server for very large servers
  • Monitor connection count
  • Optimize MySQL configuration

Cachingโ€‹

Cache Configurationโ€‹

performance:
cache-size: 100 # Number of orders to cache
cache-expiration: 60 # Cache expiration in seconds

Adjustments:

  • Small servers: Default (100) is sufficient
  • Medium servers: Increase to 200-300
  • Large servers: Increase to 500+ (monitor memory)

Cache Strategyโ€‹

The plugin uses in-memory caching:

  • Frequently accessed orders are cached
  • Cache expires after configured time
  • Cache is cleared on order updates

Async Operationsโ€‹

All database operations are async by default:

  • No server thread blocking
  • Better TPS performance
  • Handled automatically

No configuration needed - this is built-in.

Order Managementโ€‹

Expiration Strategyโ€‹

Shorter expiration = less database storage:

# High activity server
order-life: 1440 # 1 day - frequent cleanup

# Normal server
order-life: 10080 # 7 days - balanced

# Low activity server
order-life: 43200 # 30 days - longer retention

Auto-Cleanupโ€‹

Completed orders are auto-deleted:

  • Reduces database size
  • Improves query performance
  • No manual cleanup needed

GUI Performanceโ€‹

Update Intervalโ€‹

gui:
update-interval: 20 # Ticks (20 = 1 second)

Adjustments:

  • Fast updates: 10-15 ticks (more server load)
  • Balanced: 20 ticks (default)
  • Performance: 40-60 ticks (less frequent updates)

Orders Per Pageโ€‹

gui:
orders-per-page: 45 # Number of orders per page

Adjustments:

  • Lower values = faster loading
  • Higher values = more orders visible
  • Default (45) works for most servers

Monitoringโ€‹

Key Metricsโ€‹

Monitor these metrics:

  • Order creation rate: Orders per hour/day
  • Delivery completion rate: % of orders completed
  • Average order value: Economic activity
  • Database size: Storage usage
  • Cache hit rate: Cache effectiveness

Performance Indicatorsโ€‹

Good Performance:

  • Commands respond quickly (< 1 second)
  • GUI opens instantly
  • No TPS impact
  • Database queries fast

Performance Issues:

  • Commands take > 2 seconds
  • GUI lag or delays
  • TPS drops when using orders
  • Database queries slow

Optimization Tipsโ€‹

For Small Serversโ€‹

  1. Use default settings
  2. SQLite is sufficient
  3. No special optimization needed

For Medium Serversโ€‹

  1. Monitor database size
  2. Consider MySQL if growing
  3. Adjust cache size if needed
  4. Review order expiration times

For Large Serversโ€‹

  1. Use MySQL
  2. Increase cache size
  3. Optimize database server
  4. Consider dedicated database server
  5. Monitor all metrics regularly

Troubleshooting Performanceโ€‹

Slow Commandsโ€‹

Check:

  1. Database performance
  2. Cache effectiveness
  3. Server resources (CPU, RAM)
  4. Other plugins interfering

Solutions:

  1. Switch to MySQL
  2. Increase cache size
  3. Optimize database
  4. Check server resources

High Memory Usageโ€‹

Check:

  1. Cache size too large
  2. Too many cached orders
  3. Database connection pool

Solutions:

  1. Reduce cache size
  2. Reduce cache expiration
  3. Optimize database queries

Database Lockingโ€‹

Check:

  1. Multiple server instances
  2. Database file permissions
  3. Concurrent operations

Solutions:

  1. Ensure single server instance
  2. Check file permissions
  3. Use MySQL for multi-server

Best Practicesโ€‹

  1. Start with Defaults: Default settings work for most servers
  2. Monitor First: Monitor before optimizing
  3. Optimize Gradually: Make small changes and test
  4. Use MySQL for Scale: Switch to MySQL when needed
  5. Regular Maintenance: Clean up old data periodically