Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Sync + Server thread hitch starting with artifact 8096 #2557

Open
manzarek123 opened this issue May 22, 2024 · 8 comments
Open

Sync + Server thread hitch starting with artifact 8096 #2557

manzarek123 opened this issue May 22, 2024 · 8 comments
Labels
bug triage Needs a preliminary assessment to determine the urgency and required action

Comments

@manzarek123
Copy link
Contributor

manzarek123 commented May 22, 2024

What happened?

Starting with artifact 8096, every time a new player is connecting to the server there is a sync + server thread hitch.
This happens at high player count and every time a new player is connecting to the server.
People are complaining of more lags but is is probably because there are lots of new players connecting all the time.

This started with build 8096, I have tested the following builds:
7900 ok
8075 ok
8085 ok
8096 not ok
8139 not ok
8181 not ok

Let me know if I can help to provide more info

[ script:bay_queue] [Queue] Allowed jeuke from VIP Queue (size: 2)
[ citizen-server-impl] sync thread hitch warning: timer interval of 185 milliseconds
[ citizen-server-impl] server thread hitch warning: timer interval of 195 milliseconds

script:bay_queue] [Queue] Allowed Satoshi (Fr) from VIP Queue (size: 1)
[ citizen-server-impl] server thread hitch warning: timer interval of 171 milliseconds
[ citizen-server-impl] sync thread hitch warning: timer interval of 109 milliseconds

[ script:bay_queue] [Queue] Allowed ogu from Queue (size: 43)
[ citizen-server-impl] server thread hitch warning: timer interval of 195 milliseconds
[ citizen-server-impl] sync thread hitch warning: timer interval of 215 milliseconds

Expected result

No sync and server thread hitch

Reproduction steps

  1. Have a server wiith arctifact 8096
  2. Connect to the server

Importancy

Slight inconvenience

Area(s)

FXServer

Specific version(s)

Server 8096

Additional information

No response

@manzarek123 manzarek123 added bug triage Needs a preliminary assessment to determine the urgency and required action labels May 22, 2024
@gottfriedleibniz
Copy link
Contributor

gottfriedleibniz commented May 22, 2024

Would it be possible to get a ETW Trace? May be possible that reverting Lua back to use the systems allocator is causing a bit of lock contention.

@manzarek123
Copy link
Contributor Author

I will update to 8096 this afternoon and make the trace this evening !

@manzarek123
Copy link
Contributor Author

@gottfriedleibniz
Copy link
Contributor

Thanks. Seems to be the case: garbage collection step deallocating ~800 objects and this is contending with some other threads. The Windows allocator is pretty slow in general so Lua's custom allocator was probably carrying a lot of weight.

This trace showed a few areas where heap interactions can be reduced/optimized. Hopefully I'll be able to get to this sooner rather than later.

@Korioz
Copy link
Contributor

Korioz commented Jun 7, 2024

Up, this affects a lot of servers, we cannot update to newer builds because of those massive hitches, this cause our players to see this misleading "Server artifact version is outdated" message.

image

prikolium-cfx pushed a commit that referenced this issue Jun 7, 2024
@gottfriedleibniz
Copy link
Contributor

Would it be possible to test artifact 8450. If you are still running into issues, would it be possible to send another ETW trace?

There's still some heap contention between the other threads that needs to be optimized.

@manzarek123
Copy link
Contributor Author

Sure, I'll update now and report this evening when player count is high

@manzarek123
Copy link
Contributor Author

there are no issues with build 8450

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug triage Needs a preliminary assessment to determine the urgency and required action
Projects
None yet
Development

No branches or pull requests

3 participants