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

[Performance] Have World Send Smarter Guild Updates #4796

Open
wants to merge 2 commits into
base: master
Choose a base branch
from

Conversation

Akkadius
Copy link
Member

Description

This is a performance adjustment for World where 3k players and 1,800 zoneservers showed strain on World. A grand majority of the CPU load (98%) this was shown to be TCP chatter (server to server).

I ran S<->S packet logging in world and found the following data. This change will be one of several found from these results. https://gist.github.com/Akkadius/12b57fadbbe21ea9a46b854c62cc3a65#file-world-s2s-1m-md


For this PR, this addresses a lot of places where we blast packets to all zoneservers regardless if the zone needs it or not. This is not free especially at the scale of THJ. World is absolutely getting crushed having to allocate memory to send packets to X zoneservers (in this case lets say 1,800) when only say a dozen care about the packet at all.

We need to be smarter about how we relay packets because it adds up tremendously

Type of change

  • Optimization

Testing

Tested basic guild updates, create guild, zoning, adding, deleting

I added debugging in my packet sending function which only grabs zone server's that have clients with the interested Guild ID attached.

Zone 1
Zone 2
Sending packet to zone server_id 1
Sending packet to zone server_id 2
Zone 1
Zone 2
Sending packet to zone server_id 1
Sending packet to zone server_id 2

Checklist

  • I have tested my changes
  • I have performed a self-review of my code. Ensuring variables, functions and methods are named in a human-readable way, comments are added only where naming of variables, functions and methods can't give enough context.
  • I own the changes of my code and take responsibility for the potential issues that occur

@Akkadius Akkadius requested a review from neckkola March 22, 2025 08:22
@Akkadius
Copy link
Member Author

I'd like @neckkola to take a look at this one and make sure we are safe for all of the packet types to do this with. I am hoping he can run it through his testing as well.

Copy link
Contributor

@neckkola neckkola left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Don't see anything that should cause problems.

@neckkola
Copy link
Contributor

THJ are experiencing some issues that have been traced to this PR. I can reproduce and will look at updating before this gets merged.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants