schroe2a / DotaSource2

My fork of... The 2013 edition of the Source SDK
Other
7 stars 1 forks source link

Make sure creeps aren't sending too many network messages #33

Closed NRacer closed 10 years ago

NRacer commented 10 years ago

I'm thinking about adding an svar to the creep "send message" indicator which can:

NRacer commented 10 years ago

I ran net_graph 2 in-game (just by myself), with the two creep UpdateTransmitState modes. After a few minutes, here is the average packet size (from server to client) for each mode:

  1. Original (send teammates+less often): 400-500 bytes (9K/s)
  2. New (always send): 1400-1700 bytes (25K/s)

If there are 8 players (typical), this will result in the server having to process and send out 250K/s, which could cause problems.

NRacer commented 10 years ago

Added svar sv_dotaCreepUpdateRate 1.0 which is the delay (in seconds) between each update. The default (1.0) significantly reduces network overhead for creep updates. Assuming a server tick rate of 20, this reduces creep bandwidth use down to under 1K/s (per player), which is reasonable.

I'd like to see more work done to decrease the amount of information sent each update as some of the facts (such as direction the creep is facing) is unnecessary clear across the map. However, I'll leave that for another bug, if someone wants to work on it.

NRacer commented 10 years ago

It turns out that a player in the middle of the map (which is typical) gets "PVS" ( https://developer.valvesoftware.com/wiki/PVS ) messages for almost all creeps on the map. This completely bypasses most of the gains made in this bug. More work is apparently necessary.