Bay 12 Games Forum

Please login or register.

Login with username, password and session length
Advanced search  

Author Topic: Question Making Dwarf Fortress Faster (Processor and Other Questions)  (Read 3192 times)

Dzlan

  • Bay Watcher
    • View Profile

So, to begin with, this here is my laptop.
http://www.computeralliance.com.au/asus-p550lav-xx787g-15.6-core-i7-notebook-windows-7/8.1-pro

So, I have installed Linux Mint Cinnamon and gotten Dwarf Fortress to work with Dwarf Therapy. No small task, as I am new to Linux.
Anyway, I finally found I can run
cat /proc/cpuinfo | grep "MHz"
To test the speed of my cores.. (That the way to put it) and it came up with
cpu MHz      : 2000.000
cpu MHz      : 754.000
cpu MHz      : 754.000
cpu MHz      : 754.000

And so I am correct in assuming the 2000.000 is the 2ghz? I heard DF uses the most it can from one core, so... here's a few questions.
First off, I am correct in understanding it shows 4 CPU's as there is 2 threads per core? (It's only a duel core)
(Which is a shame cause if DF only uses 1 thread, I could have just looked for a really powerful single core?)

I wanted a duel so that 1 core for DF and one for background tasks (Never knew there was 2 thread per core, mate told me when I asked him why it's showing 4)
But with a single core, 1 thread could be focused on background tasks and 1 thread on DF... :( Now there is 2 threads going to waste?

So anyway my first real important question is this. If DF uses as much resources as it can while it can.. and the  Intel Core i7 4510U 2.0GHz (4M Cache, up to 3.1GHz)
Well I got told, the processor will boost from 2.0 to 3.1 when it needs to. So... Shouldn't DF be boosting it to 3.1? Or was this all just a waste of money? Anyway to make DF used all 3100 MHz? Cause if it's just gonna use the 2.0 GHz then.. I should have just stuck with my old laptop, which I think was a 2.3GHz Duel core. Then again this has 8Gb RAM and the other 4.

Another question. I brought an SSD hard drive which should make DF faster right? Especially when saving and loading?

I'm sorry. Am really quite new to Hardware.
Am loving this laptop though. Boots up and shuts down in literally 3 seconds flat. It's meant to be for my writing, and for DF.

Any help would be greatly appreciated.
Logged

Putnam

  • Bay Watcher
  • DAT WIZARD
    • View Profile
Re: Question Making Dwarf Fortress Faster (Processor and Other Questions)
« Reply #1 on: January 02, 2015, 08:07:02 pm »

Yes, two threads per core.
Three threads are going to background tasks, not just one.
DF's CPU usage should make the CPU ramp up properly, yeah.
SSD should make DF ludicrously faster at saving and loading and not much else.

There is no such thing as a really powerful single core. Any single core CPUs you will find nowadays are really old and thus completely awful by today's standards. A 5 GHz single-core Pentium 4 will be less than half as powerful per core as your i7, use twice as much power and run much, much hotter.

Dzlan

  • Bay Watcher
    • View Profile
Re: Question Making Dwarf Fortress Faster (Processor and Other Questions)
« Reply #2 on: January 03, 2015, 05:32:33 am »

Thanks for that.

Any tips on getting it to run at the full 3.1GHz as the turbo speed is at 3.1Ghz?
« Last Edit: January 03, 2015, 09:06:18 am by Dzlan »
Logged

Shadowkx

  • Escaped Lunatic
    • View Profile
Re: Question Making Dwarf Fortress Faster (Processor and Other Questions)
« Reply #3 on: January 03, 2015, 09:33:51 am »

The extra 2 cores are from Intel's hyper-threading which can be turned off in the bios (assuming that option has been exposed you may need to update the bios) which splits each core into 2 virtual cores.  Depending on your work load this is really helpful or it can be harmful. If you just want to run DF then turn it off. 

Next set the affinity for DF to be processor 1 (processor 0 will be the default for most OS stuff) see "taskset".  You can also use a program called "nice"  (sudo apt-get nice) to set the priority higher.  Read the man pages or look it up online.  For nice a negative number is a higher priority and 0 is the default most processes launch with, so setting DF to -10 should give it enough priority that it doesn't get interrupted much. 

To get the full 3.1 you need to be plugged in (laptops will use a power save mode when not plugged in which disables turbo boost)  Make sure turbo boost is enabled in the bios.  It can change second to second so you might want to check something like the below to see if it maxed out or not.

cat /sys/devices/system/cpu/cpu1/cpufreq/cpuinfo_max_freq
cat /sys/devices/system/cpu/cpu1/cpufreq/cpuinfo_cur_freq
Logged

Dzlan

  • Bay Watcher
    • View Profile
Re: Question Making Dwarf Fortress Faster (Processor and Other Questions)
« Reply #4 on: January 04, 2015, 01:19:48 am »

So I need to activate the turbo in the bios? And it only works when plugged in? Thats good.
I always plug in my laptop and take the battery out when using it for extended periods of time, generally for DF and use the battery when going out to places to write or code.
And your DF will make use of the turbo?
And I can check the frequency. I have Conky running. A friend on Skype is showing me all the ways to personalize my Linux.

Edit: How would I go about enabling turbo boost? No such option shows in the Bios. It is an Asus.
Everywhere I look, I hear it is enabled by default. So something is really wrong here.
« Last Edit: January 04, 2015, 01:28:16 am by Dzlan »
Logged

Putnam

  • Bay Watcher
  • DAT WIZARD
    • View Profile
Re: Question Making Dwarf Fortress Faster (Processor and Other Questions)
« Reply #5 on: January 04, 2015, 06:10:19 am »

Have you tried running the test while DF  is running?

Dzlan

  • Bay Watcher
    • View Profile
Re: Question Making Dwarf Fortress Faster (Processor and Other Questions)
« Reply #6 on: January 04, 2015, 06:19:07 am »

Yes. Of course.

Anyway, I think it might be solved.
I just installed i7z as someone else said other programs will not show the core running past it's non turbo limit. And I ran DF and with i7z and saw it spike up to just over 3000 every so often on core 1 or 2. So I guess it;s working according to this program.
Logged

i2amroy

  • Bay Watcher
  • Cats, ruling the world one dwarf at a time
    • View Profile
Re: Question Making Dwarf Fortress Faster (Processor and Other Questions)
« Reply #7 on: January 08, 2015, 01:21:11 am »

Just a note, but assuming you changed your graphics mode to at least STANDARD (which last I heard wasn't the default for some silly reason) DF will actually run 2 threads, one for the game itself (which will max out a core) and one tiny one for graphic processing.
Logged
Quote from: PTTG
It would be brutally difficult and probably won't work. In other words, it's absolutely dwarven!
Cataclysm: Dark Days Ahead - A fun zombie survival rougelike that I'm dev-ing for.