Skip to content

Bandwidth Abuse #3828

Open
Open
@MrGadget1024

Description

@MrGadget1024

Too much bandwidth overhead

  • We're sending Ping/Pong bidirectionally at 10Hz
    • Hard-coded DefaultPingInterval set to 0.1f
  • We're also sending TimeSnapshot bidirectionally at 60Hz
    • Governed by Network Manager Send Rate

Pull the TestPingPong branch

  • This branch has additional logging added to:
    • NetworkManager
    • NetworkTime
    • NetworkConnectionToClient
    • NetworkClient
    • NetworkServer
  • This branch also has Mirage Profiler added to package manifest.

Setting Up

  • In the Mirror/Tests folder, find TestPingPong folder
  • Open the scene and add to build settings
  • Switch to Dedicated Server platform, Build and Run (IL2CPP)
  • Switch to Desktop platform
  • Open Profiler window and enable Deep Profiling
    • Also add Mirror Received and Mirror Sent modules to profiler
  • Editor Console: enable Collapse
  • Play in editor and connect the client (there is intentionally no Player object)
  • Observe the timestamped log flood in editor and server consoles
  • Observe the bandwidth used in the profiler (400B/s in, 500B/s out)

Remedies

  • Only NT / Prediction needs Snapshot messages, so only enable when they're activated at runtime
    • Does this really need to be 60Hz? Couldn't this be capped at something sufficient, like 30Hz or less?
  • Nothing needs Ping/Pong at 10Hz - Default should be reset back to 0.5Hz or lower as a base keep-alive.

image

image

Metadata

Metadata

Assignees

Labels

bugSomething isn't working

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions