Bay 12 Games Forum

Please login or register.

Login with username, password and session length
Advanced search  
Pages: 1 [2] 3

Author Topic: First Power PC Release Up  (Read 7532 times)

Toady One

  • The Great
    • View Profile
    • http://www.bay12games.com
Re: First Power PC Release Up
« Reply #15 on: March 05, 2008, 08:37:00 pm »

I haven't looked at the title smenu CPU use on my Mini.  Is it high for everybody?  If it isn't, it's likely an OpenGL issue.
Logged
The Toad, a Natural Resource:  Preserve yours today!

Jonathan S. Fox

  • Bay Watcher
    • View Profile
    • http://www.jonathansfox.com/
Re: First Power PC Release Up
« Reply #16 on: March 06, 2008, 12:42:00 am »

quote:
Originally posted by Toady One:
<STRONG>I haven't looked at the title smenu CPU use on my Mini.  Is it high for everybody?  If it isn't, it's likely an OpenGL issue.</STRONG>

Sits at about ~50% cpu at the menu on my (Intel-based, not Power PC) 2.33 GHz Core 2 Duo PowerBook.

Logged

mattmoss

  • Bay Watcher
    • View Profile
Re: First Power PC Release Up
« Reply #17 on: March 06, 2008, 08:13:00 pm »

quote:
Originally posted by Jonathan S. Fox:
<STRONG>

Sits at about ~50% cpu at the menu on my (Intel-based, not Power PC) 2.33 GHz Core 2 Duo PowerBook.</STRONG>


If you're seeing 50% on a dual-core processor, that means you've maxed out one core. I don't expect DF makes use of multicore.

Logged

Toady One

  • The Great
    • View Profile
    • http://www.bay12games.com
Re: First Power PC Release Up
« Reply #18 on: March 06, 2008, 08:17:00 pm »

Is it happening over there too?  Does the Mac timer loop not release control to the OS for some reason?
Logged
The Toad, a Natural Resource:  Preserve yours today!

numerobis

  • Bay Watcher
    • View Profile
Re: First Power PC Release Up
« Reply #19 on: March 06, 2008, 11:57:00 pm »

FWIW, in some code I've written:
code:
static void timerloop(int) {
 World :: progress();
 glutPostRedisplay();
 glutTimerFunc(50, timerloop, 0); // 20 fps
}

uses about 4% CPU targetting the OpenGL and GLUT frameworks.  Targetting Mesa I get 75% CPU.  World :: progress() and the redisplay do essentially nothing.

Oh, and perhaps I should mention I get high CPU utilization on the title page also.

Edits: idiot smileys.

[ March 06, 2008: Message edited by: benoit.hudson ]

[ March 06, 2008: Message edited by: benoit.hudson ]

Logged

Steph

  • Escaped Lunatic
    • View Profile
Re: First Power PC Release Up
« Reply #20 on: March 07, 2008, 12:46:00 pm »

I can only concure for the 70%CPU at the menu screen. In fact, my powerbool is getting so hot running DF that I can't keep it more than 1/2 hour on my lap...

But I know first hand that multi-platform development is really not easy, and I'm sure our international Toady of dwarfitude will fix that someday!  :)

 Steph

Logged
-
Steph

numerobis

  • Bay Watcher
    • View Profile
Re: First Power PC Release Up
« Reply #21 on: March 07, 2008, 03:41:00 pm »

quote:
Originally posted by mattmoss:
<STRONG>If you're seeing 50% on a dual-core processor, that means you've maxed out one core.</STRONG>

The usual Unix (and thus OSX) behaviour is to report the % of time that the process is on-CPU.  So 100% means it's using an entire core.  200% means it's using two.

Logged

Jonathan S. Fox

  • Bay Watcher
    • View Profile
    • http://www.jonathansfox.com/
Re: First Power PC Release Up
« Reply #22 on: March 07, 2008, 09:45:00 pm »

quote:
Originally posted by benoit.hudson:
<STRONG>The usual Unix (and thus OSX) behaviour is to report the % of time that the process is on-CPU.  So 100% means it's using an entire core.  200% means it's using two.</STRONG>

Yeah, at its most extreme, the game lags at about 100%, with both cores reporting about 30-50% down time. As far as the game's workload goes, from ~50-52% on the menu, the game hits 70-90% during play with spikes up to 101% or so (OS X reports 4 threads associated with DF, so that's probably what puts it over the edge, but only one of them is the workhorse -- it's being balanced across both cores, but is not seeing much parallel action). When paused it still rests at 60-70%. I'm not sure if it's code running slowly, or something wrong with the way it's yielding time when idle, or both.

Incidentally, I don't know if this is "as intended" at the moment or not, but I don't see any difference in the game's speed when I change the init setting on FPS and G_FPS from 1 to 10 to 15 to 100. I thought maybe 1 FPS was below the minimum and it was just doing a default, but just eyeballing it, I'm pretty sure even at 15 it's going faster than how I've set it. It's very hard to tell for sure though, since I know the FPS indicator doesn't work on the port.

But I don't want to sound complain-y, just trying to help! Whatever speed or workload issues there might be, at the end of the day, the game runs much, much smoother and faster than it did under emulated Windows for me.  :D Thanks a ton for this.

Logged

numerobis

  • Bay Watcher
    • View Profile
Re: First Power PC Release Up
« Reply #23 on: March 08, 2008, 01:05:00 am »

quote:
Originally posted by Jonathan S. Fox:
<STRONG>Yeah, at its most extreme, the game lags at about 100%, with both cores reporting about 30-50% down time.</STRONG>

Isn't there some relatively easy way to hint that the OS should pin the process to a given CPU?  I can't seem to find the search terms that would show me how to do that.

Logged

Jonathan S. Fox

  • Bay Watcher
    • View Profile
    • http://www.jonathansfox.com/
Re: First Power PC Release Up
« Reply #24 on: March 08, 2008, 02:43:00 am »

quote:
Originally posted by benoit.hudson:
<STRONG>Isn't there some relatively easy way to hint that the OS should pin the process to a given CPU?  I can't seem to find the search terms that would show me how to do that.</STRONG>

I don't think there's an easy way to do this with OS X 10.4. Maybe it'd be different if I upgraded to the latest version, as they apparently worked on multiprocessor and dual core support. But even without taking advantage of processor affinity, the cores are physically on the same chip and share a common L2 cache.

Logged

Align

  • Bay Watcher
    • View Profile
Re: First Power PC Release Up
« Reply #25 on: March 08, 2008, 05:29:00 am »

Don't you have something like the WinXP process/task manager?
Logged
My stray dogs often chase fire imps back into the magma pipe and then continue fighting while burning and drowning in the lava. Truly their loyalty knows no bounds, but perhaps it should.

Jonathan S. Fox

  • Bay Watcher
    • View Profile
    • http://www.jonathansfox.com/
Re: First Power PC Release Up
« Reply #26 on: March 08, 2008, 06:06:00 am »

Yeah, it's tucked away a bit more than the task manager is, but we have the "activity monitor" which is basically the same thing. They're not exactly the same though, each has some things the other doesn't, and I don't see anything about assigning processor affinity or anything that sounds vaguely related in the activity monitor.
Logged

mattmoss

  • Bay Watcher
    • View Profile
Re: First Power PC Release Up
« Reply #27 on: March 08, 2008, 07:56:00 am »

quote:
Originally posted by Jonathan S. Fox:
<STRONG>
Incidentally, I don't know if this is "as intended" at the moment or not, but I don't see any difference in the game's speed when I change the init setting on FPS and G_FPS from 1 to 10 to 15 to 100. I thought maybe 1 FPS was below the minimum and it was just doing a default, but just eyeballing it, I'm pretty sure even at 15 it's going faster than how I've set it. It's very hard to tell for sure though, since I know the FPS indicator doesn't work on the port.</STRONG>

At the moment, for the Mac, those FPS settings are going to be ignored... The game's main loop runs on a fixed timer, and the render/sim are not separated as they are on Windows. This was the easiest way to get the game up and running.

The plan for the future is to make the Mac app's main loop more like the Window app's main loop, but it will be a little bit before that happens.

Logged

kaosfere

  • Escaped Lunatic
    • View Profile
    • http://sigilism.com
Re: First Power PC Release Up
« Reply #28 on: March 08, 2008, 08:40:00 am »

quote:
Originally posted by Jonathan S. Fox:
<STRONG>

I don't think there's an easy way to do this with OS X 10.4. Maybe it'd be different if I upgraded to the latest version, as they apparently worked on multiprocessor and dual core support. But even without taking advantage of processor affinity, the cores are physically on the same chip and share a common L2 cache.</STRONG>


From what I can find scanning the developer documentation, there is no way to declare processor affinity, but you are able to declare thread affinity so that threads that should share L2 can be preferentially sorted to the same cache.  As you note, however, on systems which are only multi-core, and not multi-processor, there shouldn't be any need to do this.


http://developer.apple.com/releasenotes/Performance/RN-AffinityAPI/index.html

[ March 08, 2008: Message edited by: kaosfere ]

Logged

poesel

  • Bay Watcher
    • View Profile
Re: First Power PC Release Up
« Reply #29 on: March 08, 2008, 02:11:00 pm »

Well, I'm no expert but since I experience the same symptons on my single core PPC I doubt its a multiprocessor problem.
Logged
Pages: 1 [2] 3