0.71.1 How much RAM is being assigned to GC3? Here is what I found. which might explain some hangs being experienced.

With all of the posts of crashes and the discovery that some of you have only 4 GB RAM, I thought of running a measurement check I have run before and posting the results here. It helps to illustrate how much RAM gets assigned by the OS to back up the virtual memory used by GC3 as it stands at build 0.71.1. Memory use optimization typically doesn't happen until shortly before release, so Stardock may be able to reduce this by some at that time.

Also note that my computer has plenty of spare RAM at 16GB, so I seldom, if ever, see any page thrashing. If you have less than 6GB then you will surely encounter the extreme delay that can occur with heavy page thrashing.

My configuration is:

Windows 8.1 with Stardock's "Start8", a sidebar manager (not available in Win8) with CPU and GPU usage and temperature monitors.

Intel I7-4770 at 3.40 GHz. (I don't use overclocking, in fact, if I read the Intel specs correctly, this chip does it automatically as needed.)

16GB RAM

2 TB hard drive (not a factor for these measurements).

NVidia Geforce GT 640 and 4GB RAM with "NVIDIA Geforce Experience". (I get automatic notification of driver updates, including Betas.)

EDIT: I am playing the game in windowed mode at a resolution of 1600*900.

I checked RAM usage by galaxy size and here are my results. The figures are all total amounts. All figures in the first table are  just to the first turn. For each measurement, I exited the game and restarted it.

Idle OS + Steam + all the monitors I have running

                              2.41 GB

GC3 Start menu   3.69 GB -- added about 1.3 GB

GC3 Tiny galaxy  4.49 GB -- added about 0.8 GB

GC3 Small            4.53 GB -- another .04 over Tiny

GC3 Medium        4.56 GB -- another .03 over Small

GC3 Large            4.71 GB -- another .15 over Medium

GC3 Huge             4.92 GB -- another .21 over Large

GC3 Gigantic        5.28 GB -- another .36 over Huge

GC3 Immense      5.92 GB -- another .64 over Gigantic

Then I exited the game and reloaded a game in an Immense Galaxy I had in progress at turn 54 with what looks to me like about 15% of the galaxy explored, all opposing civs selected, all game variables at maximum ("star frequency = abundant", "planet frequency = abundant", etc), 16 colonies, 30 ships, 8 star bases and one shipyard, no mines, rally points, research just barely into the "age of war", and about a dozen custom ship designs.

GC3 Immense reload 6.06 GB -- another .14 over Immense turn 1. If this value scales like I am guessing it will, by the time I have explored the entire galaxy, colonized all of the colonizable planets, done all of the research, etc., I expect to see this value approach or exceed 7 GB, or another 1GB over that for turn 1. (Of course, this is just my guess.)

All of these figures are for this one time. I have seen variances before when I have ran this sequence repeatedly, so, as they say, your mileage may vary. I have seen it go as high as 7.6 GB when playing an immense galaxy.

33,059 views 14 replies
Reply #1 Top

Expect your usage to climb significantly.

My current game:

  • Fullscreen 1920x1080;
  • Immense Galaxy - fully explored;
  • All races are in - playing as the Terrans;
  • Near the end of the game - turn 191;
  • Ships in game 633 (of which 281 are mine);
  • Starbases in game 287 (261 mine);
  • Colonies 538 (496 mine);
  • Base memory use (before loading GalCiv3): 2.58GB;
  • Total memory in use with this game loaded and after played a number of turns: 9.06GB
    (Painful for people with only 8GB or less installed).
Maybe the game should perform a check whether you have sufficient memory to play a map of a given size. When a program starts to continuously swap pages to and from the page file (even on a SSD) the performance will be unpleasant to say the least. Maybe someone can confirm (check) how bad this would be in GalCiv3?
 
Note:
I have 37 custom ship classes (each with their own ship designs) and 53 custom ship designs in the game, and my ship designs use a lot more parts (and animations) than the standard (core) ships. I have no idea how big an impact this is on the memory usage. The memory usage might be significantly less on similar sized games when played without any custom ship designs. 

 

Reply #2 Top

I don't know if windowed mode or resolution will affect RAM assignment but I edited my post to include my mode and resolution.

Reply #3 Top

If it was a direct memory issue then I doubt I would be experiencing the hangs at around turn 340+ as I have 32 GB's of RAM.  Immense galaxy as well though I don't know the exact statistics of ships and planets.  I do know everything is explored and all planets except for two are colonized.

 

Gal Civ 3 at the menu at startup is using ~1.6 GB's.

After loading a turn 380 Hang save, the memory usage moved up to 4.35 GB's of memory for GalCiv3.

 

 

Reply #4 Top

Thecw, please tell me what I am doing wrong if you have all of that by turn 191 that is ridiculous.

Reply #5 Top

Quoting Aedaric, reply 3

If it was a direct memory issue then I doubt I would be experiencing the hangs at around turn 340+ as I have 32 GB's of RAM.  Immense galaxy as well though I don't know the exact statistics of ships and planets.  I do know everything is explored and all planets except for two are colonized.

 

Gal Civ 3 at the menu at startup is using ~1.6 GB's.

After loading a turn 380 Hang save, the memory usage moved up to 4.35 GB's of memory for GalCiv3.
End of Aedaric's quote

FWIW, my CTD at the start of turn on an Immense map (yes I've submitted a ticket) is more or less occurring around that point of memory usage as well.  And I've got even more memory than you do on my system. ;). Might be a coincidence though, since others are easily past that point with no issues.

Currently running a Gigantic game on the side and it's  pushing 3.6 GB or so at the mo.  Might be interesting  to see what happens as I play that game out.

Reply #6 Top

Well I dont think it depends on the memory or it is really poorly programmed ....

Because you kinda can't really exceed 32gb RAM...

I have 8 and I think for now it should be enough but okay. I know that there will be games which eat that easily. But I also expect some optimization for our PCs so that GC3 eats less performance. (Ram and Processor)

Would be good, because so far its a great game ;)

Reply #7 Top

Based upon how they programmed it... at the start of the game all of the planets are known... the only thing that should be adding memory are the modules/ships/starbases that you add... and honestly from a  memory perspective... immense with 1000  ships and star bases should impact cpu more than memory...  all of the data should be stored in arrays... maybe I am being blind here... But if your save file is not that large then the memory it would take to run the game should be somewhat correlated to it.  unless they are compressing the files on save?

Reply #8 Top

Quoting Lucky, reply 2

I don't know if windowed mode or resolution will affect RAM assignment but I edited my post to include my mode and resolution.
End of Lucky's quote

Lucky Jack,

Done the same.

Something weird: saving the game and restarting the program, then after a game load the memory usage is significantly lower. And i see jumps in memory usage when simply scrolling around on the map (most of the time when the screen freezes for a second or so).

Reply #9 Top

jhanglyn,

Quoting jhanglyn, reply 7

 unless they are compressing the files on save?

End of jhanglyn's quote

the saves are zipped. Unfortunately they do not properly initialize the zip header;

Quoting jhanglyn, reply 7

all of the data should be stored in arrays...

End of jhanglyn's quote

Brad gave an example of the source code, where it showed that they use iteration sets to access various objects (like the planets, etc...). When you are using (multiple) iteration sets to access the underlying data your memory demand will grow exponentially, even when the actual memory for the raw data storage for your base objects (planets, ships, starbases, etc...) grows linear. Program speed at the cost of using more memory.

 

Reply #10 Top

So, I have the following specs:

 

16GB DDR4 RAM

i7 2600K $@ 3.7GHz

GTX 690 Dual GPU, water cooled.

Windows 8.1

Running game at full screen, 1080P, 8x AA, V-Sync and bloom enabled.

 

And playing immense galaxy, manually saving regularly and no matter what I do, I'm turn locked at 636.  I was turn locked around 340 was able to load a game from about 25 turns earlier and resume to 636... where it seems my game is permanently locked despite several attempts.  I'm going to try a smaller galaxy to see if I can get to the end game, but this issue really needs to be fixed.  I don't think its being caused by any hardware limitations on my end.    

 

Reply #11 Top

kuch128

Quoting kuch128, reply 4

Thecw, please tell me what I am doing wrong if you have all of that by turn 191 that is ridiculous.
End of kuch128's quote

I have no idea what you are doing wrong.

But i get my game "speed" by micromanaging everything, my play speed is very slow: those 191 turns took me - according to the game - 32 hours, but sometimes i leave the game open when doing something else, so the actual game play time should be lower.

I manage and upgrade all my colonies by hand. The first thing i do when colonizing a planet is to set the production wheel to the needs of that planet and disable the auto upgrading of said planet. I almost never queue up more than four buildings, unless i am certain that buildings earlier in the queue will not impact the construction speed of later improvements in the queue (like filling an entire planet with culture buildings).

I use massive amounts of star bases for their bonuses, but i only construct the modules that i actually need. This means that on the bulk of my star bases there are no defense and no approval modules (unless needed to keep planets at 100% approval) installed. The research modules are only on the star bases that cover my very few planets that actually generate research. The manufacturing modules are everywhere and maxed out. If i have a surplus of constructors then the commercial modules are build, but most of the time i initially only build them on the star bases around my financial (and trade) planet - which is quite often not my home planet.

I have loads of custom purpose ship design and custom ship classes, each for a specific need. On the larger map sizes i use multiple scout and survey ships. I have entire scout and survey ship classes up to and including the Large hull versions, and i am already planning to design them for the Huge hulls for maps larger than immense. Also i have colonizers in various version and sizes, from cheap slow ones to expensive fast one, cheap slow ones with no range to expensive one with maxed out range. Expand early and get what you can! Also the cheaper a constructor you have the more cost efficient building star base modules will be.

I do not buy techs from the other races unless it is a tech that i want and need anyway, because every tech you have slows the research of all others. I do not trade away techs that i consider useful to the other races, not matter what they would give for it, but useless techs they can have - to slow their research pace. If you trade a tech away, do not trade that tech to just one adversary but trade it to all of them. For if you don't, the AI that received your tech will definitely trade it away to the others.

On Godlike level every AI gets a tech about every 3 turns, and they trade them to everyone. Therefor you must prioritize research. Try to research a new tech at least every 3 turns - less is better. After the initial turns i get the bulk of my research from the research project. A research, commercial, or approval building is a rare thing for me.

Excess wealth is not needed, better to spend production on manufacturing and research. Like research, the bulk of my income is generated by the wealth project.

Until i am going to need them for conquest my military is just strong enough to not appear as an easy target.

The new tech age system is really hurting my play style, but i simply will not cheese my way through them by buying all the techs from the AI. And i don't mind that most of the AIs are militarily technologically more advanced than me, because i can simply build a state of the art big hulled ship on every shipyard on every turn. And if the war starts i will redirect my efforts to war techs.

But the main reason i can afford to have a weak military is ideology: 

  • I choose Pragmatic Neutral at turn 81, so 100 turns of peace, resulting in total number of battles fought by me: 0;
  • I went for Malevolent Undaunted, resulting in number of planets lost due to influence: 0, and i can take planets deep in their territory and culture flip their colonies;
  • Total result: winning a conquest victory is possible without fighting a single battle or invading a single planet.

And yes, on the immense map you can take all the ideologies and have points left to spare.

Reply #12 Top

thanks for the explanation Thecw

Reply #13 Top

I'm getting about 56% of physical memory being used (with 16GB RAM) on "Gigantic" map size well into game with hundreds of colonies and ships present. With no other progs running in the Taskbar.

I don't know how ppl with only 8GB will fare...

 

Reply #14 Top

Optimization is coming.  Memory needs should be reduced.  :)