[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 03:19:03 -0800 |
Reply-to: |
rt@xxxxxxxxxxxxxx |
On Tue, Nov 12, 2002 at 10:53:06AM -0800, Raimar Falke via RT wrote:
> The attached patch is a more or less rewrite of the freeciv network
> protocol. The protocol can be broken down into 3 layers:
> - layer 1: defines how the data of each packet is transfered (how a
> packet is serialized)
> - layer 2: defines how packets are transfered (16bit size, 8bit type)
> - layer 3: defines which packets are available to the user (PACKET_*
> and struct packet_*)
And some numbers: I changed the code so that only the numbers of the
last turn is reported. The first line is the initial setup till the
first START_TURN.
Plain client:
2: turn=171; transmitted 132433 bytes in 7452 packets;average size per packet
17 bytes
2: turn=172; transmitted 17262 bytes in 206 packets;average size per packet 83
bytes
2: turn=173; transmitted 16064 bytes in 193 packets;average size per packet 83
bytes
2: turn=174; transmitted 16590 bytes in 189 packets;average size per packet 87
bytes
2: turn=175; transmitted 15030 bytes in 179 packets;average size per packet 83
bytes
2: turn=176; transmitted 15583 bytes in 185 packets;average size per packet 84
bytes
2: turn=177; transmitted 15993 bytes in 186 packets;average size per packet 85
bytes
2: turn=178; transmitted 14443 bytes in 184 packets;average size per packet 78
bytes
Delta:
2: turn=171; transmitted 91461 bytes in 4190 packets;average size per packet 21
bytes
2: turn=172; transmitted 4367 bytes in 202 packets;average size per packet 21
bytes
2: turn=173; transmitted 3035 bytes in 171 packets;average size per packet 17
bytes
2: turn=174; transmitted 2641 bytes in 168 packets;average size per packet 15
bytes
2: turn=175; transmitted 2169 bytes in 163 packets;average size per packet 13
bytes
2: turn=176; transmitted 2351 bytes in 161 packets;average size per packet 14
bytes
2: turn=177; transmitted 3165 bytes in 167 packets;average size per packet 18
bytes
2: turn=178; transmitted 2076 bytes in 165 packets;average size per packet 12
bytes
Looking at data for turn 172 in more detail:
Plain:
2: Transmitted packets:
2: [ 2]: 1 packets; 3 bytes total; 3 bytes/packet average
2: [ 3]: 1 packets; 3 bytes total; 3 bytes/packet average
2: [ 5]: 81 packets; 2349 bytes total; 29 bytes/packet average
PACKET_UNIT_INFO
2: [ 8]: 1 packets; 11 bytes total; 11 bytes/packet average
2: [ 9]: 4 packets; 36 bytes total; 9 bytes/packet average
2: [13]: 7 packets; 3171 bytes total; 453 bytes/packet average
PACKET_PLAYER_INFO
2: [14]: 3 packets; 1992 bytes total; 664 bytes/packet average
PACKET_GAME_INFO
2: [16]: 24 packets; 1734 bytes total; 72 bytes/packet average
PACKET_CHAT_MSG
2: [17]: 78 packets; 7904 bytes total; 101 bytes/packet average
PACKET_CITY_INFO
2: [51]: 1 packets; 3 bytes total; 3 bytes/packet average
2: [83]: 2 packets; 47 bytes total; 23 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: turn=172; transmitted 17262 bytes in 206 packets;average size per packet 83
bytes
Delta:
2: Transmitted packets:
2: Packets Bytes Byt/Pac Name
2: 5 15 3 PACKET_PROCESSING_STARTED(0)
2: 5 15 3 PACKET_PROCESSING_FINISHED(1)
2: 1 8 8 PACKET_NEW_YEAR(9)
2: 4 32 8 PACKET_TILE_INFO(10)
2: 24 1675 69 PACKET_CHAT_MSG(13)
2: 60 854 14 PACKET_CITY_INFO(15)
2: 2 14 7 PACKET_CITY_SHORT_INFO(16)
2: 7 114 16 PACKET_PLAYER_INFO(26)
2: 79 754 9 PACKET_UNIT_INFO(34)
2: 4 35 8 PACKET_PING_INFO(79)
2: 4 12 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 827 275 PACKET_GAME_INFO(111)
2: turn=172; transmitted 4367 bytes in 202 packets;average size per packet 21
bytes
Biggest part are the chat messages!!!!!. Lot of "Production upgraded
in" messages.
Lets take the next turn:
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
2: Transmitted packets:
2: Packets Bytes Byt/Pac Name
2: 1 3 3 PACKET_PROCESSING_STARTED(0)
2: 1 3 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: 60 804 13 PACKET_CITY_INFO(15)
2: 2 14 7 PACKET_CITY_SHORT_INFO(16)
2: 8 159 19 PACKET_PLAYER_INFO(26)
2: 76 727 9 PACKET_UNIT_INFO(34)
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 3035 bytes in 171 packets;average size per packet 17
bytes
The city and unit info look at expected:
2: packet_city_info: sending info about (246)
2: field 'food_stock' has changed
2: field 'shield_stock' has changed
2: field 'before_change_shields' has changed
2: packet_unit_info: sending info about (308)
2: field 'activity' has changed
2: field 'activity_count' has changed
Bottom line: you can reduce the startup bandwidth usage by 30% and the
in game by a factor of 4 to 7.
Raimar
--
email: rf13@xxxxxxxxxxxxxxxxx
Windows: Where do you want to go today?
Linux: Where do you want to go tomorrow?
BSD: Are you guys coming or what?
|
|