Skip to content

[Bug] Extreme Netty bottleneck in high playercount Folia server #661

@codeHusky

Description

@codeHusky

Bug Description:

In high player count environments, servers with Carbon will begin to "run behind" on packets for players. This will cause lag spikes, eventually high latencies (multi second latencies), followed by Timed Out disconnects in large waves. Profiling indicates that Component related serialization becomes a huge bottleneck when using Carbon. Removing Carbon allowed an increase from 250 players with instability, to over 450 players without rubber banding / latency issues / instability.

What is not working as it should?

Carbon's components seem to be extremely complex, resulting in network thread bottlenecking

Steps to reproduce:

  1. Install Carbon on a Folia server
  2. Load up a server with bot players (300 as demonstrated in real world)
  3. Have players continuously send messages at a normal rate (a few every second, not a flood)
  4. Observe the explained behavior

System Details:

  1. Server Type: Folia on AMD EPYC 4584PX @ 5.7GHz
  2. Server Software: Folia 1.21.4 (Private Fork)
  3. MC Version: 1.21.4
  4. Carbon Version: carbonchat-paper-3.0.0-beta.32.jar

Pastebins:

N/A

Any other relevant details:

I can provide profiling if needed. I captured some snapshots in VisualVM but currently can't export them, will try and get more detailed diagnostics out of a test server.

Metadata

Metadata

Assignees

No one assigned

    Labels

    unconfirmed bugreported bug, not confirmed yet

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions