CIV 4 Performance Analysis

carlos_in_black

Chieftain
Joined
Oct 28, 2005
Messages
10
CIV 4 Performance Analysis

I finally decided to do a detailed study on CIV 4 performance. Few close friends had frustrating moments with CIV 4 they described as “intolerable”, one of them was so desperate that he wanted buy my current game rig…

So, there can be 3 causes of CIV 4 Huge Map sluggishness: CPU, Memory and Graphics Card.

Test Spec:

Atholon 64 3200+ 2GHz (2.3GHz overclocked comparison)
Radeon 9800XT 412MHz (300MHz underclocked comparison)
2GB Memory (1GB comparison, sorry using 1GB sticks, can’t do 1.5GB)
1280x1024 2X, High, High, High (Game setting)

Since I only have one primary machine for gaming, the comparisons are by no mean comprehensive. The goal here is to determine the bottleneck. I varied 3 core specs in my system, while the rest components stay the same (same software setup).

Test Condition & Methods:
Huge Map 8 Civs + 1 Barbarian, Highest AI, crowded, and well developed.
Zoom Out + 360 Turn of Globle + Zoom In + Press Enter (100% duplicated through macros)
4 tests are repeated with the same save game and macro script:

Comparison Sample: 2GHz/412MHz/2GB

Test 1: 2GHz/412MHz/1GB (Reduced Memory)
Test 2: 2GHz/300MHz/2GB (Reduced Graphics)
Test 3: 2.3GHz/412MHz/2GB (Improved CPU)

Overall, the results are EXTREMELY slow once zoomed out, zoomed in views are very smooth, End Turn results varies.

Test 1, Memory Results:

1GB is not necessarily much slower than 2GB, but definitely noticeable. Noticed considerable paging activities; memory monitor confirmed my findings: the memory usage is approximately 1.3GB once the game is fully loaded. 2GB had minimum paging activities. For those huge map lovers out there consider getting yourself +1GB of memory

Conclusion: The timing differences I recorded between the 2 cases are noticeable; but the overall experience is not much different. Considerable paging with 10k RPM hard drive was very tolerable; computers with less 1GB memory or slow/fragmented HD may run much slower.

Test 2, Graphics Card Results:

Conclusion: No noticeable differences, no timing difference, no graphics difference.
Graphics with 9800XT is definitely not the bottleneck.

Test 3, CPU Result:

CPU usage in Task Manager can’t be trusted. As soon as you boot into any game of any size, the CPU goes up to 100%. It will remain at 100% all time, even when game is just idling, i.e. less likely caused by A.I. However, this DOES NOT necessarily mean bad coding; most games have similar behaviors, even some of the less demanding ones.

2.3GHz did run little more smoother than 2GHz with End Turn. However, the 360 and zooms were no different; this is very understandable, as End Turn may involve heavy duty AI calculation for current turn.

Conclusion: This game is definitely CPU intensive: get as much horse power as you can. Especially if you want Huge maps with Epic speed.

+++++++++++++++++++++++

While many had graphics problem, CIV 4 is definitely not a graphically demanding game; my card is running only 3 degrees above idle temperature (FEAR would put +10 to it  ). If you have anything of the similar class, i.e. 9600 9800 5900 6600 x600… there is no reason why you should upgrade your graphics card.

Memory wise, it is as expected. Huge game consumes huge memory. If you have 1GB, then be content with it. If you have less than 512MB, and slow hard drive, then definitely put more in. If you got 768MB, then have some patience…

CPU is the bottleneck for End Turns; speed is very much “intolerable” as described by my friend. Even with 2.3GHz overclocked, I still noticed 5 seconds delay on each turn.

What I failed to find is the cause for Zoom In/Out slowdowns. I noticed the slow down starts as soon as I zoomed out from isometric view to aerial view, going from aerial to global view did not change. I suspect the aerial view/global view uses a different rendering technique than the isometric view.

Here is what I can’t explain. Say if aerial/global is done in the same rendering environment, with just distant drawing and optimizations like dropping units and less important props, then aerial/global should be at least as fast as isometric. As noted above, the game engine is not graphically intensive, if the heavy stuff gets lifted away (detailed texture, smaller props, unit models), the rest is should be even less resource intensive. However, the opposite is observed: as the engine zooms out from to aerial (smooth to sluggish), the viewing area is almost identical, yet the framerate drops like a rock.

Although the results may seem a little troubling for a turn based/isometric game, I strongly believe the game can be optimized. However, since CIV 4 is my first Sid’s game, I could be totally wrong…

P.S. I won’t recommend any purchase choices here; check out www.hardforum.com if you are convinced you need better hardware for your conquest…

P.S.S. As you can probably tell, I am a trained engineer... nerd talk fits me pretty well. I am an processor designer with background in optimization.

P.S.S.S. This is written at 2:00AM, after 4 days of sleepless nights of CIV 4 (ok, I had a total of 8 hours of sleep in the last 4 days.) Please ignore the typo/grammo/disorganization/incoherent flow.

Enjoy!
 
Nice analysis, well done:goodjob:

Looks like my Athlon 2400+ and 1gb arent going to cut it on huge maps from a smooth/fast gameplay perspective:(
 
Interesting test. Of course, you'd need a bigger sample for stronger conclusions.

Here is some background info: Civ1 and Civ2 were pretty undemanding with regards to memory, but there was always a pause at the end of the turn while the computer did the calculations. This grew longer as game progressed.

Civ3 had some very long processing times on slow computers. Since the programmer(s) of Civ4 and Civ3 are the same, it is likely that the source of game being slow is the same.

We can only speculate which routine(s) are taking up most of that processing time. I am inclined to suggest pathfinding. Since practically all AI decisions need to "understand" the map in some way, and since unit moving requires pathfanding, I'd say it's the single most consuming operation. Maybe that could be tested with scenario editor.

Anyway, good test, and if you feel like doing more (hardware or software ones) I will be interested in reading them
 
carlos_in_black said:
CPU usage in Task Manager can’t be trusted. As soon as you boot into any game of any size, the CPU goes up to 100%. It will remain at 100% all time, even when game is just idling, i.e. less likely caused by A.I. However, this DOES NOT necessarily mean bad coding; most games have similar behaviors, even some of the less demanding ones.

Yes, the main loop of games is usually something like this:

While the game isn't done
Process Inputs - if any
Update World Changes - if any
Update Graphics - always

This means that it will use 100% if it is allowed to.
 
Oh yeah, it looks like cities are still being drawn as you zoom out.
 
warpstorm said:
Oh yeah, it looks like cities are still being drawn as you zoom out.

They just need to optimize it all. I'm surprised performance issues weren't picked up during testing, and considered a priority.
 
Currently playing on:

Athlon Mobile Barton 2500 O/C to 2GHz
Win2k
Radeon 9600XT (Older Cats but since CIV worked right away out of the box, I haven't upgraded.)
1 GB 3200 DDR
1920X1200 0AA, Medium, Medium, Medium (+Multiple units)

Graphics are definately a huge bottleneck for me. I run at 1920x1200 because that's the native res of my LCD. Windowed mode at 1920x1200 drops it to an absolute crawl. Try upping the resolution and see at what point your video card compains.
 
Hey Carlos: Can I ask how much graphics memory you have in that 9800XT? I have a feeling this game may be more limited in memory bandwidth/accesses (lots of textures, a lot of geometry) than it is in pure-fillrate, hence why lowering the core speed might not actually change much. That's just an intuition though - I have no evidence.
 
It's very possible that a memory leak is the cause of the slowness. Many people have observed that. And if that's not the case, I'll be pretty mad that the developers didn't warn us ahead of time that the biggest maps would require so much RAM.
 
VetLegion:

I think path-finding algorithm is not all that process intensive; not to a degree to bring 2GHz AMD to its knees.

warpstorm:

Exactly, besides 100% in Task Manger can have several different values and meanings. i.e. the System Idle Process can take up to 30% of a 100% CPU when its just doing very simple tasks.

Loopy:

Are we talking about the zoomed in graphics? or globe/aerial view? The look of the zoomed in graphics doesnt look that that complex. I am currently running this game at 1080P (1920x1080 HD Projector setup, 130' of goodness :D), I dont see any slow down when zoomed in.

Subtestube:

I have 9800XT 256MB. I doubt the memory on graphics card matters in this case. Most of the textures are very repetitive(same land/water tiles), unit all shares the same animation sequence and textures.

tristangreer:

I think there is a leak; I just did some testing with the following sequence. Booting up CIV 4-Load a Game-Exit, 5 rounds later, I have seen a growth of 100mb in my idle system memory usage(from 220MB usage to 330MB usage).

However this does not account for the fact a huge map takes 1.3GB of memory; no game play involved, just loading a saved game.
 
carlos_in_black said:
I am currently running this game at 1080P (1920x1080 HD Projector setup, 130' of goodness :D), I dont see any slow down when zoomed in.
I hate you. :p
 
warpstorm said:
Yes, the main loop of games is usually something like this:

While the game isn't done
Process Inputs - if any
Update World Changes - if any
Update Graphics - always

This means that it will use 100% if it is allowed to.
Hm. For me CivIII, only hits 100% CPU usage during the AI's turn, never when idling during my turn.
 
Mujadaddy said:
I hate you. :p
You'd hate me even more if I told you I could do that with FEAR...

The truth is I cant, I am only running at 848x480. Surprisingly, it looks almost identical to 1920x1080, except I can go at 70FPS.
 
The Last Conformist said:
Hm. For me CivIII, only hits 100% CPU usage during the AI's turn, never when idling during my turn.

You can thank the move to 3D for that...
 
carlos_in_black said:
You'd hate me even more if I told you I could do that with FEAR...

The truth is I cant, I am only running at 848x480. Surprisingly, it looks almost identical to 1920x1080, except I can go at 70FPS.
I hate you even more :lol:
 
Hey thanks for all the work carlos! It's interesting to read and know, but more importantly this is exactly the kind of info we need in order to pressure for fixes.
 
Some of the oddities I have noticed - I can be moving units, clicking on the map, and CERTAIN THINGS take forver.

Clicking on a foreign leader - this can take 30 seconds or more to bring up. 1GB RAM, 2.2GHz dual CPU. Go figure.

If I use the map AT THE POLES, it starts to bog VERY badly - WIERD. Move back and forth okay at the equator, but at the poles - we're talking less than 1 fps at the worst.

Now, between turns - when Civ3 would just bury you - it seems to be running fine - not bad at all. Almost all of the land on a large map (don't think it's huge), is used by cities, there are at least 9 or so Civs - and after my end of turn, it's actually not long at all, I want to say under 15 seconds. But then you get the wierdness of clicking on a leaderhead and waiting... and waiting... and waiting.

Something just ain't right... I wanted to chalk it up to not handling multi-CPU threading properly, but some dual core setups and dual CPU setups seem to be working. Stumped.

Venger
 
Top Bottom