It is currently 16 Apr 2024, 23:30
   
Text Size

Mage.Server excessive network bandwidth (Issue 2812)

Moderators: North, BetaSteward, noxx, jeffwadsworth, JayDi, TheElk801, LevelX, CCGHQ Admins

Mage.Server excessive network bandwidth (Issue 2812)

Postby noxx » 16 Apr 2017, 14:25

This is topic to discuss current state on Issue 2812:
"Xmage server uses excessive network bandwidth"

At the moment gathering statistics:
1. Played one EDH game (around 35-40 turns)
It results in 2,5 Mb in and 35 Mb out for server
2. Looking for information on daily load
TBD

Actually the reason is clear: we are sending gameview too often even when not required.
What can be done? Long ago I remember having idea to implement sending game diff instead.
But it's not so easy to implement and bugs are possible as in case of lost packets next gamestate update on client won't restore it (as it does now).

It also may increase Memory usage (as you need to store previous state to get diff from) and CPU usage Server (you need to create diff for every server message).

Probably issue is somewhere in different place, then we need to add wrapper to start tracking it.
noxx
DEVELOPER
 
Posts: 110
Joined: 25 Mar 2012, 08:13
Has thanked: 3 times
Been thanked: 37 times

Re: Mage.Server excessive network bandwidth (Issue 2812)

Postby noxx » 16 Apr 2017, 19:13

Could make a progress by writing a test that emulating 60 players playing concurrent 30 games on local server.
Test is synthetic but still close to like: test players don't play anything and just skip phases (they have to discard 8th card starting from 2nd turn). Yes, this results in empty battlefield but even now it reproduces bandwidth issue.

Player count: 60
Games Played: 30 (standard)
Decks: randomly generated, 60 cards
Server: -Xmx2G -testMode=true
Client: -Xmx800M

Results:
Time duration for all games: 8 minutes
Mb in (Server received): 6.5 Mb
Mb out (Server sent): 784 Mb

One more finding with the test: time to time I see gameclient gets frozen (I have handler for it in test so it continues the play). But it means that message sent from Server gets lost.
noxx
DEVELOPER
 
Posts: 110
Joined: 25 Mar 2012, 08:13
Has thanked: 3 times
Been thanked: 37 times


Return to Developers Talk

Who is online

Users browsing this forum: No registered users and 9 guests


Who is online

In total there are 9 users online :: 0 registered, 0 hidden and 9 guests (based on users active over the past 10 minutes)
Most users ever online was 4143 on 23 Jan 2024, 08:21

Users browsing this forum: No registered users and 9 guests

Login Form