Complete.Org: Mailing Lists: Archives: freeciv-dev: November 2002:
[Freeciv-Dev] Re: (PR#2316) Reduce bandwith take 3
Home

[Freeciv-Dev] Re: (PR#2316) Reduce bandwith take 3

[Top] [All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index] [Thread Index]
To: undisclosed-recipients:;
Subject: [Freeciv-Dev] Re: (PR#2316) Reduce bandwith take 3
From: "Raimar Falke via RT" <rt@xxxxxxxxxxxxxx>
Date: Fri, 15 Nov 2002 05:49:48 -0800
Reply-to: rt@xxxxxxxxxxxxxx

On Fri, Nov 15, 2002 at 04:39:54AM -0800, Per I. Mathisen via RT wrote:
> 
> On Fri, 15 Nov 2002, Raimar Falke via RT wrote:
> > And some numbers
> 
> Why is it that you reduce the number of packets sent so drastically the
> first turn? And why does this have so little effect on total bandwith
> savings?

Lets take a look:

current:
2: Transmitted packets:
2:   [ 1]:      1 packets;       65 bytes total;    65 bytes/packet average
2:   [ 2]:      2 packets;        6 bytes total;     3 bytes/packet average
2:   [ 3]:      2 packets;        6 bytes total;     3 bytes/packet average
2:   [ 5]:     72 packets;     2088 bytes total;    29 bytes/packet average
2:   [ 9]:   6813 packets;    61317 bytes total;     9 bytes/packet average
2:   [13]:      6 packets;     2718 bytes total;   453 bytes/packet average
2:   [14]:      1 packets;      664 bytes total;   664 bytes/packet average
2:   [15]:      1 packets;        6 bytes total;     6 bytes/packet average
2:   [16]:     16 packets;     1090 bytes total;    68 bytes/packet average
2:   [17]:     78 packets;     7904 bytes total;   101 bytes/packet average
2:   [39]:      1 packets;        7 bytes total;     7 bytes/packet average
2:   [61]:     89 packets;     2632 bytes total;    29 bytes/packet average
2:   [62]:     52 packets;    10825 bytes total;   208 bytes/packet average
2:   [63]:     68 packets;    16597 bytes total;   244 bytes/packet average
2:   [65]:      6 packets;      252 bytes total;    42 bytes/packet average
2:   [68]:     12 packets;     1945 bytes total;   162 bytes/packet average
2:   [69]:      1 packets;      450 bytes total;   450 bytes/packet average
2:   [70]:      6 packets;     7041 bytes total;  1173 bytes/packet average
2:   [71]:     80 packets;     2209 bytes total;    27 bytes/packet average
2:   [72]:      1 packets;       54 bytes total;    54 bytes/packet average
2:   [75]:     62 packets;     7223 bytes total;   116 bytes/packet average
2:   [77]:      5 packets;      166 bytes total;    33 bytes/packet average
2:   [81]:      1 packets;       16 bytes total;    16 bytes/packet average
2:   [82]:      2 packets;      142 bytes total;    71 bytes/packet average
2:   [83]:     66 packets;     1326 bytes total;    20 bytes/packet average
2:   [87]:      1 packets;        3 bytes total;     3 bytes/packet average
2:   [90]:      3 packets;     5669 bytes total;  1889 bytes/packet average
2:   [92]:      1 packets;        3 bytes total;     3 bytes/packet average
2:   [94]:      2 packets;        6 bytes total;     3 bytes/packet average
2:   [95]:      1 packets;        3 bytes total;     3 bytes/packet average
2: turn=171; transmitted 132433 bytes in 7452 packets;average size per packet 
17 bytes

delta:
2: Transmitted packets:
2:  Packets    Bytes  Byt/Pac Name
2:        2        6        3 PACKET_PROCESSING_STARTED(0)
2:        2        6        3 PACKET_PROCESSING_FINISHED(1)
2:        1       69       69 PACKET_SERVER_JOIN_REPLY(3)
2:        1        8        8 PACKET_GAME_STATE(8)
2:     3568    29251        8 PACKET_TILE_INFO(10)
2:        1        6        6 PACKET_MAP_INFO(12)
2:       16     1016       63 PACKET_CHAT_MSG(13)
2:       61     3353       54 PACKET_CITY_INFO(15)
2:       66     1260       19 PACKET_CITY_SHORT_INFO(16)
2:        6     2596      432 PACKET_PLAYER_INFO(26)
2:       72     1473       20 PACKET_UNIT_INFO(34)
2:        2       79       39 PACKET_CONN_INFO(78)
2:        1        3        3 PACKET_CONN_PING(86)
2:        1        3        3 PACKET_START_TURN(89)
2:        2        6        3 PACKET_FREEZE_HINT(90)
2:        1        3        3 PACKET_THAW_HINT(91)
2:        6       90       15 PACKET_SPACESHIP_INFO(92)
2:       52     9008      173 PACKET_RULESET_UNIT(93)
2:        1       14       14 PACKET_RULESET_GAME(94)
2:       80     1740       21 PACKET_RULESET_GOVERNMENT_RULER_TITLE(95)
2:       89     2104       23 PACKET_RULESET_TECH(96)
2:        6     6923     1153 PACKET_RULESET_GOVERNMENT(97)
2:        1      445      445 PACKET_RULESET_TERRAIN_CONTROL(98)
2:       62     7072      114 PACKET_RULESET_NATION(99)
2:        5      158       31 PACKET_RULESET_CITY(100)
2:       12     1851      154 PACKET_RULESET_TERRAIN(101)
2:        1       25       25 PACKET_RULESET_CONTROL(102)
2:        3     5656     1885 PACKET_PLAYER_ATTRIBUTE_CHUNK(103)
2:        1      640      640 PACKET_GAME_INFO(111)
2:       68    16597      244 unknown(112)
2: turn=171; transmitted 91461 bytes in 4190 packets;average size per packet 21 
bytes

So 30k are saved by not transmitting 3300 PACKET_TILE_INFO. This are
the main savings. The other packets can't be discarded because they
are mostly ruleset stuff. And the bandwidth can also not be reduced
further because the biggest bandwith hog are the strings in the
ruleset packets (at least I think so).

> I also note that apart from the first turn, the number of packets that are
> not sent (ie discarded) in delta version is actually very small.

Mhh yes. The number was bigger in the previous version. The error is
in the fold-bool-into-the-header: if the bool is set this is treated
is a change (but it isn't).

old numbers for plain:
2: Transmitted packets:
2:   [ 2]:      2 packets;        6 bytes total;     3 bytes/packet average
2:   [ 3]:      2 packets;        6 bytes total;     3 bytes/packet average
2:   [ 5]:     78 packets;     2262 bytes total;    29 bytes/packet average
2:   [ 8]:      1 packets;       11 bytes total;    11 bytes/packet average
2:   [ 9]:      3 packets;       27 bytes total;     9 bytes/packet average
2:   [13]:      8 packets;     3624 bytes total;   453 bytes/packet average
2:   [14]:      2 packets;     1328 bytes total;   664 bytes/packet average
2:   [16]:     11 packets;      825 bytes total;    75 bytes/packet average
2:   [17]:     78 packets;     7904 bytes total;   101 bytes/packet average
2:   [51]:      1 packets;        3 bytes total;     3 bytes/packet average
2:   [83]:      2 packets;       47 bytes total;    23 bytes/packet average
2:   [87]:      1 packets;        3 bytes total;     3 bytes/packet average
2:   [92]:      1 packets;        3 bytes total;     3 bytes/packet average
2:   [94]:      1 packets;        3 bytes total;     3 bytes/packet average
2:   [95]:      1 packets;        3 bytes total;     3 bytes/packet average
2:   [96]:      1 packets;        9 bytes total;     9 bytes/packet average
2: turn=173; transmitted 16064 bytes in 193 packets;average size per packet 83 
bytes

new numbers for delta with no bool-header-folding:
2: Transmitted packets:
2:  Packets    Bytes  Byt/Pac Name
2:        2        6        3 PACKET_PROCESSING_STARTED(0)
2:        2        6        3 PACKET_PROCESSING_FINISHED(1)
2:        1        8        8 PACKET_NEW_YEAR(9)
2:        3       24        8 PACKET_TILE_INFO(10)
2:       12      854       71 PACKET_CHAT_MSG(13)
2:       32      496       15 PACKET_CITY_INFO(15)
2:        8      162       20 PACKET_PLAYER_INFO(26)
2:       21      233       11 PACKET_UNIT_INFO(34)
2:        1       10       10 PACKET_PING_INFO(79)
2:        1        3        3 PACKET_CONN_PING(86)
2:        1        3        3 PACKET_BEFORE_NEW_YEAR(88)
2:        1        3        3 PACKET_START_TURN(89)
2:        1        3        3 PACKET_FREEZE_HINT(90)
2:        1        3        3 PACKET_THAW_HINT(91)
2:        3      427      142 PACKET_GAME_INFO(111)
2: turn=173; transmitted 2241 bytes in 90 packets;average size per packet 24 
bytes

Thanks for the spotting.

> So maybe you should try removing the discard-packets thing and see
> if it has any noticable effect at all. I am not a big fan of it
> anyway, since in some situations, merely receiving an info packet
> (even if info is identical to what we have) can be valuable
> information: It means some state involving this object has changed
> on the server, even if the object itself remains unchanged.

If are not informed by another packet about this I would say that you
shouldn't have this information anyway.

        Raimar

-- 
 email: rf13@xxxxxxxxxxxxxxxxx
 "Microsoft DNS service terminates abnormally when it recieves a response
  to a DNS query that was never made.
  Fix Information: Run your DNS service on a different platform."
    -- MS service information on bugtraq



[Prev in Thread] Current Thread [Next in Thread]