Skip to main content

SCP:SL Server Optimization

This guide provides comprehensive optimization strategies for your SCP: Secret Laboratory server to ensure smooth gameplay and optimal performance.

Performance Baseline

Before optimizing, establish performance baselines:
MetricGoodAcceptablePoor
Tick Rate60 TPS50-59 TPSBelow 50 TPS
Server FPS60+ FPS45-60 FPSBelow 45 FPS
RAM UsageUnder 2GB2-3GBOver 3GB
CPU UsageUnder 40%40-70%Over 70%
Network LatencyUnder 50ms50-100msOver 100ms
Monitor these metrics through your Wasabi Hosting Gamepanel dashboard or server console.

Configuration Optimization

Gameplay Configuration

Optimize config_gameplay.txt for better performance:
# Optimized Gameplay Settings

# Reduce item spawn rates for better performance
item_spawn_multiplier: 0.9

# Faster item cleanup
dropped_item_despawn_time: 120
item_despawn_time: 240

# Ragdoll cleanup
ragdoll_cleanup_time: 8
max_ragdolls: 20

# Efficient respawn timing
respawn_time_minimum: 15
respawn_time_maximum: 20

# Decontamination (reduces entity count in LCZ)
decontamination_time: 690

# Warhead timing (ends rounds before performance degrades)
warhead_auto_detonate_time: 900
Lower item_spawn_multiplier and faster despawn times significantly reduce entity count, improving server performance.

Network Optimization

Configure network settings in config.txt:
# Network Performance Settings
tick_rate: 60
send_rate: 60
max_snapshot_entities: 128

# Connection Settings
timeout_time: 60
max_ping: 500
kick_on_timeout: true

# Bandwidth Management
network_compression: true
max_packet_size: 1024
interpolation: 0.1

Server Process Optimization

Optimize startup parameters:
# Recommended Startup Parameters
-port 7777 \
-maxplayers 20 \
-nographics \
-batchmode \
-nodedicateddelete \
-logFile logs/server.log \
-high
ParameterPurposePerformance Impact
-nographicsDisables graphics renderingHigh - Essential for dedicated servers
-batchmodeRuns without user interactionMedium - Reduces overhead
-highSets process priority to highMedium - Better CPU allocation
-logFileCustom log locationLow - Better log management
-maxplayers 20Limits player countVariable - Scale based on hardware

System-Level Optimization

Memory Management

# Memory Optimization Settings

# Garbage Collection
gc_mode: incremental
gc_interval: 300

# Memory Limits
max_memory: 2048  # MB
memory_cleanup_threshold: 1536  # MB

# Object Pool Settings
enable_object_pooling: true
pool_size_weapons: 50
pool_size_items: 100
pool_size_projectiles: 200
Setting memory limits too low can cause crashes. Ensure at least 2GB is allocated for optimal performance.

CPU Optimization

Distribute load across CPU cores:
# Multi-threading Settings
enable_multithreading: true
worker_threads: 4
physics_thread_count: 2

# CPU Priority
process_priority: high
affinity_mask: auto  # Let the OS handle core allocation

Plugin Optimization

EXILED Plugin Framework

Optimize EXILED configuration:
# EXILED Optimization (~/.config/EXILED/Configs/exiled.yml)
debug: false
environment: production

# Performance Settings
max_event_handlers: 100
event_handler_timeout: 5000

# Logging (reduce for better performance)
log_level: Info
log_events: false
detailed_errors: false

Plugin Best Practices

Performance-Friendly Plugins:
  • Well-maintained and regularly updated
  • Minimal event subscriptions
  • Efficient database queries
  • Proper error handling
  • Asynchronous operations where possible
Avoid:
  • Abandoned or outdated plugins
  • Plugins that hook into every game event
  • Poorly coded plugins with memory leaks
  • Redundant plugins providing similar features

Database Optimization

If using plugins with database functionality:
# MySQL Optimization
database:
  # Connection Pooling
  min_pool_size: 2
  max_pool_size: 10
  connection_timeout: 15

  # Query Optimization
  use_prepared_statements: true
  enable_query_cache: true
  cache_size: 256  # MB

  # Performance
  batch_size: 100
  async_operations: true
Use connection pooling to reuse database connections and reduce overhead.

Entity Management

Item and Ragdoll Cleanup

# Entity Cleanup Configuration

# Automatic Cleanup
enable_auto_cleanup: true
cleanup_interval: 60  # seconds

# Item Management
max_items_per_room: 30
item_despawn_time: 180
dropped_item_despawn_time: 120

# Ragdoll Management
ragdoll_cleanup_time: 10
max_ragdolls: 20
cleanup_ragdolls_on_round_end: true

# Projectile Management
projectile_lifetime: 30
max_active_projectiles: 50

Door and Elevator Optimization

# Door Settings
door_update_rate: 10  # Updates per second
door_close_time: 5

# Elevator Settings
elevator_movement_speed: 5.0
elevator_wait_time: 3

Round Optimization

Efficient Round Settings

# Round Configuration for Performance

# Quick Round Start
lobby_waiting_time: 20
round_start_countdown: 10

# Auto-Restart
auto_round_restart: true
auto_round_restart_time: 5

# Round Duration
warhead_auto_detonate_time: 900  # 15 minutes
max_round_time: 1200  # 20 minutes

# Respawn Optimization
respawn_time_minimum: 15
respawn_time_maximum: 20
max_respawn_amount: 15
Shorter rounds prevent performance degradation from entity buildup and keep the server fresh.

Network and Bandwidth Optimization

Connection Settings

# Network Optimization

# Rate Settings
tick_rate: 60
send_rate: 60
receive_rate: 60

# Bandwidth
max_rate: 100000
min_rate: 10000

# Compression
enable_compression: true
compression_level: 6  # Balance between CPU and bandwidth

# Anti-DDoS
rate_limit_enabled: true
max_connections_per_ip: 2
connection_throttle: 1000  # ms between connections

Port Configuration

# Efficient Port Setup
server_port: 7777
query_port: 7777
max_simultaneous_queries: 50

Performance Monitoring

Logging Configuration

Balance between information and performance:
# Optimized Logging

# Log Levels
log_level: Warning  # Only log warnings and errors
debug_logging: false

# Log Rotation
log_rotation: daily
max_log_files: 7
compress_old_logs: true

# Specific Logging
log_player_connections: true
log_admin_commands: true
log_performance_warnings: true
log_every_action: false  # Disable verbose logging

Performance Alerts

Configure alerts for performance issues:
# Performance Monitoring

# Thresholds
cpu_usage_alert: 80
memory_usage_alert: 85
tick_rate_alert: 45
lag_spike_threshold: 100  # ms

# Alert Actions
alert_admins: true
auto_cleanup_on_lag: true
emergency_restart_threshold: 90  # % CPU

Player Count Optimization

Scaling by Player Count

  • Small (8-12 players)
  • Medium (12-20 players)
  • Large (20-30 players)
# Optimized for 8-12 players
max_players: 12
max_items_spawn: 80
max_ragdolls: 15
item_spawn_multiplier: 0.8

# Can afford higher quality
tick_rate: 60
send_rate: 60

Anti-Cheat Optimization

Balance security and performance:
# Anti-Cheat Settings

# Enable Essential Checks
enable_anticheat: true
check_player_speed: true
check_noclip: true
check_item_spawn: true

# Reduce Check Frequency (better performance)
anticheat_check_interval: 5  # seconds
anticheat_tolerance: 0.7

# Disable Expensive Checks (if low on resources)
check_every_packet: false
deep_packet_inspection: false

Advanced Optimization Techniques

Object Pooling

# Object Pooling Configuration

# Enable Pooling
enable_object_pooling: true

# Pool Sizes
pool_bullets: 500
pool_grenades: 50
pool_items: 200
pool_effects: 100

# Pool Behavior
prewarm_pools: true
dynamic_pool_sizing: true
max_pool_growth: 2.0

Async Operations

# Asynchronous Processing

# Enable Async
enable_async_physics: true
enable_async_pathfinding: true
enable_async_loading: true

# Threading
max_background_threads: 4
background_thread_priority: low

Caching

# Caching Configuration

# Enable Caches
enable_player_cache: true
enable_room_cache: true
enable_spawn_cache: true

# Cache Settings
cache_lifetime: 300  # seconds
max_cache_size: 512  # MB
cache_cleanup_interval: 60

Hardware Recommendations

Optimization Checklist

Use this checklist to optimize your server:
  • Configure optimal player count for your hardware
  • Enable item and ragdoll cleanup
  • Set appropriate despawn times
  • Configure network compression
  • Optimize tick rate based on player count
  • Remove unnecessary plugins
  • Enable object pooling
  • Configure efficient logging
  • Set up automatic round restart
  • Enable warhead auto-detonation
  • Configure database connection pooling (if applicable)
  • Set process priority to high
  • Monitor performance metrics regularly
  • Keep server and plugins updated

Troubleshooting Performance Issues

Common Causes:
  • Too many plugins running intensive operations
  • Large player count exceeding server capacity
  • Memory leaks in plugins
  • Inefficient event handlers
Solutions:
  • Reduce max player count
  • Disable non-essential plugins
  • Lower tick rate to 50 or 45
  • Enable more aggressive cleanup
  • Update or remove problematic plugins
Common Causes:
  • Poorly coded plugins not releasing objects
  • Excessive ragdoll/item accumulation
  • Large log files
Solutions:
  • Enable automatic cleanup
  • Reduce entity spawn rates
  • Restart server regularly (daily recommended)
  • Update plugins to latest versions
  • Enable log rotation and compression
Common Causes:
  • Insufficient bandwidth
  • DDoS attacks
  • Too many simultaneous connections
  • Large packet sizes
Solutions:
  • Enable network compression
  • Implement rate limiting
  • Configure anti-DDoS protection (use Firewall Manager)
  • Reduce send/receive rates if needed
  • Limit connections per IP
Common Causes:
  • Server overloaded
  • Blocking operations in game thread
  • Insufficient CPU resources
  • Too many entities
Solutions:
  • Reduce player count
  • Enable async operations
  • Increase cleanup frequency
  • Remove CPU-intensive plugins
  • Lower visual quality settings

Maintenance Schedule

Regular maintenance ensures optimal performance: Daily:
  • Monitor performance metrics
  • Check error logs
  • Verify tick rate stability
Weekly:
  • Review plugin performance
  • Clean up old logs
  • Update critical plugins
  • Analyze player feedback
Monthly:
  • Full server restart
  • Plugin audit (remove unused)
  • Configuration review
  • Performance benchmark tests
  • Server and plugin updates
Schedule restarts during off-peak hours to minimize player disruption.

Performance Testing

Test optimization changes:
1

Establish baseline

Record current performance metrics before changes
2

Apply single change

Make one optimization change at a time
3

Monitor for 24 hours

Observe performance over a full day cycle
4

Compare metrics

Compare new metrics to baseline
5

Keep or revert

Keep change if improved, revert if worse
By following these optimization guidelines, your SCP: Secret Laboratory server on Wasabi Hosting will deliver excellent performance and a smooth gameplay experience for your players.