Heya all,
I've just come across some very annoying CPU usage spike whilst playing a game. Basically, the CPU was going through cycles where it'd spike at 100%, then drop to normal for a while before spiking again. This was in r6630.
I have attached screenshots showing the CPU usage on the title screen and in game (both paused and unpaused). The title screen and paused game both have <5% CPU usage, whilst the running game has 50% and massive slowdown.
The spiking can be seen in the CPUUsage_PausedInGame screen. After the period of low CPU use where the game was paused the game then spikes before going back down to ~40% then <10%. After a very brief period of low usage it then goes back up to max usage.
These screenshots were taken from a dual core machine so the CPU usage from the game never goes over 50% (and should never have hit anything even close to that in the first place).
There is also attached a savegame attached from where this was occurring. I have tested this on two machines (an Opteron 165 with 2GB RAM and a Sempron 2400+ with 1GB ram) which both exhibited the same behaviour, so the problem is reproducible.
-----
Aside from that, I also played around with the options afterwards. It seems like the two options that affected it were "Construction speed of competitors" and "Intelligence of competitors", both under difficulty. Pathfinding was checked, but didn't seem to make any visible difference.
Of those, the construction speed had a much more significant impact. Increasing intelligence from low to high would have a short but consistent spike, while an increase of construction speed from very low to very high would render the game unplayable.
This was using the normal AI. The experimental AI was not checked at all.
I think that's about it, but if anyone wants more details, let me know.
EDIT: Just checked in v0.4.8, and it seems to be there as well, but not to the same extent.
Massive CPU Usage - possibly the AI?
Moderator: OpenTTD Developers
-
- Engineer
- Posts: 5
- Joined: 30 Sep 2006 16:39
Massive CPU Usage - possibly the AI?
- Attachments
-
- Pundingham Transport, 8th Jul 1950.sav
- Savegame used for screenshots.
- (1.63 MiB) Downloaded 78 times
-
- CPUUsageScreens.rar
- CPU usage screenshots.
- (780.42 KiB) Downloaded 77 times
- bobingabout
- Tycoon
- Posts: 1850
- Joined: 21 May 2005 15:10
- Location: Hull, England
autosave?
the path finder is also a real juice sucker.
and you are running in 8 bit mode(which is default) modern computers don't like that, and you can increase performance by editing openttd.cfg and editing the fullscreen BPP to 32.
the path finder is also a real juice sucker.
and you are running in 8 bit mode(which is default) modern computers don't like that, and you can increase performance by editing openttd.cfg and editing the fullscreen BPP to 32.
JPG SUX!!! USE PNG!!!
There are times when JPG is useful, TTD screenshots is not one of them. Please use PNG instead.
[/url]
There are times when JPG is useful, TTD screenshots is not one of them. Please use PNG instead.
[/url]
-
- Engineer
- Posts: 5
- Joined: 30 Sep 2006 16:39
Autosave is set to 12 months, so it's not that.
The game is halfway through the first year, with a grand total of 17 vehicles (4 trains, 10 road vehicles and 3 aircraft). I'm pretty sure that isn't going to require enough number-crunching to cause it.
Changed BPP from 8 to 32, didn't make any difference.
The game is halfway through the first year, with a grand total of 17 vehicles (4 trains, 10 road vehicles and 3 aircraft). I'm pretty sure that isn't going to require enough number-crunching to cause it.
Changed BPP from 8 to 32, didn't make any difference.
Where the problems solved when you turned off the AI?
Don't panic - My YouTube channel - Follow me on twitter (@XeryusTC) - Play Tribes: Ascend - Tired of Dropbox? Try SpiderOak (use this link and we both get 1GB extra space)

OpenTTD: manual #openttdcoop: blog | wiki | public server | NewGRF pack | DevZone

OpenTTD: manual #openttdcoop: blog | wiki | public server | NewGRF pack | DevZone







-
- Engineer
- Posts: 5
- Joined: 30 Sep 2006 16:39
Who is online
Users browsing this forum: Amazon [Bot], Bing [Bot] and 20 guests