Server lag with +600 players on Linux x64 Nightly build (v24068)
Describe the bug
I am experiencing server performance degradation (lag, delay, desync) on my Linux server when the player count exceeds 600. The issue occurs only when using the latest Nightly build (version 24068) for x64 Linux.
When switching back to the official stable release downloaded from linux.multitheftauto.com, the same server hardware handles 600+ players smoothly without any lag.
Steps to reproduce
Setup a Linux x64 server with the Nightly build (v24068).
Reach a player count of approximately 600 or more players.
Monitor server performance and in-game delay.
Version
Server: v1.6.0-9.24068.0 (Linux 64-bit)
Additional context
No response
Relevant log output
Security Policy
- [x] I have read and understood the Security Policy and this issue is not security related.
You should check the performance browser 'server info' tab.
You should check the performance browser 'server info' tab.
I checked and the usage of all CPU cores was no more than 40% and there wasn't even a spike. Everything was normal, but the server and chats were very slow.
So this number in brackets is very low like 10?
Did you try to modify sleep times? Or already modified? busy_sleep_time - 0 idle_sleep_time - 10
30% CPU usage on 800 players but server lag
Why did you hide the CPU usage stats?
I thought there was no need
Lowering idle_sleep_time to 0ms would help.
Does the Busy sleep time not change?
Oh yeah sorry I meant busy, basically if busy_sleep_time is 20ms, you're losing 20ms between every frame, lowering that to 0 may fix your issue.
busy_sleep_time = 0 idle_sleep_time = 10 Right?
Right. I reckon that there's no bug from updating the server, unless you have constant logging of performance stats and it clearly increased after the update.
The changes you mentioned improved the situation, but it wasn't ideal. Can you also check the sync settings?
Those are as efficient as can be. What concerns me is your packet loss, is it normal for it to be that high? If not, that might be what causes the lag because MTA starts to act really weird / slow when there's any packet loss. That packet loss might not be caused by MTA, it could be network interface card dropping packets, or outside of your server.
If this issue only happens with high player count it could be your system struggling to keep up with the packets, hitting your bandwidth limit, or some other kind of limitation.
On Linux build 23312 I had no problems, even with 1000 players, but newer builds have lag and slowness issues.
Is this fixed in newer versions? (Since a fix was merged)
Is this fixed in newer versions? (Since a fix was merged)
I tested on build 24126 with 650 players and there were no problems.
Thanks for the feedback I will mark it as fixed by Zephkek's PR.