Menu
 

Performance Optimization - Rust Wiki

Rust: Server Performance Optimization

Rust is resource-intensive game that demands proper optimization for smooth gameplay. This guide covers hardware requirements, configuration tuning, and advanced techniques to maximize server performance and reduce lag for all players.

Understanding Rust Performance Bottlenecks

CPU Limitations

Rust is primarily CPU-bound. Server tick rate and AI calculations require powerful processors.

RAM Requirements

Adequate RAM prevents stuttering and ensures smooth gameplay with multiple players.

Network Optimization

Proper network settings reduce latency and improve hit registration.

Hardware Requirements by Player Count

Players RAM CPU Cores Clock Speed World Size Expected FPS
10-20 16GB 4 cores 3.5+ GHz 2500x2500 60+
30-50 32GB 8 cores 3.8+ GHz 3000x3000 60+
100-150 64GB 12 cores 4.0+ GHz 3500x3500 40-60
200-300 128GB+ 16+ cores 4.2+ GHz 4500x4500 20-40

Essential Configuration Settings

server.cfg Performance Tuning

// Performance Settings
server.tickrate 30          // Standard tick rate (30 ticks/second)
server.saveinterval 600      // Save every 10 minutes (not too frequent)
server.maxplayers 50        // Match your hardware capabilities

AI and Population Settings

// AI Optimization
ai.horde.population 1.0       // AI horde population multiplier
ai.npc_a_d_spawn_rate 1.0     // NPC spawn rate
ai.nav_mesh_update_rate 20       // Navigation mesh update rate (higher = less frequent)
animal.population 1.0            // Animal population multiplier

Entity Limits

// Entity Optimization
entitylimit 100000              // Total entity limit
entitylimit.server 500000        // Server entity cap
nav_mesh.max_updates 200         // Nav mesh updates per tick
ai.pathfinding_threads 2         // Number of pathfinding threads

Advanced Performance Tuning

Network Optimization

// Network Settings
server.port 28015
server.queryport 28016
server.tickrate 30
net.packetsize 1000          // Packet size (1000-2000)
net.sleeptime 10             // Network sleep time in milliseconds

Rendering & Visuals

// Client-side Optimization (for server to tell clients)
env.time 0.5                // Force daytime (reduces lighting calculations)
env.clouds 0                // Disable clouds
env.fog 0                  // Disable fog
env.rain 0                 // Disable rain
env.snow 0                 // Disable snow

Decay Optimization

// Decay Settings
decay.upkeep "true"          // Decay enabled
decay.scale 1.0              // Normal decay rate
decay.brick.scale 1.0        // Stone decay rate
decay.toptier.scale 1.0      // High-tier decay rate
corpse.duration 300          // Corpse despawn time (seconds)

Pro Tip: Reduce entity limits and AI population if experiencing CPU bottlenecks. Monitor server FPS using debug.stats command.

Rust-Specific Optimizations

Reduce Unnecessary Features

// Reduce Processing Load
server.radiation "true"      // Radiation enabled (can disable if not needed)
bracket.peacefulmode 1      // Peaceful mode (reduces bracket spawns)
bracket.time 60              // Time between brackets (increase to reduce CPU)

Optimize for Player Count

Adjust settings based on your typical player count:

Setting Low Pop (<20) Medium Pop (20-50) High Pop (50+)
AI Population 1.5 1.0 0.5
Animal Population 1.5 1.0 0.5
Entity Limit 150,000 100,000 75,000
Save Interval 900s 600s 300s

Operating System Optimization

Windows Server Optimization

  • Power Plan: Set to "High Performance" or "Ultimate Performance"
  • Game Mode: Enable Windows Game Mode
  • Core Parking: Disable CPU core parking using "ParkControl"
  • Background Apps: Close unnecessary services and applications
  • Windows Search: Disable indexing on server drive
  • Superfetch/SysMain: Disable Superfetch/SysMain service

Linux Server Optimization

  • CPU Governor: Set to "performance" mode
  • Kernel Parameters: Add isolcpus=2,4,6,8 for dedicated cores
  • Swap: Ensure adequate swap space (1.5x RAM)
  • File System: Use ext4 or XFS for server directory
  • Background Services: Disable unnecessary daemons
  • Network Tuning: Optimize TCP settings for game traffic

Network Performance

Bandwidth Requirements

Players Minimum Bandwidth Recommended Bandwidth Bandwidth per Player
10 5 Mbps 10 Mbps 1 Mbps
50 25 Mbps 50 Mbps 1 Mbps
100 50 Mbps 100 Mbps 1 Mbps
200 100 Mbps 200 Mbps 1 Mbps

Network Optimization Techniques

  • Low Latency Connection: Use datacenter with low latency to target players
  • QoS Configuration: Prioritize Rust traffic on router
  • Disable Nagle's Algorithm: Reduce TCP latency
  • MTU Settings: Optimize MTU for better packet handling
  • DDoS Protection: Use DDoS protection services

Monitoring Server Performance

Essential Monitoring Commands

debug.stats                // Detailed server statistics
debug.network              // Network performance
debug.decay               // Decay system status
ai.nav_mesh_update_rate    // Check navigation updates
entitylimit                // Check entity counts

Key Metrics to Watch

Metric Healthy Range Action Required
Server FPS 60+ Below 30: Optimize settings
Tick Rate 30 (standard) Below 20: Reduce AI/entities
Entity Count Under limit Near limit: Clean up entities
Network Latency <100ms High: Check network connection
CPU Usage 60-80% Consistently 90%+: Upgrade CPU

Plugin and Mod Optimization

Choosing Performance-Friendly Plugins

  • Avoid Heavy Plugins: Some plugins like "Economics" can be resource-intensive
  • Optimize Database: Use SQLite for small servers, MySQL for large ones
  • Regular Cleanup: Use plugins that clean up old data
  • Limit Hooks: Choose plugins with minimal hook usage
  • Async Processing: Prefer plugins that use async operations

Plugin-Specific Optimization

// Common plugin settings
// Example: Decay plugin
Decay.enabled "true"
Decay.scale 1.0
Decy.check_interval 60  // Check every 60 seconds instead of 30

Storage and I/O Optimization

Disk Requirements

  • SSD Recommended: Use SSDs for Rust server directory
  • Separate Drives: If possible, separate OS and Rust on different drives
  • Adequate Space: Reserve 50+ GB for world saves and logs
  • Regular Cleanup: Delete old backups and log files

Save Optimization

  • Save Interval: Adjust based on player count (higher for more players)
  • Backup Strategy: Daily backups with retention of 7 days
  • Compression: Compress backups to save disk space
  • Off-site Backups: Store backups on separate server/cloud

Troubleshooting Performance Issues

Symptom Cause Solution
Low server FPS CPU bottleneck, too many entities Reduce AI population, lower entity limit
High latency for all players Network issues, insufficient bandwidth Check network connection, upgrade bandwidth
Stuttering and rubber-banding Tick rate drops, AI lag Reduce AI spawns, check tick rate
Long load times Disk I/O bottleneck, large save files Use SSD, reduce save interval
Memory leaks (RAM usage increases) Buggy plugins, entity accumulation Restart server, identify problematic plugins
Lag spikes every few seconds Saving, decay calculations Adjust save interval, reduce decay frequency

Regular Maintenance

Daily Tasks

  • Monitor server FPS and tick rate
  • Check entity counts
  • Review player complaints about lag
  • Check for plugin errors in logs

Weekly Tasks

  • Review and optimize entity cleanup
  • Check plugin performance impact
  • Verify backups are completing successfully
  • Analyze performance metrics trends

Monthly Tasks

  • Review overall server performance
  • Clean up old backups and logs
  • Evaluate hardware upgrades
  • Consider server wipe if performance degraded

Best Practices

  • Start Conservative: Begin with conservative settings and increase gradually
  • Monitor Constantly: Use performance monitoring tools
  • Test Changes: Apply changes on test server first
  • Document Settings: Keep track of what works
  • Regular Restarts: Restart server daily to clear memory
  • Community Feedback: Listen to player feedback about performance

Get optimal Rust server performance. Host your Rust server with Supercraft for enterprise-grade infrastructure and optimized performance.

Top