Am Dienstag, 16. November 2010, 18:24:25 schrieb Andreas Røsdal:
> On Tue, 16 Nov 2010, Matthias Pfafferodt wrote:
> > After the increase of the number of players and the map size I did plan a
> > check of the memory requirement of the different freeciv versions. I
> > finished this now and the attached pdf files shows some results.
> > 
> > The first two pages show the RAM used by the server as listed by pmap. A
> > savefile with the default settings and aifill = X, map size = Y at turn
> > 100 was loaded. Only one value of X or Y was changed while the other was
> > set to 10.
> > 
> > The requirements increase fro release to release; but with 2.3 it goes
> > down for bigger maps. I also tested a game with aifill 100 and mapsize
> > 100 - the server allocates up to 900MB RAM!
> > 
> > The last two slides show the size of the savegame. For small number of
> > players and map sizes is is OK. But increasing these numbers the size of
> > the savegame increases and, if both are set to 100 the uncompressed
> > savegame reaches a size of over 100MB. For such savegames the time
> > needed to compress the data is significant.
> > 
> > For the client, the memory consumption is increased from 1.14 to 2.2 (xaw
> > to gtk2). After that, nearly no change is visible. The client uses up to
> > 500MB, mostly for the graphical toolkit.
> > 
> > If there are questions please ask.
> These statistics are very interesting. It is a good idea to keep an eye on
> the memory usage, since this would allow the game to scale better.

My aim was mainly to check if the increased number of players or the increased 
map size significantly increase the memory requirement for the 'default' games 
(i.e. map size below 20 and player number below 30). The first development 
versions after these patches needed up to 1.5 times the memory!

> Another aspect of memory usage that I would also find interesting, is
> how the memory usage scales when running multiple Freeciv servers on the
> same host. For example, does running 10 servers at the same time also
> require 10 times the memory?

I do not know ;-) 

The memory usage can be split into two main types - libraries which can be 
used by several programs and program code (anon memory; see page 2). This 
memory is needed for _each_ server! An exemplary pmap output is attached. The 
anon memory displayed in the graph is the sum of [heap] + all [anon] + [stack] 
+ [vdso] + [vsyscall].

But keep in mind that memory measurements are never exact. This are only the 
numbers reported by pmap and presented by me. I do not know how pmap gets 
these numbers or if my interpretation is correct!


> Regards,
> Andreas R.

Matthias Pfafferodt -
Matthias.Pfafferodt <at>
11314: freeciv-server
0000000000400000   2048K   1204K   1204K      0K      0K r-xp 
00000000007ff000      4K      4K      4K      4K      0K r--p 
0000000000800000     24K     24K     24K     20K      0K rw-p 
0000000000806000  28660K  27936K  27936K  27936K      0K rw-p [heap]
00007f09fe96e000      8K      8K      0K      0K      0K r-xp 
00007f09fe970000   2048K      0K      0K      0K      0K ---p 
00007f09feb70000      4K      4K      4K      4K      0K r--p 
00007f09feb71000      4K      4K      4K      4K      0K rw-p 
00007f09feb72000    304K    172K     10K      0K      0K r-xp 
00007f09febbe000   2044K      0K      0K      0K      0K ---p 
00007f09fedbd000     16K     16K     16K     16K      0K r--p 
00007f09fedc1000     24K     24K     24K     24K      0K rw-p 
00007f09fedc7000   1368K    580K      8K      0K      0K r-xp 
00007f09fef1d000   2048K      0K      0K      0K      0K ---p 
00007f09ff11d000     16K     16K     16K     16K      0K r--p 
00007f09ff121000      4K      4K      4K      4K      0K rw-p 
00007f09ff122000     20K     16K     16K     16K      0K rw-p [anon]
00007f09ff127000    344K     20K      0K      0K      0K r-xp 
00007f09ff17d000   2044K      0K      0K      0K      0K ---p 
00007f09ff37c000      4K      4K      4K      4K      0K r--p 
00007f09ff37d000      4K      4K      4K      4K      0K rw-p 
00007f09ff37e000    244K    172K     12K      0K      0K r-xp 
00007f09ff3bb000   2048K      0K      0K      0K      0K ---p 
00007f09ff5bb000      8K      8K      8K      8K      0K r--p 
00007f09ff5bd000     24K     24K     24K     24K      0K rw-p 
00007f09ff5c3000      8K      8K      8K      8K      0K rw-p [anon]
00007f09ff5c5000     80K     52K      3K      0K      0K r-xp 
00007f09ff5d9000   2048K      0K      0K      0K      0K ---p 
00007f09ff7d9000      4K      4K      4K      4K      0K r--p 
00007f09ff7da000      4K      4K      4K      4K      0K rw-p 
00007f09ff7db000     56K     32K     10K      0K      0K r-xp 
00007f09ff7e9000   2044K      0K      0K      0K      0K ---p 
00007f09ff9e8000      4K      4K      4K      4K      0K r--p 
00007f09ff9e9000      4K      4K      4K      4K      0K rw-p 
00007f09ff9ea000    124K     96K      0K      0K      0K r-xp 
00007f09ffa7d000      4K      4K      4K      4K      0K rw-p [anon]
00007f09ffa7e000    252K     24K      0K      0K      0K r--p 
00007f09ffabd000   1140K     12K      0K      0K      0K r--p 
00007f09ffbda000     20K     20K     20K     20K      0K rw-p [anon]
00007f09ffbf6000      4K      4K      0K      0K      0K r--p 
00007f09ffbf7000      4K      4K      0K      0K      0K r--p 
00007f09ffbf8000      4K      4K      0K      0K      0K r--p 
00007f09ffbf9000      4K      4K      0K      0K      0K r--p 
00007f09ffbfa000      4K      4K      0K      0K      0K r--p 
00007f09ffbfb000      4K      4K      0K      0K      0K r--p 
00007f09ffbfc000      4K      4K      0K      0K      0K r--p 
00007f09ffbfd000      4K      4K      0K      0K      0K r--p 
00007f09ffbfe000      4K      4K      0K      0K      0K r--p 
00007f09ffbff000     28K     20K      0K      0K      0K r--s 
00007f09ffc06000      4K      4K      0K      0K      0K r--p 
00007f09ffc07000      4K      4K      4K      4K      0K rw-p [anon]
00007f09ffc08000      4K      4K      4K      4K      0K r--p 
00007f09ffc09000      4K      4K      4K      4K      0K rw-p 
00007f09ffc0a000      4K      4K      4K      4K      0K rw-p [anon]
00007fff38114000    472K    468K    468K    468K      0K rw-p [stack]
00007fff381c8000      4K      4K      0K      0K      0K r-xp [vdso]
ffffffffff600000      4K      0K      0K      0K      0K r-xp [vsyscall]
Total:            49720K  31056K  29867K  28616K      0K

29288K writable-private, 20404K readonly-private, 28K shared, and 31056K 
Freeciv-dev mailing list

Reply via email to