Bay 12 Games Forum

Please login or register.

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

Author Topic: Dwarf Fortress and CPU Processors  (Read 16895 times)

ragincajun

  • Bay Watcher
    • View Profile
Dwarf Fortress and CPU Processors
« on: May 03, 2016, 01:31:30 pm »

Hey guys, I know there has been a lot of talk about optimizing being needing to push back the FPS death we all seem to run into.  Anyway, I was looking at a possible new CPU today and honestly I guess I'm becoming the "old guy" that can't keep up with all the new tech (Never thought that would happen honestly but oh well).

So my current rig has an AMD A8-3820 process, runs about 2.5GHz and I found a newer computer with an Intel i3-4130 processor pushing about 3.4GHz.

I'm just curious, for DF in particular and gaming in general would this be worth the outlay of cash (it's on clearance so it's not a huge hit) to see a generalized improvement in gaming ability or not really worth the money for what it can do?

Thanks for any feedback.
Logged
No, they went to Hel, where they lead a bleak existence in cold and darkness. Valhalla is reserved for valiant warriors.

My Name is Immaterial

  • Bay Watcher
    • View Profile
Re: Dwarf Fortress and CPU Processors
« Reply #1 on: May 03, 2016, 01:44:28 pm »

((Inb4 someone mentions multithreading))

feelotraveller

  • Bay Watcher
  • (y-sqrt{|x|})^2+x^2=1
    • View Profile
Re: Dwarf Fortress and CPU Processors
« Reply #2 on: May 03, 2016, 05:10:27 pm »

My understanding is that for Dwarf Fortress it is currently single threaded performance which is the limiting factor.  I'm not that tech-savvy but comparing here https://www.cpubenchmark.net/singleThread.html says that you would probably get a fair bit of improvement regarding DF.  Looking at the second comparison on the page says that (at normal retail price) it is a passable buy... but there are better options in both regards, depending on what exact deal you could do.  For example an i3-4370 looks like a much better buy at only about $20 more.

In terms of other gaming performance the graphics card is generally (more) important and for most other games likely to be the limiting factor.  This http://www.tomshardware.com/reviews/gpu-hierarchy,4388.html is probably a good starting point for a rough gauge of usefulness.  Of course each game will have its own peculiar demands...

It's also worth considering how well the computer you buy will go over the next few years as the demands newer games make change/increase, if you think you might want to play them that is.   ;D
Logged

NW_Kohaku

  • Bay Watcher
  • [ETHIC:SCIENCE_FOR_FUN: REQUIRED]
    • View Profile
Re: Dwarf Fortress and CPU Processors
« Reply #3 on: May 03, 2016, 08:25:28 pm »

For Dwarf Fortress, multicores don't matter because it's single-threaded. This means most mid- or top-line CPUs from the past 5 or so years are all going to be fairly similar, although I think i7s are the fastest single-threaded from memory.

What really slows DF down, however, is cache missing. 

You want a very large cache if you can get it.  Sadly, you'd need somewhere around to 1gb in cache to really run the game entirely on cache.  A quick Googling says that the best is somewhere around 128 mb in a L4 cache, which isn't really there yet, but might get there in a few years.

Failing that, you want the fastest memory possible.  What you really want is the lowest possible CAS latency. (See here for a little guide on it.)

The reason for this is that most of DF is not really complex math that will tie up a CPU, it's actually a bunch of "checks".  The big drains on FPS are things like pathfinding (which involves querying the map almost at random - which foils caching unless you have some crazy huge cache large enough for the whole map, and also foils prediction in slicing), checks on item status as you get more and more random garbage in your fort (again, involving checking such a large table of data it can't be cached), or fluids, which are problematic mainly because they force redraws of the connectivity map... which again means a huge table of data too big for the cache.  Ultimately, this means that your RAM is going to need to respond quickly to queries of small bits of data that the CPU cannot predict like it normally can, so having the lowest CAS latency possible is the best way to improve speed.  (It's also not strictly the most expensive thing you need to buy, since you don't need to buy tremendous amounts of RAM for DF... at least, not yet.)
« Last Edit: May 03, 2016, 08:31:42 pm by NW_Kohaku »
Logged
Personally, I like [DF] because after climbing the damned learning cliff, I'm too elitist to consider not liking it.
"And no Frankenstein-esque body part stitching?"
"Not yet"

Improved Farming
Class Warfare

Bumber

  • Bay Watcher
  • REMOVE KOBOLD
    • View Profile
Logged
Reading his name would trigger it. Thinking of him would trigger it. No other circumstances would trigger it- it was strictly related to the concept of Bill Clinton entering the conscious mind.

THE xTROLL FUR SOCKx RUSE WAS A........... DISTACTION        the carp HAVE the wagon

A wizard has turned you into a wagon. This was inevitable (Y/y)?

FantasticDorf

  • Bay Watcher
    • View Profile
Re: Dwarf Fortress and CPU Processors
« Reply #5 on: May 10, 2016, 09:41:00 am »

Somehow relevant to this discussion as gleamed from the new dev page patch notes.

Quote from: toady
Next up we'll be doing more bug fix releases to make sure we have a vaguely presentable DF before we disappear into a new compiler and 64 bits.

With better access to memory and such by updating the bits to a market present day 64 standard. I can certainly hope that this would make the game more accessible to different models such as laptops rather than beefy PC's

To give comparison, it offers me hope that my own hardware, which is just a humble laptop running at-least four versions behind the OP's software can run at a standard where i can relax just a bit on being restrictive as to not crash the game and play largely without issue except when i know im really pushing it.
Logged

Bumber

  • Bay Watcher
  • REMOVE KOBOLD
    • View Profile
Re: Dwarf Fortress and CPU Processors
« Reply #6 on: May 10, 2016, 10:51:51 am »

Somehow relevant to this discussion as gleamed from the new dev page patch notes.

Quote from: toady
Next up we'll be doing more bug fix releases to make sure we have a vaguely presentable DF before we disappear into a new compiler and 64 bits.

With better access to memory and such by updating the bits to a market present day 64 standard. I can certainly hope that this would make the game more accessible to different models such as laptops rather than beefy PC's

To give comparison, it offers me hope that my own hardware, which is just a humble laptop running at-least four versions behind the OP's software can run at a standard where i can relax just a bit on being restrictive as to not crash the game and play largely without issue except when i know im really pushing it.
I wouldn't count on it. Only thing it's going to help is preventing crashes when memory exceeds several gigabytes. It's not going to help DF perform noticeably better. It probably won't fix other crashes (especially ones due to DFHack.)
Logged
Reading his name would trigger it. Thinking of him would trigger it. No other circumstances would trigger it- it was strictly related to the concept of Bill Clinton entering the conscious mind.

THE xTROLL FUR SOCKx RUSE WAS A........... DISTACTION        the carp HAVE the wagon

A wizard has turned you into a wagon. This was inevitable (Y/y)?

Streeter

  • Bay Watcher
  • Playing D&D Counts as Partying
    • View Profile
    • https://www.google.com/
Re: Dwarf Fortress and CPU Processors
« Reply #7 on: May 10, 2016, 12:55:44 pm »

Snipped


This person has the right idea, listen to them. Fast RAM and a large CPU cache are your best bets.
Logged
"To ensure quality standards, this space is hereby declared a Signature-Free Zone (SFZ). All intruding signatures, real or made-up, will be shot on sight."

Shonai_Dweller

  • Bay Watcher
    • View Profile
Re: Dwarf Fortress and CPU Processors
« Reply #8 on: May 10, 2016, 06:15:21 pm »

If the only reason for a 64 bit version is to prevent a crash when worldgen gets too large, then what's the point? Just stop worldgen from getting too large. Problem solved.

Pretty sure Toady wouldn't have bothered making a 64 bit DF if there were no benefit at all. What about larger animal populations, higher ratio of historical characters to abstract population, possibly performance improvements (if only because he had to rebuild parts of the programme to get it all working)?

Every thread on 64 bit is the same 'yay, no more fps death for my 200 year old fortress' 'No, sorry, it'll still die, but hey worldgen won't crash any more'. Doesn't anyone technical have anything positive to suggest?
Logged

Isaacc7

  • Bay Watcher
    • View Profile
Re: Dwarf Fortress and CPU Processors
« Reply #9 on: May 10, 2016, 07:13:34 pm »

Someone mentioned that 64 bit should help out adventure mode dramatically. Not sure what the difference between adventure mode and fort mode regarding memory is though.
Logged

Thief^

  • Bay Watcher
  • Official crazy person
    • View Profile
Re: Dwarf Fortress and CPU Processors
« Reply #10 on: May 11, 2016, 05:32:17 am »

The "new compiler" part should be good, DF could do with a speed increase and optimisations have really come on since the ancient version of VC that he was last reported to be using.
Logged
Dwarven blood types are not A, B, AB, O but Ale, Wine, Beer, Rum, Whisky and so forth.
It's not an embark so much as seven dwarves having a simultaneous strange mood and going off to build an artifact fortress that menaces with spikes of awesome and hanging rings of death.

Bumber

  • Bay Watcher
  • REMOVE KOBOLD
    • View Profile
Re: Dwarf Fortress and CPU Processors
« Reply #11 on: May 11, 2016, 05:59:02 am »

If the only reason for a 64 bit version is to prevent a crash when worldgen gets too large, then what's the point? Just stop worldgen from getting too large. Problem solved.
Which means forcing smaller/shorter worlds.

Quote
What about larger animal populations, higher ratio of historical characters to abstract population, ...
Which conflict with performance. As you add more data, you have more to process, regardless of having more room for it.

Quote
...possibly performance improvements (if only because he had to rebuild parts of the programme to get it all working)?
You might see slight improvements, but if he doesn't address the actual bottlenecks then your FPS is still doomed to slow to a crawl, albeit slightly later.

Quote
Every thread on 64 bit is the same 'yay, no more fps death for my 200 year old fortress' 'No, sorry, it'll still die, but hey worldgen won't crash any more'. Doesn't anyone technical have anything positive to suggest?
Just being realistic here. FPS death has nothing to do with the memory limit.
« Last Edit: May 11, 2016, 06:05:00 am by Bumber »
Logged
Reading his name would trigger it. Thinking of him would trigger it. No other circumstances would trigger it- it was strictly related to the concept of Bill Clinton entering the conscious mind.

THE xTROLL FUR SOCKx RUSE WAS A........... DISTACTION        the carp HAVE the wagon

A wizard has turned you into a wagon. This was inevitable (Y/y)?

Shonai_Dweller

  • Bay Watcher
    • View Profile
Re: Dwarf Fortress and CPU Processors
« Reply #12 on: May 11, 2016, 06:03:52 am »

If the only reason for a 64 bit version is to prevent a crash when worldgen gets too large, then what's the point? Just stop worldgen from getting too large. Problem solved.
Which means forcing smaller/shorter worlds.

Quote
What about larger animal populations, higher ratio of historical characters to abstract population, ...
Which conflict with performance.

Quote
...possibly performance improvements (if only because he had to rebuild parts of the programme to get it all working)?
You might see slight improvements, but if he doesn't address the actual bottlenecks then your FPS is still doomed to slow to a crawl slightly later.

Quote
Every thread on 64 bit is the same 'yay, no more fps death for my 200 year old fortress' 'No, sorry, it'll still die, but hey worldgen won't crash any more'. Doesn't anyone technical have anything positive to suggest?
Just being realistic here. FPS death has nothing to do with the memory limit.
Yes, and that's all nice. But what are the advantages? I, and probably most other non-technically minded folk here, really don't care what's not possible. Basically you're saying Toady has been fooled into wasting time making a 64 bit Dwarf Fortress which does nothing and for some reason wants us all to get excited about the nothingness. Great.
Logged

Bumber

  • Bay Watcher
  • REMOVE KOBOLD
    • View Profile
Re: Dwarf Fortress and CPU Processors
« Reply #13 on: May 11, 2016, 06:08:13 am »

Yes, and that's all nice. But what are the advantages? I, and probably most other non-technically minded folk here, really don't care what's not possible. Basically you're saying Toady has been fooled into wasting time making a 64 bit Dwarf Fortress which does nothing and for some reason wants us all to get excited about the nothingness. Great.
In that case, it's better for the future. We don't have to worry if DF will be compatible with future operating systems. The new code he writes can take advantage of certain features that the old compiler is incompatible with.
Logged
Reading his name would trigger it. Thinking of him would trigger it. No other circumstances would trigger it- it was strictly related to the concept of Bill Clinton entering the conscious mind.

THE xTROLL FUR SOCKx RUSE WAS A........... DISTACTION        the carp HAVE the wagon

A wizard has turned you into a wagon. This was inevitable (Y/y)?

Miuramir

  • Bay Watcher
    • View Profile
Re: Dwarf Fortress and CPU Processors
« Reply #14 on: May 11, 2016, 05:02:32 pm »

Yes, and that's all nice. But what are the advantages? I, and probably most other non-technically minded folk here, really don't care what's not possible. Basically you're saying Toady has been fooled into wasting time making a 64 bit Dwarf Fortress which does nothing and for some reason wants us all to get excited about the nothingness. Great.

The *primary* advantage is that 32-bit hardware, and therefore software, is increasingly antique.  x86-64 (by whatever name; AMD64, Intel64, etc.) was announced in 1999, and 64-bit CPUs for desktops have been readily available since at least 2004, and the default since around 2006.  64-bit adoption in other markets was even earlier; consider the Nintendo 64 of 1996 and the Playstation 2 of 2000.  Windows Vista, around 2006, was 64-bit for serious users, and Windows 7, around 2009, pushed 64-bit operating systems and compilers further into the mainstream. 

As DF goes forward, we don't want it to get so far behind that it slows down even further because it has to run on an emulator.  There's traces of that already; read "A bit of background on compilers exploiting signed overflow" for an interesting summary of the considerable overhead that using old-fashioned 32-bit loop index expressions can cause on a fundamentally 64-bit processor. 

Moving DF to what's been the standard for computing for literally a decade, and taking advantage of modern compilers which have substantial optimization improvements, is a really good idea.  My personal estimate is that we'll probably see a few percent to a few tens of percent improvement just from properly modernizing the tool chain; and that the cost of only supporting a terribly out of date setup would be climbing at an increasing rate over the next few years. 

Addendum: According to the Steam Hardware Survey, over 88% of Windows gamers on Steam are using a 64-bit OS.  Mac Steam gamers are over 97% 64-bit OS; Linux Steam gamers are much harder to tell because of the diversity of versions not being shown, but all five of the listed top versions, representing about 60% of users, are 64-bit. 

This June, when (supposedly) Microsoft does one more big push to get folks on Vista and 7 to upgrade to 10 for free, the ~7% of 32-bit Windows 7 users will probably drop off further.  (Around 97% of Windows 10 installs are 64-bit.) 
« Last Edit: May 11, 2016, 05:11:51 pm by Miuramir »
Logged
Pages: [1] 2 3 4