Follow-up Comment #5, patch #1732 (project freeciv):

> Nice work, Matthias. The dynamic bitvector patch has pretty
> impressive memory usage now.

Thanks! Some additional comments:

- this is only one example with the following server commands

set size 30
set gen 2
set minp 0
set aifill <number>

generator 1 often crash for high number of players or big maps (seems to be
the generation of start positions; if startpos is changed, even generator 1
is working)

- 1.1.14 / 2.2.0 / 2.2.1 have even lower memory usage but less feature ;-)

- the increase S2_2 => svn17555 could be due to the increased city map (I
will check this and test where I can save some memory)

- svn17555 => svn17568 is due to the increase of the max number of players
from 32 to 128. Mainly the bv_player bitvectors are increased from 4byte to
16byte and for each tile 3 such bitvectors are used (tile_known and
tile_seen[V_COUNT])! Furthermore, all 128 players are created even if one
only uses 1 player. One player includes a diplstate for each player slot as
well as ai_data with one ai_dpi_intel for each player slot.

- svn17568 => (pointers) reduce the memory footprint by using pointers for
player slots, player diplstate, ai_data, ai_dip_intel, team slots and team
names. This reduces the memory usage if the number of players is lower. For
high player numbers, the memory usage is slightly increase due to the
management overhead.

- (pointers) => (dbv) this patch set takes on bv_player and its usage for
tile_known and tile_seen. This bitvector is defined in the tile struct. Thus,
the 16bit are allocated even if only one player is used. The patches move the
information into the player struct. Furthermore, in the server seen_count is
used instead of tile_seen. For this, a new interface for defining functions
pointers with differend function backends in the server and client is
implemented.

As this numbers are hard to get (compile all clients; start them with
different map sizes and player count; save and analyse the data) and perhaps
wrong(?), perhaps somebody could check them?

My algorithm for creating the numbers:

* compiling the selected freeciv version
* run the server (and client) with a *.serv file which defines the selected
settings
* connect server / client (if an analysis for the client is needed)
* run pmap for both programs (see attached script)
* get the number(s) into a table (row 'total', column 'size')

I have no idea how to automate this ...

(file #9591)
    _______________________________________________________

Additional Item Attachment:

File name: pmap.bin                       Size:0 KB


    _______________________________________________________

Reply to this item at:

  <http://gna.org/patch/?1732>

_______________________________________________
  Nachricht geschickt von/durch Gna!
  http://gna.org/


_______________________________________________
Freeciv-dev mailing list
Freeciv-dev@gna.org
https://mail.gna.org/listinfo/freeciv-dev

Reply via email to