Many Valheim server administrators encounter a baffling paradox: a high-spec Linux dedicated server equipped with a rapid multi-core CPU and gigabit connectivity begins stuttering uncontrollably whenever several players congregate in a shared base compound. Chests take multiple seconds to register interactions, hostile creatures rubberband across fields, and building hammer animations freeze. The underlying cause lies in Valheim's hybrid Unity networking architecture, hardcoded data rate ceilings, and the accumulation of hundreds of thousands of unpruned zDO objects.
This guide breaks down Valheim's zone networking model, explains how to elevate the client send data rate ceiling, prunes redundant zDO instances, and optimizes Linux kernel network buffers for peak server throughput.
Understanding Zone Networking and zDO Architecture in Valheim#
Valheim distributes world physics calculations across connecting clients. The dedicated server does not centrally compute physics for the entire world. Instead, the first client to enter a discrete 64×64 meter sector is designated as the Area Host (Zone Master), calculating local physics and synchronizing deltas back through the server to peers.
Every interactive world component is stored as a zDO (Zone Data Object):
- Every structural timber, stone foundation, and roof tile;
- Terraforming modifications (flattened terrain and mined trenches);
- Loose resource drops (stones, wood, resin) left on the surface;
- Tamed livestock and roaming enemy mobs.
When a fortified viking base expands beyond 15,000 to 25,000 active instances, the serialized zDO payload required during zone entry easily overflows legacy server socket buffers.
Raising the Client Send Data Rate Ceiling#
Historically, the compiled game code in assembly_valheim.dll enforced an artificial bandwidth ceiling: a meager 64 KB/s per client (dataRate = 64 * 1024). When opening container inventories or loading dense architecture, this narrow pipe saturated instantly, causing massive packet queues, desynchronization, and perceived server lag.
On modern dedicated server installations, this ceiling can be raised via performance plugins or BepInEx environment mods.
Deploy the BepInEx framework to your dedicated Valheim server directory:
cd /opt/valheim
wget https://github.com/Valheim-Modding/Valheim-Server-Linux-Docker/releases/latest/download/bepinex.tar.gz
tar -xzf bepinex.tar.gz -C /opt/valheim/
Configure the network throughput parameters inside /opt/valheim/BepInEx/config/org.bepinex.plugins.valheim_data_rate.cfg:
[Network]
## Sets the socket data rate in bytes per second (default was 64KB/s)
DataRate = 1048576
## Sets the maximum client queue size
ClientSendQueueSize = 2048
Setting DataRate = 1048576 (1 MB/s) removes the legacy throughput ceiling, allowing players to synchronize massive structural compounds instantaneously.
Instance Budgeting and Pruning Abandoned World Drops#
To evaluate instance load in-game, press F2 to display the diagnostic HUD and inspect the Instances counter:
- Under 8,000 instances: Optimal performance, consistent 60+ FPS.
- 8,000 to 15,000 instances: Moderate load, minor micro-stutter when traversing zones.
- Above 20,000 instances: Heavy settlement, significant client FPS drops.
A major contributor to runaway zDO counts is abandoned debris (stones, wood chips, and resin) generated during quarrying and logging that persists indefinitely near workbenches.
Issue periodic ground-clearing commands via RCON or cron automation:
# Force garbage collection and prune unreferenced world objects
valheim-cli rcon "removedrops"
The removedrops command deletes loose ground clutter without affecting storage chests or player inventories, immediately recovering thousands of orphaned zDO objects.
Through a modern server management panel, automatic entity cleanup schedules and network buffer optimizations run without manual console intervention.
CPU Frequency Scaling and Linux Kernel UDP Tuning#
The Valheim server daemon executes network serialization predominantly on a single primary core. Ensure the Linux CPU governor enforces maximum clock frequencies:
echo performance | sudo tee /sys/devices/system/cpu/cpu*/cpufreq/scaling_governor
Tune Linux UDP socket buffer limits in /etc/sysctl.d/99-valheim-performance.conf:
net.core.rmem_max = 16777216
net.core.wmem_max = 16777216
net.core.rmem_default = 1048576
net.core.wmem_default = 1048576
Apply the updated kernel parameters immediately:
sudo sysctl --system
Monitoring Sockets and Final Verification#
Restart the server unit to load the updated network buffers:
sudo systemctl restart valheim
sudo journalctl -u valheim -n 30 --no-pager | grep -i "network"
Verify active UDP listening sockets:
sudo ss -ulnp | grep 2456
With DataRate elevated to 1 MB/s and underlying kernel UDP buffers expanded, complex settlements and multi-player construction projects operate smoothly without chest lag or desynchronization.




