Bay 12 Games Forum

Please login or register.

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

Author Topic: FPS and Performance. This computer can do so much more!  (Read 3134 times)

GenJeFT

  • Bay Watcher
    • View Profile
FPS and Performance. This computer can do so much more!
« on: August 07, 2014, 10:42:33 pm »

Hello.

So far this version of dwarf fortress seems to run a LOT slower in many ways (for example I cant start with as large an embark as I used to be able to).

Despite the fact it runs so slow it surprisingly does not use much in the way of system resources.

Dwarf fortress is only using a whopping 1% of my CPU and only 1.2 gigs of ram with a 134 dwarf fort.

I have 4 physical (8 logic cores)  cores running at 3.34ghz each and 12 gigs of ram. How can I get the game to use more of that in order to run faster? Its barely scratching the surface of my computers ability yet it simply seems to outright refuse to take and use what it can. My CPU is sitting at a overwhelming 10% usage rate... and that's only because I am watching youtube right now and have some recording software running.
Logged

Orange Wizard

  • Bay Watcher
  • mou ii yo
    • View Profile
    • S M U G
Re: FPS and Performance. This computer can do so much more!
« Reply #1 on: August 07, 2014, 10:50:27 pm »

DF is single-threaded, so it can only use one of your cores at any given time. There is no way, other than convincing Toady to change it, to make the game use multiple threads. Even then he'd need to tear the game apart for a longer time than DF2014's development.

DF2014 is still very much in the early optimisation stages. There's a lot more going on in the background than 34.11, and that eats up a lot of time.
You can try making smaller worlds with shorter history to reduce the load of the active world, and reading a few threads and wiki articles on maximising FPS is heartily recommended.
Logged
Please don't shitpost, it lowers the quality of discourse
Hard science is like a sword, and soft science is like fear. You can use both to equally powerful results, but even if your opponent disbelieve your stabs, they will still die.

GenJeFT

  • Bay Watcher
    • View Profile
Re: FPS and Performance. This computer can do so much more!
« Reply #2 on: August 07, 2014, 11:00:45 pm »

At this point I would be happy if it just used 50% of one of those cores. Now its using 13%.

I am currently on a small world with only 5 years of history at start (I have played for 3). I am getting a steady 20 fps but it should get higher.

I did run largeaddress aware on it.
Logged

Orange Wizard

  • Bay Watcher
  • mou ii yo
    • View Profile
    • S M U G
Re: FPS and Performance. This computer can do so much more!
« Reply #3 on: August 07, 2014, 11:02:43 pm »

Hang on, is the game using 13% of your CPU or 13% of just one core?
The former would make sense (12.5% = 1/8), the latter is worrisome.
Logged
Please don't shitpost, it lowers the quality of discourse
Hard science is like a sword, and soft science is like fear. You can use both to equally powerful results, but even if your opponent disbelieve your stabs, they will still die.

GenJeFT

  • Bay Watcher
    • View Profile
Re: FPS and Performance. This computer can do so much more!
« Reply #4 on: August 07, 2014, 11:11:00 pm »

I would like to say one core but since the CPU use bounces between 13% and a incredibly overwhelming 1% use... It seems to at best use 50% of a single core. I am not sure if that's windows 7 splitting the load across all cores on its own or what. But what I could do is since logic cores 5 and 8 are currently parked I could dedicate those to Dwarf Fortress and see what happens.


*edit*
If I manual set core use it does use 1 logic core at 100%.
« Last Edit: August 07, 2014, 11:15:30 pm by GenJeFT »
Logged

Necrisha

  • Bay Watcher
  • 0.0 0.o o.0 o.o -.- zzzZ
    • View Profile
Re: FPS and Performance. This computer can do so much more!
« Reply #5 on: August 08, 2014, 12:59:29 am »

There you go. Now if you could temporarily nullify the division of the cores you might get better performance out of one of your cores. Though at least you can use utilities on other cores that way.
Logged
EDIT: Keas restricted to tropical forests where they belong.  Those evil, EVIL, foul little things.
 
Edit: The baby murderer became a friend of the fortress, which started a loyalty cascade, and now most of the squad is dead.

martinuzz

  • Bay Watcher
  • High dwarf
    • View Profile
Re: FPS and Performance. This computer can do so much more!
« Reply #6 on: August 08, 2014, 04:15:42 am »

Perhaps a dumb question, but how can I force dwarf fortress on one core, and make other processes stay off it on win7?
Logged
Friendly and polite reminder for optimists: Hope is a finite resource

We can ­disagree and still love each other, ­unless your disagreement is rooted in my oppression and denial of my humanity and right to exist - James Baldwin

http://www.bay12forums.com/smf/index.php?topic=73719.msg1830479#msg1830479

Celarious

  • Bay Watcher
    • View Profile
Re: FPS and Performance. This computer can do so much more!
« Reply #7 on: August 08, 2014, 05:36:23 am »

Perhaps a dumb question, but how can I force dwarf fortress on one core, and make other processes stay off it on win7?

I think if you open Task Manager by pressing Ctrl + Shift + Esc, and then going to the DF process, right clicking on it, selecting "Set Affinity", and setting the core you want the process to use. I think in order to get other processes to stay off it, you'd have to manually change the affinity of every other process, which is probably extremely tedious.
Logged

Harlander

  • Bay Watcher
    • View Profile
Re: FPS and Performance. This computer can do so much more!
« Reply #8 on: August 08, 2014, 05:47:32 am »

You probably don't need to keep other processes off it anyway. As the CPU load of DF increases, it'll crowd other things off the core, I suspect.
Logged

mobucks

  • Bay Watcher
    • View Profile
Re: FPS and Performance. This computer can do so much more!
« Reply #9 on: August 08, 2014, 06:01:33 am »

My FPS is always way better when I embark on a no-tree biome.

It takes a nosedive if I designate large areas for channeling but once that's done it comes back up.
Logged

martinuzz

  • Bay Watcher
  • High dwarf
    • View Profile
Re: FPS and Performance. This computer can do so much more!
« Reply #10 on: August 08, 2014, 06:48:24 am »

You probably don't need to keep other processes off it anyway. As the CPU load of DF increases, it'll crowd other things off the core, I suspect.

Does the PRIORITY setting in the init file affect anything at all here, on a multicore machine? If I set it to HIGH, would that increase the likelyhood of other processes being kept off the core that DF is assigned to?
Logged
Friendly and polite reminder for optimists: Hope is a finite resource

We can ­disagree and still love each other, ­unless your disagreement is rooted in my oppression and denial of my humanity and right to exist - James Baldwin

http://www.bay12forums.com/smf/index.php?topic=73719.msg1830479#msg1830479

Quietust

  • Bay Watcher
  • Does not suffer fools gladly
    • View Profile
    • QMT Productions
Re: FPS and Performance. This computer can do so much more!
« Reply #11 on: August 08, 2014, 08:21:51 am »

At this point I would be happy if it just used 50% of one of those cores. Now its using 13%.
If you're running Windows, then you should know that the CPU column in Task Manager shows usage across all cores, so a single-threaded application on an 8-core CPU (e.g. a 4-core CPU with Hyperthreading) will never use more than 12-13%.
Logged
P.S. If you don't get this note, let me know and I'll write you another.
It's amazing how dwarves can make a stack of bones completely waterproof and magmaproof.
It's amazing how they can make an entire floodgate out of the bones of 2 cats.

Miuramir

  • Bay Watcher
    • View Profile
Re: FPS and Performance. This computer can do so much more!
« Reply #12 on: August 08, 2014, 04:15:40 pm »

Perhaps a dumb question, but how can I force dwarf fortress on one core, and make other processes stay off it on win7?

Beware that on most modern CPUs, this will *decrease* performance, unless you have a crazy over the top cooling rig.  The adaptive clocking routines, to over-simplify things, depend on being able to "overclock" a key core, let it heat up, and then shift the hot core's task to a different idle one when it gets close to being a problem.  This allows single-core tasks to run at a significantly higher clock rate than the chip could average over the whole surface simultaneously.  Locking a task (such as DF) to a single core defeats this, and will result in lower net performance. 

I would suspect that the OP may be running up against memory transfer limitations.  DF needs to work with far more memory than can fit into the on-die caches; it's regularly sucking gigabytes of info in from main memory on a good-sized embark.  Once you've filled the transfer pipe, it doesn't matter how much faster your CPU is, it can't suck any more data through the straw to work with. 

If the OP is into overclocking, dropping back on the CPU clocks and pushing the memory clocks up may well help; or you may already be at the limit for your hardware.  Note also that DF is far less tolerant of memory corruption than your typical shooter; I'd want a clean overnight benchmark at a given speed before trusting it to run DF, not just a few tens of minutes. 

Toady is supposedly starting to look at 64-bit versions; this may have implications for memory management if it rolls out in the near future, but it's going to be difficult to judge exactly what.  My *guess* is that it will allow larger forts without crashing, but no substantial performance changes; but things could get significantly better or even somewhat worse. 
Logged

GenJeFT

  • Bay Watcher
    • View Profile
Re: FPS and Performance. This computer can do so much more!
« Reply #13 on: August 08, 2014, 04:41:02 pm »

Perhaps a dumb question, but how can I force dwarf fortress on one core, and make other processes stay off it on win7?

Beware that on most modern CPUs, this will *decrease* performance, unless you have a crazy over the top cooling rig.  The adaptive clocking routines, to over-simplify things, depend on being able to "overclock" a key core, let it heat up, and then shift the hot core's task to a different idle one when it gets close to being a problem.  This allows single-core tasks to run at a significantly higher clock rate than the chip could average over the whole surface simultaneously.  Locking a task (such as DF) to a single core defeats this, and will result in lower net performance. 

I would suspect that the OP may be running up against memory transfer limitations.  DF needs to work with far more memory than can fit into the on-die caches; it's regularly sucking gigabytes of info in from main memory on a good-sized embark.  Once you've filled the transfer pipe, it doesn't matter how much faster your CPU is, it can't suck any more data through the straw to work with. 

If the OP is into overclocking, dropping back on the CPU clocks and pushing the memory clocks up may well help; or you may already be at the limit for your hardware.  Note also that DF is far less tolerant of memory corruption than your typical shooter; I'd want a clean overnight benchmark at a given speed before trusting it to run DF, not just a few tens of minutes. 

Toady is supposedly starting to look at 64-bit versions; this may have implications for memory management if it rolls out in the near future, but it's going to be difficult to judge exactly what.  My *guess* is that it will allow larger forts without crashing, but no substantial performance changes; but things could get significantly better or even somewhat worse.

Miuramir is correct. Setting the affinity to a single core does drop the FPS (by about 4 FPS on this system) so its best just to let the operating system bounce it from core to core.

Currently the memory clock is as fast as I can reliable push it which is about 1633MHz without blue screen errors. I can run it up to 1833MHz but that starts to trigger blue screen errors with this mother board. This motherboard is suppose to support around 2000MHz but has never been able to go over 1833mhz without blue screening on startup. Even at 1833MHz it blue screens if memory usage gets to high (or every time BOINC Manager would start processing data). So most likely what I have hit is that memory limit and until we can get volume (say with 64 bit so I can use all 12 gigs of ram) I am stuck at this speed. This ram also runs at 9 9 9 24 which is not exactly great, but its meant to be running at 2000MHz not 1633MHz which would lesson the impact of those latency numbers. Its fully possible that when I try to overclock the ram to 2000MHz I am doing something wrong like not giving it enough power to run the higher speed adequately since I dont know much about overclocking.

System specs for reference.
Windows 7 Ultimate 64-bit SP1
Intel Core i7 Extreme 975 running at 3.45GHz with no overclock (advertized as a 3.33GHz so I am quite happy)
12 gig triple channel DDR3 (this here http://www.corsair.com/en-us/vengeance-12gb-triple-channel-ddr3-memory-kit-cmz12gx3m3a2000c10)
ASUS P6T Deluxe V2 (LGA1366 motherboard)
Geforce GTX 650 Ti (2 gigs 2700MHz memory 928 GPU clock)

I dont see how this game could advance to finished without 64 bit compatibility, unless you like running in single digit FPS.
Logged

CharonX

  • Bay Watcher
    • View Profile
Re: FPS and Performance. This computer can do so much more!
« Reply #14 on: August 08, 2014, 05:20:07 pm »

Unfortunately moving from single-threaded to multi-threaded processing is a far from trivial thing.
If you are REALLY lucky you can slice off some tasks and move them into separate threads (Maybe some stuff like pathing or temperature changes could be pre-calculated and then cached, making operations that use/implement that faster - only some idle guessing here)
Logged
Pages: [1] 2