High CPU load in background

Forum rules
Please don't bump threads here if you have a problem - it will often be forgotten about if you do. Instead, make a new thread here.

Post a reply

Smilies
:D :) :( :o :shock: :? 8-) :lol: :x :P :oops: :cry: :evil: :twisted: :roll: :wink: :geek: :ugeek: :!: :?: :idea: :arrow: :| :mrgreen: :3: :wub: >:( :blergh:
View more smilies

BBCode is OFF
Smilies are ON

Topic review
   

Expand view Topic review: High CPU load in background

Re: High CPU load in background

by Major Cooke » Sun Feb 08, 2015 9:42 am

I don't know if it was this bugfix or possibly the code sanity update, but one of the changes made most recently introduced a crash in GZDoom.

http://forum.drdteam.org/viewtopic.php?f=24&t=6533 Already reported here.

Re: High CPU load in background

by Graf Zahl » Sat Feb 07, 2015 7:32 am

Fixed indeed. It's amazing how I literally could hear the difference when starting 3 instances of GZDoom - it's so much more quiet now... :mrgreen:

Re: High CPU load in background

by _mental_ » Sat Feb 07, 2015 7:12 am

Can't test on Windows at the moment, but on OS X the issue is gone.
Taking into account that excessive CPU load was caused by a busy loop in common code, the problem should be solved for all platforms. Running multiple instances should be smooth now.

Re: High CPU load in background

by Graf Zahl » Sat Feb 07, 2015 6:08 am

Applied, now I need to run some tests.

Re: High CPU load in background

by Graf Zahl » Thu Feb 05, 2015 4:05 am

I'll check this evening.

Re: High CPU load in background

by edward850 » Thu Feb 05, 2015 3:46 am

Re: High CPU load in background

by Graf Zahl » Thu Feb 05, 2015 3:20 am

Will anything be done about this? It's really annoying and if nothing happens I'll be forced to undo it as it causes a shitload of problems if the game is put in the background.

Here's another one:

http://forum.drdteam.org/viewtopic.php?f=24&t=6527

Re: High CPU load in background

by randi » Fri Jan 02, 2015 7:06 pm

Enjay wrote:once I had a particular game in focus, I was still able to play that copy of the game (Doom2 map01) with no obvious difficulties:
Windows gives a slight priority boost to the application with the active window, so that's probably why.

Re: High CPU load in background

by Gez » Fri Jan 02, 2015 3:44 pm

Any statistics can go above 100% due to rounding effects.

To give a simple example: Suppose you have 15 processes and they all inflict a perfectly identical workload on the CPU. 100/15=6.66666666666....% The CPU usage function reports an integer, so it rounds it up to 7%. Then when you make the tally, 15*7=105, so the reported CPU load is 105%.

Re: High CPU load in background

by Enjay » Fri Jan 02, 2015 3:07 pm

Well, there's 2% left over... :lol:

No idea why it was still working fine and, although I don't remember what the values were, presumably some of the other processes were doing something that had a CPU load.

I know it sounds like a silly question but can the CPU usage as reported in the task manager go above 100%? I know CPU usage can't actually be above 100% but perhaps there is something about how usage is reported?

[edit]
My computer got a little bit choppy this time as it flitted between giving attention to different instances but, once I had a particular game in focus, I was still able to play that copy of the game (Doom2 map01) with no obvious difficulties:
Spoiler:

Re: High CPU load in background

by Graf Zahl » Fri Jan 02, 2015 2:58 pm

Amazing that it's still responsive with this high CPU load... If you add up the percentages you are at 100%.

Re: High CPU load in background

by Enjay » Fri Jan 02, 2015 1:41 pm

So, you're cooking the Pi?

No idea why, but I'm just not getting this problem. I can run multiple instances of ZDoom or GZDoom, windowed or not and still have a perfectly responsive machine.

Image

Re: High CPU load in background

by Csonicgo » Fri Jan 02, 2015 12:20 pm

It turns the Pi into a small oven, so there's that.

Re: High CPU load in background

by edward850 » Thu Jan 01, 2015 6:00 pm

After toying with the rewind function a little bit, I think I may have a grasp on what the actual bug was. Something about how g_ticker is key control for pausing everything, despite itself being a critcal aspect doesn't make much sense, and it's screwing with player input a lot. It needs to stop running the playsim entirely, while still ticking.

Unless someone beats me to it, I may restructure it a little bit to make it more sane. (And maybe make timedemo a little less fatal.)

As for why my current fix is causing problems? I honestly never noticed them. It doesn't seem to cause any sort of unreasonable load on my system.
Funny that.

Re: High CPU load in background

by Gez » Thu Jan 01, 2015 1:51 pm

How about conditioning the new behavior to be only enabled when playing or recording a demo?

Top