OpenTTD CPU Usage

OpenTTD is a fully open-sourced reimplementation of TTD, written in C++, boasting improved gameplay and many new features.

Moderator: OpenTTD Developers

Post Reply
User avatar
Dave
Moderator
Moderator
Posts: 17243
Joined: 26 Dec 2005 20:19
Location: North London

OpenTTD CPU Usage

Post by Dave »

Don't know if it's increased, but my laptop is having to work a lot harder to keep up since 1.4.

This may be my laptop's problem. Could you please advise?

Cheers.
Official TT-Dave Fan Club

Dave's Screenshot Thread! - Albion: A fictional Britain
Flickr


Why be a song when you can be a symphony? r is a...
User avatar
planetmaker
OpenTTD Developer
OpenTTD Developer
Posts: 9432
Joined: 07 Nov 2007 22:44
Location: Sol d

Re: OpenTTD CPU Usage

Post by planetmaker »

Dave wrote:Don't know if it's increased, but my laptop is having to work a lot harder to keep up since 1.4.

This may be my laptop's problem. Could you please advise?

Cheers.
Do you by chance play with CargoDist enabled (as opposed to earlier)? CarogDist+Linkgraph overlay on map enabled can give twice the CPU consumption compared to previous versions (people always cry for multi-core support, here it helps :) ).

Does the CPU usage differ also when you compare it for an (old) savegame which you open in 1.3.3 and then open it in 1.4.0?
User avatar
Dave
Moderator
Moderator
Posts: 17243
Joined: 26 Dec 2005 20:19
Location: North London

Re: OpenTTD CPU Usage

Post by Dave »

planetmaker wrote:
Dave wrote:Don't know if it's increased, but my laptop is having to work a lot harder to keep up since 1.4.

This may be my laptop's problem. Could you please advise?

Cheers.
Do you by chance play with CargoDist enabled (as opposed to earlier)? CarogDist+Linkgraph overlay on map enabled can give twice the CPU consumption compared to previous versions (people always cry for multi-core support, here it helps :) ).

Does the CPU usage differ also when you compare it for an (old) savegame which you open in 1.3.3 and then open it in 1.4.0?
Fair point. I appreciate that the usage is still not necessarily excessive, but unfortunately my laptop is over 4 years old now and gets very excited about very little.

Certainly, this is the first time I've used CargoDist in anger. Maybe I will have to think about that.

Thanks man!
Official TT-Dave Fan Club

Dave's Screenshot Thread! - Albion: A fictional Britain
Flickr


Why be a song when you can be a symphony? r is a...
User avatar
Redirect Left
Tycoon
Tycoon
Posts: 7249
Joined: 22 Jan 2005 19:31
Location: Wakefield, West Yorkshire

Re: OpenTTD CPU Usage

Post by Redirect Left »

I noticed the same thing, setting 'Update distrobution graph every X days' to over 20 & 'Distribution Accuracy' to under 10 had a noticable difference on my Phenom 4X 3.2GHz

Naturally, this poorly affects CargoDist functionality, and i was running on a 2048 x 2048 map, with > 700 trains. So it may affect your game less or more.
Image
Need some good tested AI? - Unofficial AI Tester, list of good stuff & thread is here.
User avatar
FLHerne
Tycoon
Tycoon
Posts: 1543
Joined: 12 Jul 2011 12:09
Location: St Ives, Cambs, UK

Re: OpenTTD CPU Usage

Post by FLHerne »

Dave wrote:Fair point. I appreciate that the usage is still not necessarily excessive, but unfortunately my laptop is over 4 years old now and gets very excited about very little.

Certainly, this is the first time I've used CargoDist in anger. Maybe I will have to think about that.
That makes it two years younger than mine, which seems reasonably happy with CargoDist. :? Try twiddling the calculation-time/accuracy knobs, those do make a bit of a difference.

Unless it's one of those daft netbook things, in which case you should find a big hammer. :twisted:
Temporary Permanent signature filling text. Content coming soon delayed indefinitely! Oh, and I have had a screenshot thread.
Linux user (XMonad DWM/KDE, Arch), IRC obsessive and rail enthusiast. No longer building robots; now I ring church bells.
Author of an incredibly boring stickied post about NewGRFs.
Auge
Director
Director
Posts: 636
Joined: 23 Oct 2006 02:07
Location: Berlin

Re: OpenTTD CPU Usage

Post by Auge »

Hello

An additional notice: you can enable or disable CargoDist for the different freights. There are three settings. "symmetric" fits best for passengers, post and valuables, "asymmetric" for other freight. The thirs setting "manual" disables CargoDist for the freight type. Maybe it saves several CPU cycles to optimise the settings.

Tschö, Auge
User avatar
Redirect Left
Tycoon
Tycoon
Posts: 7249
Joined: 22 Jan 2005 19:31
Location: Wakefield, West Yorkshire

Re: OpenTTD CPU Usage

Post by Redirect Left »

Auge wrote: An additional notice: you can enable or disable CargoDist for the different freights.
I've noticed that even if you disable it for everything (I presume this is what 'manual' does), the CPU usage is still noticably affected by altering the other settings, timings and such. Which to me says that even if you disable it, OpenTTD is still doing internal work related to it, even if its off?
Image
Need some good tested AI? - Unofficial AI Tester, list of good stuff & thread is here.
Eddi
Tycoon
Tycoon
Posts: 8272
Joined: 17 Jan 2007 00:14

Re: OpenTTD CPU Usage

Post by Eddi »

try with a savegame that started disabled in the first place.
User avatar
Redirect Left
Tycoon
Tycoon
Posts: 7249
Joined: 22 Jan 2005 19:31
Location: Wakefield, West Yorkshire

Re: OpenTTD CPU Usage

Post by Redirect Left »

Eddi wrote:try with a savegame that started disabled in the first place.
I am using a savegame from several versions ago, i've been playing the same game for a few month. Would that not have started disabled, due to not knowing what cargodist even was at the time?
Image
Need some good tested AI? - Unofficial AI Tester, list of good stuff & thread is here.
User avatar
3iff
Tycoon
Tycoon
Posts: 1094
Joined: 21 Oct 2005 09:26
Location: Birmingham, England

Re: OpenTTD CPU Usage

Post by 3iff »

Something I came across recently, I had tried a 32bpp game mode but it was sluggish and I reverted to 8bpp...BUT when I loaded OTTD it jumped into 32bpp mode (and I hadn't realised). That severely slowed down my game. I had to force the blitter to 8bpp-optimised and it's behaved itself since.
Eddi
Tycoon
Tycoon
Posts: 8272
Joined: 17 Jan 2007 00:14

Re: OpenTTD CPU Usage

Post by Eddi »

i meant a game where cargodist was never enabled.


and if things are sluggish with 32bpp enabled, then try increasing the sprite cache size in openttd.cfg
User avatar
3iff
Tycoon
Tycoon
Posts: 1094
Joined: 21 Oct 2005 09:26
Location: Birmingham, England

Re: OpenTTD CPU Usage

Post by 3iff »

Eddi wrote:and if things are sluggish with 32bpp enabled, then try increasing the sprite cache size in openttd.cfg
I've only briefly tried 32bpp and had to find out if that was the cause of sluggishness...along with a relatively old PC. The sprite cache was 128. Would that have been high enough?
User avatar
planetmaker
OpenTTD Developer
OpenTTD Developer
Posts: 9432
Joined: 07 Nov 2007 22:44
Location: Sol d

Re: OpenTTD CPU Usage

Post by planetmaker »

3iff wrote:
Eddi wrote:and if things are sluggish with 32bpp enabled, then try increasing the sprite cache size in openttd.cfg
I've only briefly tried 32bpp and had to find out if that was the cause of sluggishness...along with a relatively old PC. The sprite cache was 128. Would that have been high enough?
I'd actually recommend the maximum of 512
User avatar
planetmaker
OpenTTD Developer
OpenTTD Developer
Posts: 9432
Joined: 07 Nov 2007 22:44
Location: Sol d

Re: OpenTTD CPU Usage

Post by planetmaker »

Redirect Left wrote:
Eddi wrote:try with a savegame that started disabled in the first place.
I am using a savegame from several versions ago, i've been playing the same game for a few month. Would that not have started disabled, due to not knowing what cargodist even was at the time?
If you started playing it with 1.3.x or earlier and never changed the cargodist setting when that map was loaded, then it will never have been enabled for that particular savegame.
Adamos
Engineer
Engineer
Posts: 2
Joined: 20 Apr 2014 19:58

Re: OpenTTD CPU Usage

Post by Adamos »

I have noticed CPU usage increased even after playing OpenTTD. It is 2 days after i closed the game and my laptops CPU (Intel B980) is still used by System and Interruption Requests by 50-80%. These two processes used my CPU during gameplay and didnt stop even after closing the game. I played for 3 days almost nonstop before. I played Vaulters Hard Game Pack with CARSTs WORLD SCENARIO 8196x4096 map.

My game crashed several times - mostly caused by International Airport Issue (destroying anyone of this largest airport crashes the game and one of these airports in my game had "ghost hangar" where could every airplane easily go in, but never out without crashing the game...)

Anybody noticed similar after-game CPU usage issue?

(restarting or turning off my laptop doesnt help... these processes are still running)
User avatar
FLHerne
Tycoon
Tycoon
Posts: 1543
Joined: 12 Jul 2011 12:09
Location: St Ives, Cambs, UK

Re: OpenTTD CPU Usage

Post by FLHerne »

Adamos wrote:restarting or turning off my laptop doesnt help... these processes are still running
That pretty much rules out OpenTTD as a potential cause - there's no way a process can keep running across shutdown and reboot unless the OS starts it again for some reason.
Temporary Permanent signature filling text. Content coming soon delayed indefinitely! Oh, and I have had a screenshot thread.
Linux user (XMonad DWM/KDE, Arch), IRC obsessive and rail enthusiast. No longer building robots; now I ring church bells.
Author of an incredibly boring stickied post about NewGRFs.
User avatar
Phreeze
Director
Director
Posts: 514
Joined: 12 Feb 2010 14:30
Location: Luxembourg

Re: OpenTTD CPU Usage

Post by Phreeze »

start performance monitor -> disk to see what process is causing disk I/Os.

or: task manager -> processes -> add column (in view or right click a column) -> read I/Os or write I/O -> check what process is AUGMENTING many IOs
Post Reply

Return to “General OpenTTD”

Who is online

Users browsing this forum: No registered users and 31 guests