Optimizing data usage (5ooCCU not enough)

Options
My game just released and it's using an insane amount of data. I tried my hardest to optimize everything I could think of. I turned damage & other variables from integer to byte or short but there's still no noticeable difference.

How can I figure out what's causing all this data on the network? I've upgraded the servers to 500CCU and then artificially capped how many players could connect to 200CCU in-code but at this rate, I'm going to use up to 60GB/day.

Comments

  • JohnTube
    JohnTube ✭✭✭✭✭
    Options
    Hi @kriller509,

    May I know what do you need to optimize actually?
    The traffic consumption/usage or CCU number?

    For the traffic consumption, you have 3GB/month per CCU included for free for all plans and if you exceed that, you pay the overages.
    So for 500CCU plan you have 1.5 TB per month.
    Read more about pricing here. (scroll down)

    Here are few tips from the documentation:

    - Network Traffic Optimization
    - Send Less
  • Traffic usage. The CCU is being artificially lowered with code to prevent more players from joining so less data gets used.

    I know general practices for optimization, but I want to know if there's a tool that can tell me like what is causing the data usage.
  • bump
  • Markus
    Options
    Hi,

    we can only give general hints to reduce traffic usage. If you think about paid consulting, please reach out to developer@photonengine.com

    • you must only synchronize what’s totally necessary, any secondary animations and non critical data should be either recomputed on the receiving side based on the data synchronized or with what’s happening in game instead of forced via synchronization.
    • optimize what you send based on the context, typically avoid synchronizing a vector3 for rotation of your character, he likely only rotates around the vertical axis. so make extra code to extract the vertical rotation and only send this you save 2/3 of traffic just for that parameter!
    • optimize the types: for example make use of bytes instead of ints for small ints, make use of ints instead of floats where possible
    • don’t try to combine data into arrays, split everything into individual using stream.SendNext() for every single variable.
    • avoid synchronizing strings at all costs, prefer enums/bytes
    • avoid synchronizing custom classes unless you are totally sure about what get send
    • lower the send rate, you should go under 10 if possible, it depends on your gameplay of course, but this has a major impact on traffic, you can adapt the send rate based on user’s activity, this is also helping a lot. Use interpolation of data to smooth floats and data in general on the receiving side, it’s preferable over brute force synchronization and will save traffic
  • kriller509
    edited September 2019
    Options
    Paid consulting? I'm already paying for 500CCU servers. and I've read the tips on optimization, I've optimized everywhere I can possibly think. Literally, all I'm asking is if there's a tool to let me see what's causing the data usage, simple yes or no. I've read all the documentation and pages on the matter of optimization and the closest thing I can find is the recommendation of 3rd party software (Wireshark).
  • Markus
    Options
    Unfortunately, there is no such tool.

    Sorry we cannot be of further "easy" help - network coding and optimization is a hard topic, so we understand your frustration. It takes time to learn and improve.

    Please note - reviewing code and providing consulting is a time consuming task, which can not be covered by a cost of $95 per month.