> ## Documentation Index
> Fetch the complete documentation index at: https://docs.wasabihosting.com/llms.txt
> Use this file to discover all available pages before exploring further.

# Unturned Server Optimization Guide

> How to optimize your Unturned server for better performance

# Introduction to Unturned Server Optimization

Optimizing your Unturned server is crucial for providing a smooth gameplay experience for your players. This guide covers various techniques to improve your server's performance on Wasabi Hosting's Gamepanel platform.

## Hardware Considerations

<Accordion title="Recommended Hardware Specifications">
  | Server Size | RAM  | CPU      | Storage   | Player Count     |
  | ----------- | ---- | -------- | --------- | ---------------- |
  | Small       | 4GB  | 2 Cores  | 10GB SSD  | Up to 16 players |
  | Medium      | 6GB  | 3 Cores  | 15GB SSD  | Up to 24 players |
  | Large       | 8GB+ | 4+ Cores | 20GB+ SSD | 24+ players      |
</Accordion>

<Info>
  Unturned is CPU intensive, especially when handling vehicle physics and large numbers of zombies. Prioritize CPU performance over RAM in most cases. Wasabi Hosting offers optimized plans specifically designed for Unturned servers.
</Info>

## Config File Optimization

Unturned servers have several configuration files that can be tuned for better performance.

### Commands.dat Optimization

The `Commands.dat` file in your `/Servers/YourServerName/` directory contains essential startup commands. Here are recommended values for better performance:

```
// Performance Settings
Log 3                  // Reduced logging (0-7, higher = more logs)
Framerate 30           // Server tick rate (30 is optimal for balance)
Timeout 120            // Time until inactive players are kicked
Tick_Delay 0.015       // Delay between ticks (lower = more CPU usage)
Max_Ping 1250          // Maximum allowed ping
Max_Packets_Per_Second 800  // Limit packets to prevent flooding
```

<Warning>
  Setting the Framerate higher than 30 significantly increases CPU usage with minimal gameplay benefits.
</Warning>

### Server Configuration

Edit your server's `Config.json` file (`/Servers/YourServerName/Server/Config.json`) with these optimized settings:

```json theme={null}
{
  "Browser": {
    "Broadcast": true,
    "Password": false,
    "Port": 27015
  },
  "Gameplay": {
    "Allow_Shoulder_Camera": true,
    "Anti_Cheat": {
      "Allow_Battleye_Client": true,
      "Kicks_Per_Minute_Threshold": 10,
      "Max_Flagged_Packets_Before_Kick": 30,
      "Max_Invalid_Character_Packets_Before_Kick": 20,
      "Max_Invalid_Vehicle_Packets_Before_Kick": 10,
      "Max_Ping": 1250,
      "Max_Successful_Teleports_Before_Kick": 5,
      "Max_Unsuccessful_Teleports_Before_Kick": 5,
      "Max_Vehicle_Distance_Before_Kick": 60,
      "Max_Walk_Speed": 15
    },
    "Assault_Rifle_Burst_Shots_Per_Second": 7.5,
    "Auto_Save_Interval_Seconds": 900,
    "Allow_Workshop_Items": true,
    "Bleeding_Damage": 5,
    "Broken_Legs_Damage": 10,
    "Bullets_Hurt_Barricades": true,
    "Bullets_Hurt_Plants": true,
    "Bypass_Buildable_Restrictions": false,
    "Decay_Time": 604800,
    "Decay_Vehicles": true,
    "Fall_Damage": true,
    "Food_Decrease_Multiplier": 1.0,
    "Gravity_Multiplier": 1.0,
    "Group_Limit": 0,
    "Hair_Grow_Time": 259200,
    "Item_Despawn_Seconds": 600,
    "Weapon_Jam_Quality_Threshold": 10,
    "Max_Items_Per_Container": 40,
    "Max_Items_Spawn": 128,
    "Max_Barrel_Drops": 5,
    "Max_Zombies_Spawned": 96,
    "Max_Animals_Spawned": 24,
    "Zombie_Spawn_Interval": 10,
    "Player_Height_Threshold": 12,
    "Player_Stance_Samples": 32,
    "Player_Sprinting_Grace": 0.75
  },
  "Login": {
    "Timeout_Queue": 60,
    "Timeout_Linking": 30,
    "Queue_Size": 10
  }
}
```

<Tip>
  Adjust `Max_Zombies_Spawned` and `Max_Animals_Spawned` based on your server's performance. Lower values improve performance but reduce game difficulty.
</Tip>

## Config.json Optimization

Optimize your Unturned server startup parameters in the Gamepanel:

```
+InternetServer/YourServerName -Port=27015 -Secure -Framerate=30 -Rolling=Minute -PVP -No-Streaming -NoWorkshopExplicitLoading
```

### Key Parameter Explanations

| Parameter                      | Description                    | Recommended Value                        |
| ------------------------------ | ------------------------------ | ---------------------------------------- |
| **-Framerate**                 | Server tick rate               | 30 (optimal balance)                     |
| **-Rolling**                   | Save interval                  | Minute (prevents data loss)              |
| **-No-Streaming**              | Reduces map streaming overhead | Enabled for better performance           |
| **-NoWorkshopExplicitLoading** | More efficient mod loading     | Enabled for better startup times         |
| **-LogLevel**                  | Detail level of logging        | 1 or 2 (higher values increase overhead) |

<Warning>
  Using `-LogRcon` can create large log files. You can schedule log cleanup tasks to prevent this.
</Warning>

## Scheduled Tasks

Set up these scheduled tasks:

```
// Add to your Gamepanel scheduler
// Clean server every 6 hours
0 */6 * * * say "Server restart in 10 minutes!"
10 */6 * * * save
10 */6 * * * shutdown 60
```

<Info>
  You can automate these maintenance tasks using the Gamepanel scheduler feature.
</Info>

## Map Selection

The map you choose significantly impacts server performance:

<Accordion title="Map Performance Comparison">
  | Map                 | Size   | Performance Impact | Notes                                               |
  | ------------------- | ------ | ------------------ | --------------------------------------------------- |
  | **PEI**             | Small  | Low                | Best performance, good for small servers            |
  | **Washington**      | Medium | Medium             | Balanced option for most servers                    |
  | **Russia**          | Large  | High               | Demands more resources, better for powerful servers |
  | **Germany**         | Medium | Medium-High        | Detailed environment with moderate impact           |
  | **Yukon**           | Medium | Medium             | Snow effects can impact performance                 |
  | **Hawaii**          | Medium | Medium             | Water effects add some overhead                     |
  | **France**          | Medium | Medium             | Balanced performance                                |
  | **Carpat**          | Large  | High               | Resource-intensive due to size and detail           |
  | **Cyprus Survival** | Small  | Low                | Good performance for small servers                  |
  | **Kuwait**          | Medium | Medium             | Balanced performance                                |
  | **Greece**          | Medium | Medium             | Balanced performance                                |
  | **Custom Maps**     | Varies | Varies             | Depend on map design; more objects = higher impact  |
</Accordion>

<Warning>
  Large, detailed maps with many objects will significantly impact server performance, especially with higher player counts.
</Warning>

## Workshop Mods Optimization

Mods can significantly impact server performance:

1. **Limit total workshop items** - Each mod increases memory usage and startup time
2. **Avoid redundant mods** - Multiple mods with similar functions waste resources
3. **Choose optimized mods** - Some mods are better coded than others
4. **Update mods regularly** - Outdated mods may have unpatched performance issues

<Accordion title="High-Impact Mod Categories">
  | Mod Type                              | Performance Impact | Notes                                 |
  | ------------------------------------- | ------------------ | ------------------------------------- |
  | **Vehicle Mods**                      | High               | Complex physics calculations          |
  | **Weapon Mods with Many Attachments** | High               | Inventory and attachment calculations |
  | **Custom Zombie Mods**                | High               | Additional AI calculations            |
  | **Economy/Shop Systems**              | Medium             | Database operations                   |
  | **Custom Building Mods**              | Medium             | Additional building physics           |
  | **UI Mods**                           | Low-Medium         | Minor client-side impact              |
  | **Cosmetic Mods**                     | Low                | Minimal server impact                 |
</Accordion>

## Database Optimization

If your server uses MySQL for plugins or economy:

1. **Use connection pooling** to reduce database overhead
2. **Index frequently queried fields** for faster lookups
3. **Schedule regular database maintenance** to prevent bloat
4. **Use SSD storage** for database files

## Zombie and Item Spawn Management

Adjust these settings in your `Config.json` file for better performance:

```json theme={null}
"Max_Items_Spawn": 96,
"Max_Barrel_Drops": 4,
"Max_Zombies_Spawned": 64,
"Max_Animals_Spawned": 16,
"Zombie_Spawn_Interval": 15,
```

<Tip>
  Reducing the number of simultaneously spawned zombies and items dramatically improves server performance, especially on large maps or with many players.
</Tip>

## Vehicle Optimization

Vehicles are one of the most resource-intensive aspects of Unturned servers:

1. **Limit total vehicles** - Set reasonable vehicle spawns in your map configuration
2. **Clear unused vehicles** regularly
3. **Use the vehicle decay option** to automatically remove abandoned vehicles:
   ```json theme={null}
   "Decay_Vehicles": true,
   "Decay_Time": 604800,
   ```
4. **Use plugins** to limit vehicle spawning or automatically despawn unused vehicles

## Server Maintenance Routines

Implement these maintenance routines for optimal performance:

1. **Scheduled restarts** every 6-12 hours:
   ```
   // Add to your Gamepanel scheduler
   restart
   ```

2. **Regular map resets** (every 1-4 weeks depending on your server type)

3. **Clear items** periodically:
   ```
   // Console command
   clean
   ```

4. **Implement automatic backup** before maintenance tasks

5. **Monitor resource usage** to identify performance trends

<Info>
  You can automate these maintenance tasks using the Gamepanel scheduler feature.
</Info>

## BattlEye Configuration

BattlEye anti-cheat can impact performance. Optimize its settings in `BattlEye/Config/BEServer.cfg`:

```
RConPort 2310
RestrictRCon 0
MaxPing 1000
MinFrametime 0.030
MaxPacketsize 1024
MinPacketLoss 0.0
MaxPacketLoss 0.2
MinPktRate 80
MinPktRateOnJoin 20
PacketFlood 2000
```

## Plugin and Rocket Optimization

If using Rocket mod for plugins:

1. **Limit the number of plugins** - Each plugin increases overhead
2. **Choose lightweight alternatives** where possible
3. **Disable unnecessary plugin features** in configuration files
4. **Update all plugins** to their latest versions
5. **Monitor plugin performance** using timing tools

<Warning>
  Some popular Rocket plugins like Economy, Jobs, and extensive permission systems can significantly impact performance.
</Warning>

## Network Optimization

1. **DDoS protection** - Use our built-in firewall or a service like Cloudflare
2. **Optimize packet handling**:
   ```
   Max_Packets_Per_Second 800
   Max_Ping 1250
   ```
3. **Configure connection timeouts**:
   ```
   "Timeout_Queue": 60,
   "Timeout_Linking": 30
   ```

## Advanced Performance Tuning

For experienced administrators on Wasabi Hosting servers:

1. **Linux kernel tuning** (if using a Linux-based server):
   ```
   sudo sysctl -w net.ipv4.tcp_keepalive_time=60
   sudo sysctl -w net.ipv4.tcp_keepalive_intvl=10
   sudo sysctl -w net.ipv4.tcp_keepalive_probes=6
   sudo sysctl -w net.core.somaxconn=4096
   ```

2. **Process priority adjustment**:
   ```
   // In your Wasabi Hosting Gamepanel startup script
   nice -n -10 ./Unturned.x86_64
   ```

3. **Memory allocation optimization** in your Gamepanel startup:
   ```
   export MALLOC_ARENA_MAX=2
   ```

## Troubleshooting Common Performance Issues

<Accordion title="Low TPS (Ticks Per Second)">
  **Symptoms**: Server lag, delayed interactions, rubber-banding

  **Causes & Solutions**:

  1. **Too many zombies** - Reduce `Max_Zombies_Spawned`
  2. **Too many vehicles** - Implement vehicle cleanup
  3. **Excessive items** - Reduce `Max_Items_Spawn` and run regular cleanups
  4. **Map complexity** - Consider switching to a less complex map
  5. **CPU limitations** - Upgrade your hosting plan
</Accordion>

<Accordion title="High Memory Usage">
  **Symptoms**: Server crashes, out of memory errors

  **Causes & Solutions**:

  1. **Too many mods** - Reduce workshop items
  2. **Memory leaks** - Schedule regular restarts
  3. **Large map with many objects** - Consider a smaller map
  4. **Too many players** - Limit max players or upgrade hosting
  5. **Database growth** - Implement database maintenance
</Accordion>

<Accordion title="Slow Server Startup">
  **Symptoms**: Long startup times, timeout on join during startup

  **Causes & Solutions**:

  1. **Too many workshop items** - Reduce mod count
  2. **Large maps** - Consider smaller maps
  3. **Workshop download issues** - Use `-NoWorkshopExplicitLoading`
  4. **Disk I/O limitations** - Upgrade to SSD storage
</Accordion>

## Monitoring Your Server

Monitor your server's performance using:

1. **Wasabi Hosting's Gamepanel Console** - Check for error messages and warnings
2. **Resource Usage Graphs** in Gamepanel
3. **Server logs** in `/Servers/YourServerName/Logs/`
4. **In-game commands**:
   ```
   /info     // Shows server stats
   /ping     // Shows connection quality
   /tps      // Shows current TPS (if using TPS monitor plugin)
   ```

By implementing these optimization techniques, you should see a significant improvement in your Unturned server's performance on Wasabi Hosting. If you continue to experience issues, contact our support team for assistance.

<Card title="Get your own Unturned server" icon="rocket" href="https://wasabihosting.com/game-servers/unturned">
  Deploy a DDoS-protected Unturned server on AMD Ryzen hardware in about two minutes, and plans start at €7.49/month.
</Card>
