Bay 12 Games Forum

Please login or register.

Login with username, password and session length
Advanced search  

Author Topic: Desktop building thread with a focus on playing ridiculous df embarks  (Read 1937 times)

Noodz

  • Bay Watcher
    • View Profile

Greetings fellow gamers. I am under the impression that i already posted a topic on this issue, but i can't find it, maybe i didn't post it after all.

Also, i am not sure which board would be more appropriate for this topic, so i just posted here because of higher traffic. If the mods think there might be a more appropriate board, i would thank him if he could move this topic there.

Yesterday my 3 year old notebook has entered a stage of disrepair that i think it will be hard to fix. I will proceed to purchase a desktop, and i want some advice on how to build a new one. However, i propose that the priority of this topic should be about builds that can support ridiculous games of DF, such as playing a 200 dorf fort on a 8x8 embark with contaminants and rocks everywhere and acceptable fps. Or maybe even a game of df that does not autocrash when you try a 16x16 embark.

CPU: i am an amateur when it comes to computer engineering, but since df is a single thread application, it makes sense to maximize the minimum clock rate of the components. A rule of thumb i still remember is that high cpu clock means little if the clock multiplier is large. A high multiplier means the bus frequency is lower, and can be a bottleneck.

In this regard, i am amazed to find intel's i7s have lower bus frequencies than the cheaper amd phenom ii. from wikipedia:

the Intel's i7 Westmere gulftown are six cores ranging from 3.2 to 3.47 GHz, but with a bus clock of 133MHz.

On the other hand, [urlhttp://en.wikipedia.org/wiki/List_of_AMD_Phenom_microprocessors#.22Thuban.22_.28E0.2C_45_nm.2C_Hexa-core.29]AMD's phenom II Thuban[/url] are a cheaper series of six cores ranging from 2.6 to 3.3 GHz, but with a bus clock of 200 MHz.

In all honesty, i am sure there is more to computer performance than cpu and bus clock, especially when programmers take advantage of multiple cores with multithreading and parallel processing. Concepts like HyperTransport and Intel's uncore and Quickpath interconnect further complicate the issue.

Regardless, we are aware Toady has yet to implement multithreading on DF, which means all these new technologies are probably not being taken into account. Choosing a setup with a higher bus frequency sounds like a more robust solution to me, even when considering how Westmere has 12MB of L3 cache compared to Thuban's 6MB (though Thuban has 6x512KB of L2 cache compared to Westmere's 6x256KB). Additionaly, the fact that amds are cheaper than intels make it pretty clear to me that i should choose amd.

Motherboard: asus. There are gazillions of mb suppliers, some of them quite shady. It's not like asus is a guarantee of quality, but they've been on the business for quite some time and i think that makes them a safe choice. The models i'm aiming for come with an onboard radeon 4250, which is not something you can play crysis 2 with, but is well suited for a retro-indie gamer like me.

RAM: 4x 4GB kingston ddr3 1333MHz. I don't know about you guys, but on Brazil is almost impossible to find RAM other than kingston's. Also, it is hideously expensive to go above ddr3 1333MHz, so that's where i stay.

As for DF, I don't know if there's a limit to how much memory it can effectively use. From my experience on my notebook with 4GB of RAM, Windows starts complaining about df when it reaches the 700MB mark, and df becomes unstable with larger embarks that baloon the allocated memory to 1.5 or more GBs. Having 16 GBs of RAM means Windows should have no problem allocating the maximum 4GB of memory allowed to a x86 application such as DF. I'm just not sure if DF can handle that maximum. Which is why maybe 16GB is overkill.

Logged

ZeroSumHappiness

  • Bay Watcher
    • View Profile
Re: Desktop building thread with a focus on playing ridiculous df embarks
« Reply #1 on: September 26, 2011, 10:09:22 am »

Just a note about CPUs, you want a mixture of best clock speed per core and a good core architecture.  Have you heard of Tom's Hardware?  You should probably check it out.  The core-to-core comparison charts look pretty cool, actually, and should help inform your decision.  (The core-to-core test is done single-threaded, on one core, all normalized to 3GHz.)

You could create the reference computer for performance testing, which would be cool, and even compare Windows to Linux performance if you feel like being awesome.

It does sound like you have a good plan though.  I'd just suggest reading some Tom's Hardware reviews, some HardOCP and, if you need help actually assembling the computer or to sanity check your plans, Lifehacker has a good assembly tutorial.

Good luck,
Zero

Update!
I did the math, using costs at Newegg and the numbers from the Tom's Hardware review.  Here are my results.
Processor
Score
Cost
Speed
Unit Cost
Total Power
(Fritz)
(USD)
(GHz)
($/(GHz•Fritz))
(GHz•Fritz)
Intel Core i7-2600K
2259
315
3.40
41
2560
Intel Core i5-2500K
2251
210
3.30
28
2476
Intel Core i7-975
2150
1025
3.33
143
2387
Intel Core i7-980X
2143
600
3.33
84
2379
Intel Core 2 Duo E8600
2095
290
3.33
42
2325
AMD Phenom II X6 1100T
1836
190
3.70
28
2264
AMD Phenom II X4 980
1826
170
3.70
25
2252
Intel Core i5-661
1997
220
3.33
33
2217
Intel Core i7-875K
2137
360
2.93
57
2087
Intel Core 2 Duo E6850
1994
123
3.00
21
1994
Intel Core i5-530
1985
180
2.93
31
1939
AMD Athlon II X2 260
1767
65
3.20
11
1885
AMD Athlon II X4 645
1764
105
3.10
19
1823
AMD Athlon 64 X2 6000
1646
96
3.00
19
1646
AMD Athlon 64 X2 5400 BE
1621
58
2.80
13
1513
Intel Pentium 4 HT 660
682
143
3.60
58
818

So, to read the chart:
Cost is Newegg's cost for the CPU (or best alternate cost I could find for a few of the older ones.)  Score is the score that Tom's hardware got using Fritz (a chess AI) as a test.  Total score is the Fritz score times the processor speed.  This is because the Fritz score is actually a normalized, not a raw score.  So it's the score if all processors are run at 3 GHz.  The unit cost is the cost in dollars per total score (with a scaler to make the numbers more understandable.)

The outcome is that the best processor would be the i7-2600K followed closely by the i5-2500K.  However, the most cost efficient is the Athlon II x2 260, though it takes quite the raw performance hit.  I think the i5-2500K ends up looking like a good bang-for-your-buck overall when you consider other, more modern games, but if you're going for pure single-threaded cost efficiency for DF I'd go for the Athlon 260.  I'm actually running on an E6600, which would probably score comparably to the Athlon 260 and it currently takes an FPS hit once I start messing with ~100 dwarves in a moderately complex fort in a 2x2 or 3x3 embark.  (I like 'em small.)

The sad part that I see is the small score range  Discounting the far-out-of-date P4, the best of the group (i7-2600K, 2560) versus (approximately) what I'm using (E6850, 1994) is only an improvement of 30% or 30 dwarves on a small embark.

Now, assumptions:
  • The Fritz score scales linearly with DF performance.
  • CPU-based performance is most linked to number of dwarves/fort complexity, not embark size directly
  • Embark size will only affect your CPU-based performance insomuch as it increases fort complexity


Disclaimer:
  • I am not a hardware specialist or a DF programmer.  I am, however a Software Engineer with an MS in CS who focused on AI and algorithmic complexity, so I think I have good assumptions.
  • I accidentally submitted an in-progress version of this edit, so I updated it a few times.  If you haven't seen this disclaimer, reread to make sure you didn't miss anything.  Also, raise your hand if you're not in attendance.
« Last Edit: September 26, 2011, 02:55:32 pm by ZeroSumHappiness »
Logged

malvado

  • Bay Watcher
    • View Profile
Re: Desktop building thread with a focus on playing ridiculous df embarks
« Reply #2 on: September 26, 2011, 03:38:47 pm »

Right now as I understand it, DF does not support Multi-Core architecture in an efficient way, so more cores does not really mean an huge improvement to fps.
However theres a few things you should consider now :

*Enough Memory 8Gb should do more than enough although with todays prices you can easily get up to 16Gb for half the price of 8Gb a year ago. Also pick the fastest memory in terms of latency and Mhz if possible , on Amd Cpu's it helps more than on Intel cpu's.

*As for the cpu , the faster the better. A decent i2600K will do more than enough and with some decent cooling on the cpu you could squeeze even more performance out of it and improve drastically DF fps.

*A good and stable Mainboard. Keep away from Msi , every single mainboard ive had from them has blown up in a drastical way , Asus and Gigabyte are in my pow of better build  quality and lately I've been buying Asus due to the Hardware and software bundled with them. Even if you are not overclocking buy an MB that supports Overclocking, they mainly have WAY better capacitors than the cheap ass motherboards. Also good MB's comes usually with better integrated audio.

Also, Amd is about to launch Bulldozer which seems to be darn good , it seems to handle fritz and advanced mathematical operations quite well, so it might be worth waiting for Bulldozer to see if its worth investing in instead of Intel i5
Logged

Dangerous Beans

  • Bay Watcher
    • View Profile
Re: Desktop building thread with a focus on playing ridiculous df embarks
« Reply #3 on: September 26, 2011, 08:36:00 pm »

Personally i think you need to look into overclocking to really get the maximum DF framerate, as you want the highest clock speed possible. You also want a efficient cpu architecture.
So at the moment you really want an i5 2500k or an i7 2600k. Both will overclock like nuts (typically around 4.5ghz) and are more efficient clock for clock. the difference between the two is that the 2600 is 100mhz faster, has hyper-threading (woo, virtual cores  ::)  ) and costs $100 more. that $100 would be better spent on better cooling.

So i suggest 2500k and a good aftermarket cooler.
Logged

Thiam

  • Bay Watcher
    • View Profile
Re: Desktop building thread with a focus on playing ridiculous df embarks
« Reply #4 on: September 27, 2011, 04:20:10 am »

RAM: 4x 4GB kingston ddr3 1333MHz. I don't know about you guys, but on Brazil is almost impossible to find RAM other than kingston's. Also, it is hideously expensive to go above ddr3 1333MHz, so that's where i stay.

As for DF, I don't know if there's a limit to how much memory it can effectively use. From my experience on my notebook with 4GB of RAM, Windows starts complaining about df when it reaches the 700MB mark, and df becomes unstable with larger embarks that baloon the allocated memory to 1.5 or more GBs. Having 16 GBs of RAM means Windows should have no problem allocating the maximum 4GB of memory allowed to a x86 application such as DF. I'm just not sure if DF can handle that maximum. Which is why maybe 16GB is overkill.

Any 32-bit Windows process is limited to a maximum of 2GB application memory.
The only way around this is if the process supports AWE and/or the 3G switch. DF doesn't support either.
Any RAM in excess of 4GB will hardly be used if the machine is dedicated to DF only.
Having more RAM will allow multiple DF processes (or other applications) to run simultaneously (each on it's own core, for example). It will not allow more memory to be allocated to a single DF process.

See http://msdn.microsoft.com/en-us/library/windows/desktop/aa366778%28v=vs.85%29.aspx for details on memory and address space limits. I have no knowledge of the limits on a Linux OS.
Logged

Reiina

  • Bay Watcher
    • View Profile
Re: Desktop building thread with a focus on playing ridiculous df embarks
« Reply #5 on: September 27, 2011, 04:58:07 am »

Not directly related but I'm wondering why there isn't any a 64 bit version of DF?
Has toady answered that question somewhere already?

Afaik DF is coded in C/C++, shouldn't be much of an issue to have it recompiled in 64 bit. Would boost performance and eliminate memory issues...

As for linux the memory limit is 3GB for a 32 bit process running under a 64bit linux. Under a 32bit linux, I'm unsure :).

Logged

EddyP

  • Bay Watcher
    • View Profile
Re: Desktop building thread with a focus on playing ridiculous df embarks
« Reply #6 on: September 27, 2011, 05:10:20 am »

I don't know much about computers, but I don't think that you'll be able to get one capable of doing 8*8 200 dwarf embarks.
Logged

Grumbledwarfskin

  • Bay Watcher
  • stilts don't have skin
    • View Profile
Re: Desktop building thread with a focus on playing ridiculous df embarks
« Reply #7 on: September 27, 2011, 05:44:35 pm »

Not directly related but I'm wondering why there isn't any a 64 bit version of DF?
Has toady answered that question somewhere already?

Afaik DF is coded in C/C++, shouldn't be much of an issue to have it recompiled in 64 bit. Would boost performance and eliminate memory issues...

As for linux the memory limit is 3GB for a 32 bit process running under a 64bit linux. Under a 32bit linux, I'm unsure :).

I doubt it'd make much difference compiling as a native 64-bit application. It's likely that DF uses *any* 64-bit numbers, so none of the arithmetic would be any faster. The main reason 64-bit architecture is needed is to support more than four gigs of address space (RAM), but DF never uses that much memory, either, and all processes use memory address translation (they have a set of virtual addresses that are converted to real memory addresses when accessed/written), so there wouldn't even be any overhead saved by using native 64-bit addressing in an application.

There might be some small gains if DF uses a lot of structs that are larger than 32 bits, but I'd be very surprised if it was enough to have a noticeable impact on FPS, as accessing the data in those structs wouldn't be any faster, only copying whole structs from one place to another, which is usually avoided, except on save/load (at which point the hard drive is the bottleneck, not the processor).

Has anyone actually hit the 3GB barrier on memory used by DF? Without it being due to a memory leak? I could see hitting the barrier from running the program for a long time without saving/quitting/reloading, as memory leaks are very common, but right now, my DF is using 43.68MB, less than 2% of the maximum. An 8x8 embark should be only four times that, still well below one gig.

EDIT: oops...df hadn't loaded my world yet...now it's using around 650MB...yeah, 8x8 might be pushing the memory limits for a 32-bit application, so that reason for going 64-bit is probably valid. You shouldn't really expect better performance from the same processor though, if/when it does.
« Last Edit: September 27, 2011, 05:49:29 pm by Grumbledwarfskin »
Logged

Putnam

  • Bay Watcher
  • DAT WIZARD
    • View Profile
Re: Desktop building thread with a focus on playing ridiculous df embarks
« Reply #8 on: September 29, 2011, 02:12:17 am »

As it stands now, the i5-2500k is the way to go if you want a good CPU. The main advantage the i7-2700k has over it is Hyperthreading, which is 100% useless for programs that use one core.

Dangerous Beans

  • Bay Watcher
    • View Profile
Re: Desktop building thread with a focus on playing ridiculous df embarks
« Reply #9 on: September 29, 2011, 11:17:05 pm »

So to throw some !!science!! at this: 8x8 embark, 205 dwarfs (90 idle) and ~100fps :D
I ordered some trees cut and junk moved and it goes down to 60-70fps with 6 idle.

invaders are turned off, only one cavern layer, temp is on, no traffic zones, about 50 animals (maybe) and 11k stones
This is on a core i5 2500k running at 4.8ghz, 8gb 1333mhz ram. Dwarf fortress is using 830mb of ram.

I am going to go work out how to upload saves.

Edit:
Save is here: http://dffd.wimbli.com/file.php?id=4994
The movie depot objected to the movie i made showing some mass dumping, so that has benn uploaded to DFFD instead. look here: http://dffd.wimbli.com/file.php?id=4995
FPS took a bit of a hit cause i mined out some stupid amount of ore.
« Last Edit: September 30, 2011, 12:17:13 am by Dangerous Beans »
Logged

Victuz

  • Bay Watcher
    • View Profile
Re: Desktop building thread with a focus on playing ridiculous df embarks
« Reply #10 on: September 30, 2011, 05:38:59 am »

...
I have a 100 dwarves on a 6x6 embark and my fps is 20 :C

Damn I have to upgrade my processor...
Logged
I once flung a migrant off a bridge. He collided with the brook cliff and died.
A year later, my legendary engraver engraved him colliding with an obstacle and dying.

Putnam

  • Bay Watcher
  • DAT WIZARD
    • View Profile
Re: Desktop building thread with a focus on playing ridiculous df embarks
« Reply #11 on: September 30, 2011, 05:17:52 pm »

...
I have a 100 dwarves on a 6x6 embark and my fps is 20 :C

Damn I have to upgrade my processor...

6x6 is huge

Victuz

  • Bay Watcher
    • View Profile
Re: Desktop building thread with a focus on playing ridiculous df embarks
« Reply #12 on: September 30, 2011, 05:53:55 pm »

...
I have a 100 dwarves on a 6x6 embark and my fps is 20 :C

Damn I have to upgrade my processor...

6x6 is huge
I know! :C
That's the pain. Also when I breached hfs my framerate went down to 4 and never went up. I REALLY need an upgrade on this thing...
Logged
I once flung a migrant off a bridge. He collided with the brook cliff and died.
A year later, my legendary engraver engraved him colliding with an obstacle and dying.

moki

  • Bay Watcher
    • View Profile
Re: Desktop building thread with a focus on playing ridiculous df embarks
« Reply #13 on: September 30, 2011, 08:11:49 pm »

I got 50-60FPS (only a little lower during sieges) on a shallow 3x3 with 140 dwarves, temperature on and lots of water and magma being pumped around... that's good enough for me. A 4x4, being almost twice as big, completely ruins everything, though. That's only a 3GHz Dual-Core, but fairly optimized system. I guess an i7 could take 200 or more dwarves on a 5x5 without any problems.
Logged
But my good sir, the second death was for Dwarven Science!

Dangerous Beans

  • Bay Watcher
    • View Profile
Re: Desktop building thread with a focus on playing ridiculous df embarks
« Reply #14 on: September 30, 2011, 09:14:52 pm »

I got 50-60FPS (only a little lower during sieges) on a shallow 3x3 with 140 dwarves, temperature on and lots of water and magma being pumped around... that's good enough for me.

Yeah that is pretty good, it is what you are doing with the fps that counts. I really need to build a giant magma pumping stack in Roomlulled and see how that affects things.
Logged