Andreas Røsdal <andre...@pvv.ntnu.no> writes:
> 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
>> 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!
With 2GB ram and 2GB swap I could not play that. I run out of memory.
>> The last two slides show the size of the savegame. For small number of
>> 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
>> of over 100MB. For such savegames the time needed to compress the data is
Full ACK. And the disk fills up quickly with autosave games. Some sort
of rotating would be nice (last 20 saves) or some sparse keeping (keep
games 1,2,3,...,10 turns ago, every 10th turn till 100 turns ago, every 100th
turn till 1000 tuns ago).
>> 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. 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?
Although the amount shared is static. The amount not shared goes up map
size and players. So if it was 9.5 times before it now becomes 9.7 times
if you use larger maps / more palyers.
Also the memory usage goes way up with time. More of the map is known to
players and AIs, more cities and units are created and big gotos and war
maps are created. Measuring the memory at the start of the game might
not be the best measurement. Maybe let it play 100 turns and then
measure. Or even better, plot the memory usage after every turn.
Other stats that would be usefull would be statistics about number of
players remaining, number of cities and number of units in the
game. Maybe something someone could patch into the server.
PS: I also found that XOrg uses a huge amount of memory when playing
freeciv. Is freeciv leaking server side pixmaps?
Freeciv-dev mailing list