Bay 12 Games Forum

Please login or register.

Login with username, password and session length
Advanced search  
Pages: 1 ... 7 8 [9]

Author Topic: The threaded pathfinding thread with the previously unhelpful title.  (Read 14496 times)

Tormy

  • Bay Watcher
  • I shall not pass?
    • View Profile
Re: The threaded pathfinding thread with the previously unhelpful title.
« Reply #120 on: January 29, 2009, 08:42:48 am »

I am just wondering...separating the in-game features would be possible / cores? [I am really clueless, so if the question makes no sense, just let me know.. :D]

Temperature, Weather + all associated processes -> Core1
Pathfinding -> Core2
Fluids, Cave-ins etc -> Core3
etc.
Logged

Andir

  • Bay Watcher
    • View Profile
Re: The threaded pathfinding thread with the previously unhelpful title.
« Reply #121 on: January 29, 2009, 12:50:33 pm »

I am just wondering...separating the in-game features would be possible / cores? [I am really clueless, so if the question makes no sense, just let me know.. :D]

Temperature, Weather + all associated processes -> Core1
Pathfinding -> Core2
Fluids, Cave-ins etc -> Core3
etc.
Possible, yes... but it's not needed.  The operating systems have schedulers that will automatically assign tasks to the core/processor that's least used.  Doing it manually would likely be not as efficient.
Logged
"Having faith" that the bridge will not fall, implies that the bridge itself isn't that trustworthy. It's not that different from "I pray that the bridge will hold my weight."

ShadeJS

  • Bay Watcher
    • View Profile
Re: The threaded pathfinding thread with the previously unhelpful title.
« Reply #122 on: January 29, 2009, 01:02:01 pm »

I am just wondering...separating the in-game features would be possible / cores? [I am really clueless, so if the question makes no sense, just let me know.. :D]

Temperature, Weather + all associated processes -> Core1
Pathfinding -> Core2
Fluids, Cave-ins etc -> Core3
etc.

Generally speaking load balancing is a kernel function-- It something that Linux put a lot of thought into long ago and, Unix before that, and where Windows is catching up. It's actually one of the most critical functions in OS design. Basically, you want to try to spread the load as much as possible-- but if you're too aggressive you can spend all of your time shuffling processes and too little time actually processing (too low a processor affinity.). If you're not aggressive enough you'll end up with some CPUs cores saturated while other sit idle (too high an affinity). There's the case where you have something like DF hosing one core, but balancing the other 100 or so (or many many more in some cases.) 'light' processes is tricky. There are real gains in process management if you only have one core (AKA- There's less to manage), and as a general rule the more Cores / CPUs you have the more affinity there should be because the management overhead generally doesn't scale linearly... At a certain point all OSes 'go pathological' and you (The Kernel) spends so much time trying to manage threads / processes / etc and balancing loads that adding more cores / CPUs can decrease performance... At that point you should be looking at grid, distributed, or parallel solutions...

edit: But one would hope that's well beyond the scope of DF.
« Last Edit: January 29, 2009, 01:03:33 pm by ShadeJS »
Logged

Andir

  • Bay Watcher
    • View Profile
Re: The threaded pathfinding thread with the previously unhelpful title.
« Reply #123 on: January 29, 2009, 01:45:16 pm »

No way... I totally want to see a cluster built for running a whole DF world at once.
Logged
"Having faith" that the bridge will not fall, implies that the bridge itself isn't that trustworthy. It's not that different from "I pray that the bridge will hold my weight."

Tormy

  • Bay Watcher
  • I shall not pass?
    • View Profile
Re: The threaded pathfinding thread with the previously unhelpful title.
« Reply #124 on: January 30, 2009, 07:31:32 am »

I am just wondering...separating the in-game features would be possible / cores? [I am really clueless, so if the question makes no sense, just let me know.. :D]

Temperature, Weather + all associated processes -> Core1
Pathfinding -> Core2
Fluids, Cave-ins etc -> Core3
etc.
Possible, yes... but it's not needed.  The operating systems have schedulers that will automatically assign tasks to the core/processor that's least used.  Doing it manually would likely be not as efficient.

Ah, thanks for the explanation.  :)
Logged
Pages: 1 ... 7 8 [9]