Search Unity

Resolved Network profiler scale

Discussion in 'Multiplayer Tools' started by enhawk, Oct 16, 2017.

  1. enhawk

    enhawk

    Joined:
    Aug 22, 2013
    Posts:
    833
    what is a good scale?
    what is a bad scale?
     
  2. enhawk

    enhawk

    Joined:
    Aug 22, 2013
    Posts:
    833
    is 198 bad?
     
  3. robochase

    robochase

    Joined:
    Mar 1, 2014
    Posts:
    244
    Can you elaborate about what scale means here?
     
  4. enhawk

    enhawk

    Joined:
    Aug 22, 2013
    Posts:
    833
     
  5. robochase

    robochase

    Joined:
    Mar 1, 2014
    Posts:
    244
    Ok thanks for clarifying! That's the y scale of the graph. So it looks like your peaks are ~122 ClientRPC calls (you can click on an individual frame to confirm this)

    I glanced at the HLAPI source code. It looks like it will increment that stat in the profiler once when the RPC is called. So like if the server wants to tell all the clients the new position of some character, and it does it via an RPC. You should see the RPC stat increment once, even though it's technically sending a message to every connected client. Does that make sense?

    Let's take a 10 player FPS as an example. The server tells every client about the position of every other client via an RPC on the player object. In that example, you'd probably see 9 RPC calls in the profiler.

    Along those lines, 100+ RPC calls seems like a lot. If you're noticing networking problems, you may want to look into optimizing your usage. Consolidate messages, cut out any unnecessary data, cut down on your send rate, compress your data, etc.

    It's hard to say what a good number is here, but if you want one: 0-3 RPCs per player per frame seems like a healthy amount. It REALLY depends on your game though