Bay 12 Games Forum

Please login or register.

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

Author Topic: Parallel Processing  (Read 4092 times)

Parallel Processing
« on: May 11, 2011, 01:59:56 pm »

I wasted tons of money on a computer with the following:
4 cores running at 2.9 Ghz
6 Gigabytes of memory
A graphics card with a 650Mhz engine speed and a 900Mhz memory clock speed, with a gigabyte of memory on the card

The graphics card works great. I have no graphical lag because OpenGL is the best state machine ever and utilizes my graphics card perfectally.

The game does not work great. I have tons of lag because Dwarf Fortress is 32 bit only, and can only use one out of four processor cores and two gigabytes out of six gigabytes of memory.

I have never grown to love multithreading so much in my life. Without 64 bit multithreading i can only use one fourth of my processing power and a third of my memory if i am stuck in 32 bit single threaded processing.

tldr; please rewrite all the OS code to work with 64 bit and multithreading so DF doesnt run slow as shit on my expensive ass computer  :D

edit: oh this has been suggested before i should have learned to use the search option, if toady doesnt have any plans to support multithreading how can he plan to support contemporary modestly priced PCs? all PCs you buy new have multiple cores now, besides maybe crapbooks er netbooks but they arent meant to play games anyways they are for browsing the internet with microsoft internet exploder or AOL's Nutscrape
« Last Edit: May 11, 2011, 02:06:37 pm by runningoutofcreativenames »
Logged

Frajic

  • Bay Watcher
    • View Profile
Re: Parallel Processing
« Reply #1 on: May 11, 2011, 02:06:18 pm »

It has been suggested ~1000 times, and Toady just can't be bothered reworking all the code to support multiple cores. At the very least not yet.
Logged
EoS company name: Vikings Inc.
Re: Parallel Processing
« Reply #2 on: May 11, 2011, 02:07:53 pm »

It has been suggested ~1000 times, and Toady just can't be bothered reworking all the code to support multiple cores. At the very least not yet.

Its not just that, for him, it is learning how multithreading works, and them implementing it properly. That would take FOREVER, his dissertation was in mathematics not CS
Logged

Draco18s

  • Bay Watcher
    • View Profile
Re: Parallel Processing
« Reply #3 on: May 11, 2011, 04:13:06 pm »

Logged

kaenneth

  • Bay Watcher
  • Catching fish
    • View Profile
    • Terrible Web Site
Re: Parallel Processing
« Reply #4 on: May 11, 2011, 08:32:12 pm »

Just run 4 copies of DF at once, one for each core  8)

Anyway, making DF multithreading at the end... won't work (very well) multithreading has to be in the core design, otherwise it's like converting a 2 wheel motorcycle into a 4 wheel car... yeah, you could add some wheels, and it might keep it from tipping over... but it's not the same.
Logged
Quote from: Karnewarrior
Jeeze. Any time I want to be sigged I may as well just post in this thread.
Quote from: Darvi
That is an application of trigonometry that never occurred to me.
Quote from: PTTG??
I'm getting cake.
Don't tell anyone that you can see their shadows. If they hear you telling anyone, if you let them know that you know of them, they will get you.

tolkafox

  • Bay Watcher
  • Capitalism, ho!
    • View Profile
    • Phantasm
Re: Parallel Processing
« Reply #5 on: May 11, 2011, 09:29:32 pm »

I double(ish) this suggestion.

I also suggest a community project for DF lovers to unite and recode DF to be multithreaded.

First and foremost, we need a new pathing algorithm.

And people with time. Oh wait, we have those here >.>
Logged
It was a miracle of rare device, A sunny pleasure-dome with caves of ice!

Girlinhat

  • Bay Watcher
  • [PREFSTRING:large ears]
    • View Profile
Re: Parallel Processing
« Reply #6 on: May 12, 2011, 02:53:28 am »

I would like to invite all of you to the 9,001th Suggestion Division!  Only the elite are chosen for this special task force!  To gain entry, you must start a new forum thread suggesting mutli-threading, improved pathfinding, multiplayer, and/or open source code.  I warn you though, the ranks of the 9,001th are already very full...

sockless

  • Bay Watcher
    • View Profile
Re: Parallel Processing
« Reply #7 on: May 12, 2011, 03:37:05 am »

So you upgraded your computer to play DF better?

The RAM cap doesn't matter, it doesn't use that much RAM.

Once again, use search function.

Also, the general consensus is that improving things such as pathfinding, fluids and temperature will have a greater performance gain rather than multithreading. Recently, Toady made DF run a whole lot faster by using coding magic. Also making the game multi-threaded doesn't fix the game's problem, it just hides the symptoms for the time being.

The biggest argument is probably implementation, there isn't very good cross-platform threading support, mainly because Windows isn't POSIX complaint.
Logged
Iv seen people who haven't had a redheaded person in their family for quite a while, and then out of nowhere two out of three of their children have red hair.
What color was the mailman's hair?

Niseg

  • Bay Watcher
    • View Profile
Re: Parallel Processing
« Reply #8 on: May 12, 2011, 04:30:56 am »

Anyway, making DF multithreading at the end... won't work (very well) multithreading has to be in the core design
After writing code in a multi-threading  environment for a long time I can generally say  your statement is  not true. What's true is that you should know what you are doing and what you are trying to achieve . Without going into details you can generally convert any for loop that process independent data  into a work queue scheduler . 

To gain entry, you must start a new forum thread suggesting mutli-threading, improved pathfinding, multiplayer, and/or open source code.

I suggest that people that open a suggestion without giving a clear methodology should donate 10$ to Toady to  figure it out.

The pathfinding suggestions are all in one thread .There is a lot  progress in the in the clear methodology area  . I implemented a demo of 2 of the suggestions . I know  room pathing is half done  but it simplify the problem by a factor of 10 and no path penalty runs at best case time instead of worst case every time.

Toady made DF run a whole lot faster by using coding magic. Also making the game multi-threaded doesn't fix the game's problem, it just hides the symptoms for the time being.

 I haven't noticed much of a performance difference (maybe because my 25% overclock stopped being stable - I blame my cats) . We are totally in the dark in the benchmarking field because it's hard to points out the performance killer because there are more than one. I think it got to do with how data is organized .
Logged
Projects:Path finding simulator(thread) -A*,weighted A*(traffic zones), user set waypoints (path caching), automatic waypoint room navigation,no-cache room navigation.
Re: Parallel Processing
« Reply #9 on: May 12, 2011, 02:15:28 pm »

I double(ish) this suggestion.

I also suggest a community project for DF lovers to unite and recode DF to be multithreaded.

First and foremost, we need a new pathing algorithm.

And people with time. Oh wait, we have those here >.>

it would be awesome if DF was open sauce i would commit code on the weekly
Logged

Not a Cylon

  • Escaped Lunatic
    • View Profile
Re: Parallel Processing
« Reply #10 on: May 13, 2011, 07:18:14 pm »

Anyway, making DF multithreading at the end... won't work (very well) multithreading has to be in the core design
After writing code in a multi-threading  environment for a long time I can generally say  your statement is  not true. What's true is that you should know what you are doing and what you are trying to achieve . Without going into details you can generally convert any for loop that process independent data  into a work queue scheduler . 

Sure, but that's sorta the point. If the code is written already in such a way that it has lots of independent tasks, and modifications to shared data are rare and well-controlled, then sure. Refactor, and you've got a multithreaded program. But in a large, complex code base like Dwarf Fortress that wasn't designed with threading in mind, how likely is it that everything is already independent? No processing steps are modifying data structures in place as they're traversed, for instance? The hard part, I imagine, of reworking DF for multithreading wouldn't be converting for loops to work queues; the problem would be finding every little niggling synchronization point and either acquiring a lock (which could erase performance gains if contested locks are common, and would introduce extra randomness (dunno if that matters)) or delaying and batching the writes somehow (which could be a lot of work in itself).

In short, I tend to agree with the suspicion that the low-hanging fruit has got to be in the pathfinding algorithms, and getting those right could improve performance just as much, if not more, as multithreading, and with way less work and way fewer irreproducible crasher bugs …
Logged

Chilton

  • Bay Watcher
  • Armok Cultist - Calligrapher
    • View Profile
Re: Parallel Processing
« Reply #11 on: May 14, 2011, 10:57:28 pm »

Why dont you just SetAffinity or imgcfg it into submission?
Logged
I Like To Think Of Myself As An Artist - I Create Masterpieces With My Tools Of Trade.

Draco18s

  • Bay Watcher
    • View Profile
Re: Parallel Processing
« Reply #12 on: May 14, 2011, 11:07:40 pm »

Why dont you just SetAffinity or imgcfg it into submission?

...meaning...?
Logged

Dutchling

  • Bay Watcher
  • Ridin' with Biden
    • View Profile
Re: Parallel Processing
« Reply #13 on: May 15, 2011, 11:38:25 am »

Why dont you just SetAffinity or imgcfg it into submission?

...meaning...?
I hope it means that everyone who suggest this again will burn for a very long time ^^
Logged

Darkweave

  • Bay Watcher
    • View Profile
Re: Parallel Processing
« Reply #14 on: May 15, 2011, 09:46:12 pm »

If anyone uses the term "multi-threading" in a post they should receive an automated message instructing them to use the search function and be sent a male and female cat.  ;D
Logged
Pages: [1] 2 3