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
- Use default settings
- SQLite is sufficient
- No special optimization needed
For Medium Servers
- Monitor database size
- Consider MySQL if growing
- Adjust cache size if needed
- Review order expiration times
For Large Servers
- Use MySQL
- Increase cache size
- Optimize database server
- Consider dedicated database server
- Monitor all metrics regularly
Troubleshooting Performance
Slow Commands
Check:
- Database performance
- Cache effectiveness
- Server resources (CPU, RAM)
- Other plugins interfering
Solutions:
- Switch to MySQL
- Increase cache size
- Optimize database
- Check server resources
High Memory Usage
Check:
- Cache size too large
- Too many cached orders
- Database connection pool
Solutions:
- Reduce cache size
- Reduce cache expiration
- Optimize database queries
Database Locking
Check:
- Multiple server instances
- Database file permissions
- Concurrent operations
Solutions:
- Ensure single server instance
- Check file permissions
- Use MySQL for multi-server
Best Practices
- Start with Defaults: Default settings work for most servers
- Monitor First: Monitor before optimizing
- Optimize Gradually: Make small changes and test
- Use MySQL for Scale: Switch to MySQL when needed
- Regular Maintenance: Clean up old data periodically
Related Documentation
- Configuration - Config reference
- Database Configuration - Database settings
- Troubleshooting - Performance issues