CPU usage and a memory leak |
I've got a dual core Intel CPU, that's clocked at 3.2 Ghz/core. I also have a Geforce 6800 graphics card, so that's good enough for this game as well. 1 gig of RAM but I'm not sure if that's enough for this game (read on)
When I'm in the middle of a turn, on a display screen, a single core usage is running at around 60-70%. When I check the graph in the Task Manager, it's giving ~50% of the processor usage to kernel times. This is for a brand new game. I'm also getting around a 15 page faults per second, with 150M of Ram usage, and the same amount in the swap file.
I hit around 40% for kernel times on a single core when I'm just at the Quickstart/New Game/Resume game splash screen, and it's not minimized.
When I turn Video Memory Usage to Auto the kernel times bump up to 95% of the CPU usage on the splash screen, and it lags badly everywhere. So I put it on safe. Anything other that Direct3D T&L HAL gives a slight bump on processor usage, so I put it on that one.
When I am actually changing turns, the kernel times graph of cpu usage goes to zero while the CPU remains constant. Page faults go to zero, except in the post-processing of player turns where it skyrockets.
########################
Now for the memory leak. I like to play huge but slow games against the AI. So I've got a ~220 system ancient galaxy game going on, but I can only play around 20-40 turns before SE5 is using 700M of RAM and over a gig of my swap file. Is this telling me I need more ram to play this game?
If I try to play a couple more turns of this while it lags horribly, it'll soon give me an error telling me that it's unable to autosave the game. Regular saving gives the same problem.
I then only have to quit the entire program, then restart it, and reload my last save from that galaxy, and my memory usage is back down to reasonable 150Mish levels.
############################
I made the following modifications to my data files:
Star systems max out at 255, large number of stars range from 200-255
All culture types get 50 bonuses to research and shipyard production
A lot more system names (I was getting blank system names everywhere otherwise)
I play windowed mode for the game. (Fullscreen doesn't appear to make a difference)
I've also set the game to have an affinity for one core, as I've heard that helps.
###########################
Any ideas anyone?
Re: CPU usage and a memory leak
A little bit? Maybe...
My current game has a nice 100Mb per turn increase in memory.
(Which means i have to restart the game after like 3-4 turns, so be happy that you can run it for even more turns
)
If you use PBW (play by web) it does not really matter, as you usually only do one turn and then shut down the game. But for single player, i consider this memory leak the most gamestopping bug. Hopefully it gets fixed soon. 
~~~~
http://wiki.spaceempires.net - Visit the SpaceEmpires Wiki and help improving it. 

Re: CPU usage and a memory leak
With the game as it is don't you "win" long before you conquer all the other systems anyway? I mean aren't you twice the size of everybody else after 40 turns? If you didn't have the memory leak and were playing hundreds of turns you'd get bored long before you "conquered" the whole galaxy. All IMO, obviously, and not to say you shouldn't be able to play whatever way you want.
Re: CPU usage and a memory leak
One observation about the memory leak is that seting up an auto save may make it worse it would apear to on both of the systems I run. I have noticed that when the game grinds to a halt it is always during the end of turn process which is where the game auto saves.
Swiching in and out of the game seems to make it worse with the more times you do that. Alt Tab on both of my set ups crashes the game every time I try it so I dont even consider using it any more.
Generaly you will see the litle virtual memory low alet when you get back to the desk top

Re: CPU usage and a memory leak
Personally I have no problem with the memory leak but then again, I play smaller scale games with fewer AI and systems. Furthermore, these days I select "Paradise" Quadrants as defined in FQM - I think I read somewhere that Nebulae and such tax the memory further?
Anyway, I don't believe in having lots of AI when they're still incompetent at present. Once we have some decent AI code (I'm expecting this to take 6~12 months) then perhaps I'll consider starting a bigger game again.
---Sig---
Playing Touhou games (Go here if interested . No, nobody else is that good/insane as that replay). No rush for SE V bug fixing.
Re: CPU usage and a memory leak
It is however a real pain for those of us who like to play long games on large maps even so I tend to use a medium number of empires which tends to result in something around ten including mine. The few times I have tried the minimum, number I have ended up with three including mine on one occasion all the AI empires where neutrals
EDIT Can confirm that whatever is causing the leak seems to be related to the workings of AI empires




Re: CPU usage and a memory leak
It is a known bug, it doesnt really matter what kind of computer you have.. the memory leak keeps getting worse. It does ok for awhile if you just run the default # of systems, I do like games with max systems though. Unfortunately increasing the max # of systems accelerates the memory leak a little bit.