Page 1 of 1

bzflag.exe - cpu utilization > 90%

Posted: Thu Mar 02, 2006 1:27 pm
by bamf.
Lately I have been having trouble with lag. I attribute most of this to my ISP, (they see a problem but have yet to find a resolution). But after investigating a little, I've noticed when playing BZ for a few minutes, that my CPU fan will kick in and run continuously until I quit. I believe my lag (as shown by lagstats) spikes even higher during this time. Checking the processes in Windows Task Manager, bzflag.exe is eating all the CPU time (consistently over 90%). Now, I never paid much attention to this in the past, so this could be normal for bzflag to use that much of the CPU? I've also run the same tests with all non-essential processes stopped (including Anti-virus). Any thoughts (besides get Linux)?

PC Info:
Pentium 4 - 3ghz
1gb ram
Windows Firewall (haha) - always disabled
Vid - GeForce FX 5200
OS - WinXP pro - all patches

Cheers!

Posted: Thu Mar 02, 2006 1:44 pm
by joevano
Try the latest video driver:
http://www.nvidia.com/object/winxp_2k_81.98.html

ForceWare Release 80
Version: 81.98
Release Date: February 7, 2006
WHQL Certifie

Posted: Thu Mar 02, 2006 4:00 pm
by bamf.
Thanks, but already running that version of the driver.

Posted: Thu Mar 02, 2006 4:48 pm
by JPT
hmmm... Check if a different service is using the CPU, too

Re: bzflag.exe - cpu utilization > 90%

Posted: Thu Mar 02, 2006 7:08 pm
by snick
bamf. wrote:Lately I have been having trouble with lag. I attribute most of this to my ISP, (they see a problem but have yet to find a resolution). But after investigating a little, I've noticed when playing BZ for a few minutes, that my CPU fan will kick in and run continuously until I quit. I believe my lag (as shown by lagstats) spikes even higher during this time. Checking the processes in Windows Task Manager, bzflag.exe is eating all the CPU time (consistently over 90%). Now, I never paid much attention to this in the past, so this could be normal for bzflag to use that much of the CPU?
It's not necessarily anything to worry about. BZFlag will use as much of
the available resources as it can. So, if your video card is fast, and the
operating system allows it, the game will pummel your cpu.

I notice that the latest CVS has an energy-saving option, which may be
of interest to you. This appears to be the relevant code:

--- BEGIN QUOTE ---

// limit the fps to save battery life by minimizing cpu usage
if (BZDB.isTrue("saveEnergy")) {
static TimeKeeper lastTime = TimeKeeper::getCurrent();
const float fpsLimit = BZDB.eval("fpsLimit");
if ((fpsLimit >= 1.0f) && !std::isnan(fpsLimit)) {
const float elapsed = float(TimeKeeper::getCurrent() - lastTime);
if (elapsed > 0.0f) {
const float period = (1.0f / fpsLimit);
const float remaining = (period - elapsed);
if (remaining > 0.0f) {
TimeKeeper::sleep(remaining);
}
}
}
lastTime = TimeKeeper::getCurrent();
} // end energy saver check

--- END QUOTE ---

The rest is here: http://tinyurl.com/rbztr

Please consult the devs for the most accurate info.

Regards,

Snick.

Re: bzflag.exe - cpu utilization > 90%

Posted: Thu Mar 02, 2006 8:13 pm
by snick
snick wrote:So, if your video card is fast, and the
operating system allows it, the game will pummel your cpu.
This may also be the case if your video card is not especially fast. It
all depends on the implementation details.

Snick.

Posted: Thu Mar 02, 2006 9:44 pm
by A Meteorite
A nVidia GeForce FX 5200 should be able to handle BZFlag just fine. I've heard of people using GeForce 4 MXs...

Have you tried changing the resolution and bit-depth?

Re: bzflag.exe - cpu utilization > 90%

Posted: Fri Mar 03, 2006 12:16 pm
by mistake
@snick
snick wrote: // limit the fps to save battery life by minimizing cpu usage
Uh Ah, maybe that was what was happening to me, my FPS sometimes droped from 180 to 8 FPS.
I thought that it was due to heat, that my computer turned itself down some nogges. Well, maybe it was the heat.
When does that BZFlagPowerSaver get triggered? For an idled player only?

@bamf

actually when playing bzflag, my CPU fan is doing lots of work too after some while.
I am on a laptop.
I found this application 8kfanGUI which I use to set the fan on maximun before I actually start playing, to prevent it from getting to warm in the fist place. That utility als reports the CPU temperature. Not sure for which systems it works. Maybe you find links there for other utilities that fit your setup.

When I check the CPU times for bzflag, mine is usually not that high, maybe due to the fact that when i look at my taskmanager, i have bzflag minimized. The only cases where i have seen a 90% CPU time is when bzflag was non-responsive and the process had to be killed.

In any case, to have a process that has 90% over a longer period of time is I think never good. This means that your os system itself doesn't get a lot of time for its jobs, which will degradate the overall performance of your computer.

Posted: Fri Mar 03, 2006 3:43 pm
by trepan
The default state for BZFlag is to run full-out, meaning
as close to 100% CPU usage as it can. The energy
saver mode will affect the current usage, as well as
window's state (ex: minized). If you have a dual-core
processor, then expect closer to 50% (bzflag is not
threaded).

Posted: Fri Mar 03, 2006 6:22 pm
by bamf.
Hmm, I replied to this post earlier but it doesn't appear. Thank you for all your responses. The energy saver feature looks interesting. Is this going to be a selectable feature?

Posted: Fri Mar 03, 2006 7:45 pm
by bamf.
Ok, I downloaded the latest build and my cpu fan is happy and presently napping. That takes care of that, now I just need to light a fire under my isp's arse to fix the circuit issue...

Thanks for help all.

Cheers!

Posted: Fri Mar 03, 2006 7:51 pm
by snick
bamf. wrote:Hmm, I replied to this post earlier but it doesn't appear. Thank you for all your responses. The energy saver feature looks interesting. Is this going to be a selectable feature?
In the CVS version of BZFlag I have, it's a menu option:

# Options->Display Settings->Energy Saver: On/Off

It is also affected by a variable set in the configuration file "config.cfg":

# set fpsLimit 50

Snick.