Using Performance Counter

Oayhan
Oayhan ✭✭
edited April 2011 in Photon Server
Hi, I'm trying to use performance counter to measure bandwith usage for my game. I've installed photon counter, opened the performance monitor window and started "photon_perf_log" from "User Defined" under "Data Collector Sets". I've played my game on local machine for some time and stopped counter. When I checked the log all I could see was cpu usage, threads etc... Nothing about network was recorded. Do I need to connect from another machine to measure network usage?

And as a side question in case I can't get counter to work, how much bandwith does a simple position and rotation sync use per service? Thanks in advance.

Comments

  • Maybe this can be solved easily: After you installed the counters, you have to (re)start Photon. It won't report the counters while running.
    Let me know if that helped.

    We try to keep bandwidth usage low, but there is some potential left. Used bandwidth depends more on the frequency of sending something.
    A quick test shows, the MMO demo send ~1700 bytes / sec (sum of both direction).
  • Thanks for the help, it works now. For some reason I can't see byte/sec in the graph view but I can see it in report view. It shows as 716 bytes in and 103 bytes out. Do these numbers grow linearly with player count?
  • depends on what you use.
    With events in a Lite or Lite alike environment it will grow quadratic per room as all send to all, with operations it is up to your code to optimize how much traffic they generate
  • So according to my calculation for 100 players syncing their variables every service costs:

    for worst case, where 100 players are near each other:

    [100 (incoming position for every player) + 100*99 (outgoing for every player)] * size-of-one-way-data = 100^2 * size-of-one-way-data

    average case for players gathered in 4 different zones:

    [100 (incoming position for every player) + 4 * 25*24 (outgoing for every player)] * size-of-one-way-data = 100 * 25 * size-of-one-way-data

    Am I correct in these calculations?
  • If you are in the MMO environment then yes, the average density of players in the interst area will impact the scale.

    But if you don't use the mmo, there is no "near each other" other than "is in the same room -> gets the information".
  • Yeah, I will be using mmo and thanks for the answers. I have one more question. How and which variables of my game depend on different system resources? To be more precise, how can I calculate an estimate resource need for ram and cpu on different occasions (like great user count, user density on a specific zone etc...) and which system resource is more crucial for an mmo?
  • CPU is usually the bottleneck. The higher the user density the more CPU used.