mtasa-blue icon indicating copy to clipboard operation
mtasa-blue copied to clipboard

Server lag with +600 players on Linux x64 Nightly build (v24068)

Open realArshin opened this issue 7 months ago • 18 comments

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.

realArshin avatar Apr 28 '26 20:04 realArshin

You should check the performance browser 'server info' tab.

ArranTuna avatar Apr 29 '26 17:04 ArranTuna

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.

realArshin avatar Apr 30 '26 08:04 realArshin

Image

So this number in brackets is very low like 10?

ArranTuna avatar Apr 30 '26 12:04 ArranTuna

Did you try to modify sleep times? Or already modified? busy_sleep_time - 0 idle_sleep_time - 10

Xenius97 avatar Apr 30 '26 16:04 Xenius97

Image 30% CPU usage on 800 players but server lag

realArshin avatar Apr 30 '26 18:04 realArshin

Why did you hide the CPU usage stats?

ArranTuna avatar Apr 30 '26 18:04 ArranTuna

Image I thought there was no need

realArshin avatar Apr 30 '26 18:04 realArshin

Lowering idle_sleep_time to 0ms would help.

ArranTuna avatar Apr 30 '26 18:04 ArranTuna

Does the Busy sleep time not change?

realArshin avatar Apr 30 '26 18:04 realArshin

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.

ArranTuna avatar Apr 30 '26 19:04 ArranTuna

busy_sleep_time = 0 idle_sleep_time = 10 Right?

realArshin avatar Apr 30 '26 19:04 realArshin

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.

ArranTuna avatar Apr 30 '26 19:04 ArranTuna

Image The changes you mentioned improved the situation, but it wasn't ideal. Can you also check the sync settings?

realArshin avatar Apr 30 '26 19:04 realArshin

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.

ArranTuna avatar Apr 30 '26 19:04 ArranTuna

On Linux build 23312 I had no problems, even with 1000 players, but newer builds have lag and slowness issues.

realArshin avatar Apr 30 '26 19:04 realArshin

Is this fixed in newer versions? (Since a fix was merged)

ArranTuna avatar Jul 28 '26 14:07 ArranTuna

Is this fixed in newer versions? (Since a fix was merged)

I tested on build 24126 with 650 players and there were no problems.

realArshin avatar Jul 30 '26 21:07 realArshin

Thanks for the feedback I will mark it as fixed by Zephkek's PR.

ArranTuna avatar Jul 31 '26 07:07 ArranTuna