Understanding MaxTickRate and NetServerMaxTickRate
In this post, we'll go over the differences between MaxTickRate (Server Tick Rate) and NetServerMaxTickRate (Network Tick Rate), their impacts, and when to adjust them.
1. MaxTickRate (Server Tick Rate)
The **tick rate** determines how frequently the server processes game updates (known as "ticks") per second. This value is measured in **Hertz (Hz)**, which corresponds to the number of ticks per second.
Code:
[/Script/Engine.GameNetworkManager]
MaxTickRate=30
- Default Value: 30 Hz (ticks per second)
- Impact:
- **Higher tick rate** (e.g., 60 or 120): The server processes data more frequently, leading to smoother gameplay and more precise hit registration. However, this increases CPU load and bandwidth usage.
- **Lower tick rate** (e.g., 20): Reduces server load but can make the game feel less responsive, and player actions may appear delayed.
In general, **30 ticks per second** is a standard rate to balance performance and gameplay quality. Increasing the tick rate can enhance gameplay but requires more server resources.
Use Cases:
- High-performance servers: Servers with fast CPUs and ample bandwidth can use higher tick rates (e.g., 60 Hz) for better real-time interactions.
- Low-resource or large-scale servers: Servers hosting many players or operating on low-end hardware may lower the tick rate to reduce resource usage and maintain stability.
2. NetServerMaxTickRate (Network Tick Rate)
The **NetServerMaxTickRate** controls how frequently the server sends updates to connected clients over the network. It governs the flow of network data and works alongside the server's tick rate.
Code:
[/Script/Engine.Player]
NetServerMaxTickRate=30
- Default Value: 30 Hz
- Impact:
- **Higher network tick rate**: The server sends updates to clients more frequently, improving responsiveness and reducing lag, but increasing bandwidth usage.
- **Lower network tick rate**: Reduces bandwidth usage but can make the game feel less responsive, with occasional desynchronization between the client and server.
While MaxTickRate governs how frequently the game world updates internally, NetServerMaxTickRate affects how often those updates are communicated to players.
Use Cases:
- Competitive environments: For low-latency gaming, increasing NetServerMaxTickRate improves responsiveness by reducing delays between player inputs and server updates.
- Limited bandwidth environments: If the server or players are on limited bandwidth, lowering NetServerMaxTickRate can reduce network strain without heavily affecting gameplay.
Differences Between MaxTickRate and NetServerMaxTickRate
- MaxTickRate: Controls how frequently the server processes game updates internally.- NetServerMaxTickRate: Controls how often those updates are sent to players over the network.
Performance Considerations
- CPU Load: Increasing MaxTickRate will raise CPU usage, as the server processes updates more frequently.- Bandwidth: Increasing NetServerMaxTickRate will increase bandwidth usage due to more frequent updates sent to players.
- Latency and Responsiveness: Higher tick rates and network tick rates generally improve responsiveness and synchronization but require stronger hardware and network capabilities.
Recommendations
- Small, fast-paced servers: Set both MaxTickRate and NetServerMaxTickRate to 60 for better responsiveness.- Large-scale servers: Stick to the default of 30 or reduce to 20 if server resources or bandwidth are limited.
If you have any further questions or care to discuss this further please feel free to comment below in our comments section.