Am Mittwoch, 17. November 2010, 18:53:07 schrieb Goswin von Brederlow:
> 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 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!
> 
> With 2GB ram and 2GB swap I could not play that. I run out of memory.

I would be nice if you could try it - in my measurements there was enough RAM 
(8GB available). Perhaps the server uses less if less memory is available?

> 
> >> 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.
> 
> 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).

This is hard to do n a secure way because files are deleted. Also the server 
would have to keep track of the save games. Perhaps an new autosave option 
'last 3 games'. There the server keeps 3 files as FIFO, i.e

freeciv-autosave_01.sav.bz2
freeciv-autosave_02.sav.bz2
freeciv-autosave_03.sav.bz2

And for each turn it creates a new file (freeciv-autosave_00.sav.bz2) and 
after it is saved correctly, the last is deleted and al are moved one down ...

> 
> >> 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?
> 
> Basically yes.
> 
> 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.

That's right. For only increased players or map size it is linear but 
increasing both options is nearly quadratic.

> 
> 
> 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.

The measurements presented in the file are all for a savegame after 100 turns. 
But after 200 turns it could be more ... (or less if a lot of players are 
dead; but I'm not sure about this). 

Plotting the memory usage after each turn would only be practical if there is 
some kind of automatic tool for this.

> 
> 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.
> 
> MfG
>         Goswin
> 
> PS: I also found that XOrg uses a huge amount of memory when playing
> freeciv. Is freeciv leaking server side pixmaps?

I hope not but ...

Matthias

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

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

Reply via email to