Bay 12 Games Forum

Please login or register.

Login with username, password and session length
Advanced search  

Author Topic: [color=limegreen]New to DF, and having FPS problems[/color]  (Read 2480 times)

LunarBlade

  • Escaped Lunatic
    • View Profile
[color=limegreen]New to DF, and having FPS problems[/color]
« on: December 10, 2011, 02:32:08 pm »

Hello, Bay 12!

I've just recently gotten into Dwarf Fortress, and it is taking over my life! I enjoy it immensely.

However, I was hoping someone could try to help me with some strange, inconsistent performance issues I'm having with the game. I hope this is the right place to post this.

See, I started using DF with the Lazy Newb Pack. It run, but it was only after seeing it (The game, no LNP) run on my old MacBook did I realize that 25 FPS on my PC was faaar too slow. So I removed the Newb Pack and all graphics and played it vanilla. It ran great!
So I thought the problem was with LNP, and decided to try and install Phebus' graphics manually. It slowed down performance to 1 (1) FPS. Disappointed, I preserved the save files, and wiped the DF folders clean.
However, it's still running just as slow!
I've tried fiddling with the init.txt a little, but I admit I don't know what I'm doing. I've updated the drivers for the video card to the latest October version and I've found an old post that suggested I force V-Sync off for the game in the drivers' settings, so I did that. No change!
I don't understand the cause of this at all... Could someone please help?? I want to play this game, and if my shitty old MacBook can run it, how can't my sweet PC?

I have:
Windows 7 32-bit
Quad Core AMD Athelon 3.0Ghz
Nvidia GForce 9800 GT
SATA HDDs.

Please help, and if I didn't write all the info that might assist in solving this, please let me know and I'll do my best to help you help me! :D

Thanks,
LunarBlade.
Logged

proxn_punkd

  • Bay Watcher
  • Still a better dove story than Twilight
    • View Profile
Re: [color=limegreen]New to DF, and having FPS problems[/color]
« Reply #1 on: December 10, 2011, 02:55:28 pm »

Welcome to Dwarf Fortress! Have lots of !!Fun!! !

Here's an article from the DF Wiki about how to fix framerate, including things like init file options, smaller forts, and population control. It does say that using tilesets can also bog down your framerate, which is why it ran well when you removed the Lazy Newb Pack, but slowed when you installed a new tileset.
Logged

Oliolli

  • Bay Watcher
  • [PREFSTRING:unlikeability]
    • View Profile
Re: [color=limegreen]New to DF, and having FPS problems[/color]
« Reply #2 on: December 10, 2011, 03:07:09 pm »

Remember, that multi-core processors have no effect on DF preformance. Also, you may want to try butchering cats.

Also, have ‼Fun‼
Logged

Quote from: Girlinhat
When all you've got is an adjustable spanner and an entire freight warehouse of terrifying cogs and gears, everything looks like "just a prototype".
Quote from: ThatAussieGuy
You all turned Swordthunders into a bastion of madness that seems to warp in on itself under its own hatred of sanity.  I'm so happy!
Quote from: Loud Whispers
drowning babies everywhere o-o

Vattic

  • Bay Watcher
  • bibo ergo sum
    • View Profile
Re: [color=limegreen]New to DF, and having FPS problems[/color]
« Reply #3 on: December 10, 2011, 08:54:58 pm »

Remember, that multi-core processors have no effect on DF preformance.butchering cats.
I read that multi-core processors tend to perform better than single-core even when running single threaded software. You can have a whole core dedicated to DF with the OS or other software on the rest.
Logged
6 out of 7 dwarves aren't Happy.
How To Generate Small Islands

Putnam

  • Bay Watcher
  • DAT WIZARD
    • View Profile
Re: [color=limegreen]New to DF, and having FPS problems[/color]
« Reply #4 on: December 11, 2011, 02:07:03 am »

Remember, that multi-core processors have no effect on DF preformance.butchering cats.
I read that multi-core processors tend to perform better than single-core even when running single threaded software. You can have a whole core dedicated to DF with the OS or other software on the rest.

Yes, but Win7 tends to divide up single-core processes into multiple cores for no fucking reason.

Funk

  • Bay Watcher
    • View Profile
Re: [color=limegreen]New to DF, and having FPS problems[/color]
« Reply #5 on: December 11, 2011, 08:59:42 pm »

that tops windows ME in dumb move makeing.
Logged
Agree, plus that's about the LAST thing *I* want to see from this kind of game - author spending valuable development time on useless graphics.

Unofficial slogan of Bay 12 Games.  

Death to the false emperor a warhammer40k SG

malloc

  • Bay Watcher
    • View Profile
Re: [color=limegreen]New to DF, and having FPS problems[/color]
« Reply #6 on: December 12, 2011, 07:10:49 am »

Yes, but Win7 tends to divide up single-core processes into multiple cores for no fucking reason.
If this was actually possible, CPUs would long ago have evolved into GPU-like stream procession units, which would mean a huge performance boost.

Unless the process actually makes use of multiple threads, there will be no diving up processes, no one have actually thought of an efficient way to do it using ordinary programming paradigms.
If you think it's stupid that your system divides processes evenly among cores, then would you rather have a process lagging behind because one core is busy executing some other thread, while your other three cores are doing nothing?

And to OP: The reason why DF is running slow is actually quite simple, your CPU is slow if it's not allowed to make use of all four cores, which is often the case with AMD CPUs, consider using smaller and simpler embarks. Also, try updating your graphics drivers if you have found a correlation between performance and graphics.
Logged

Tharwen

  • Bay Watcher
    • View Profile
Re: [color=limegreen]New to DF, and having FPS problems[/color]
« Reply #7 on: December 12, 2011, 09:10:12 am »

Remember, that multi-core processors have no effect on DF preformance.butchering cats.
I read that multi-core processors tend to perform better than single-core even when running single threaded software. You can have a whole core dedicated to DF with the OS or other software on the rest.

Yes, but Win7 tends to divide up single-core processes into multiple cores for no fucking reason.

If you mean hyperthreading, that's Intel's doing, not Microsoft's.
Logged
[Signature]

Anathema

  • Bay Watcher
    • View Profile
Re: [color=limegreen]New to DF, and having FPS problems[/color]
« Reply #8 on: December 12, 2011, 09:13:51 am »

So I removed the Newb Pack and all graphics and played it vanilla. It ran great!
So I thought the problem was with LNP, and decided to try and install Phebus' graphics manually. It slowed down performance to 1 (1) FPS. Disappointed, I preserved the save files, and wiped the DF folders clean.
However, it's still running just as slow!

I'd install a clean copy of vanilla DF (separate folder), confirm that it's still running great, then separately install LNP or vanilla+Phoebus or whatever slow-running version of your choice in a different folder. Then compare the init.txt and d_init.txt carefully between your two installs.. graphics packs have to change init.txt because that's what controls which graphics get used, and they may have inadvertently changed some other init.txt option that has a major impact on fps (at least, for your system).

Yes, but Win7 tends to divide up single-core processes into multiple cores for no fucking reason.
If you mean hyperthreading, that's Intel's doing, not Microsoft's.

Actually no, this is something Windows does that has nothing to do with hyperthreading. See below:
http://imageshack.us/photo/my-images/525/cpuswapping.png
This is a 4-core cpu without hyperthreading. DF is the only process consuming any notable amount of cpu, and it's consistently using 25% (i.e. one full core). Look at CPUs 2 and 3 - note how 3 occasionally dips below full use and 2 correspondingly spikes; DF is getting arbitrarily swapped between 2 and 3. Note this is hardly unusual behavior, I just loaded up DF and saw it happening within seconds. Now I'm not claiming this has any noticeable effect on FPS, but it is certainly happening.
« Last Edit: December 12, 2011, 09:36:25 am by Anathema »
Logged
The good news is that ghosts die of old age.

Tharwen

  • Bay Watcher
    • View Profile
Re: [color=limegreen]New to DF, and having FPS problems[/color]
« Reply #9 on: December 12, 2011, 12:19:20 pm »

Yes, but Win7 tends to divide up single-core processes into multiple cores for no fucking reason.
If you mean hyperthreading, that's Intel's doing, not Microsoft's.

Actually no, this is something Windows does that has nothing to do with hyperthreading. See below:
http://imageshack.us/photo/my-images/525/cpuswapping.png
This is a 4-core cpu without hyperthreading. DF is the only process consuming any notable amount of cpu, and it's consistently using 25% (i.e. one full core). Look at CPUs 2 and 3 - note how 3 occasionally dips below full use and 2 correspondingly spikes; DF is getting arbitrarily swapped between 2 and 3. Note this is hardly unusual behavior, I just loaded up DF and saw it happening within seconds. Now I'm not claiming this has any noticeable effect on FPS, but it is certainly happening.

But it's still only ever using 1 core. I'm not sure exactly what you're saying...
Logged
[Signature]

Putnam

  • Bay Watcher
  • DAT WIZARD
    • View Profile
Re: [color=limegreen]New to DF, and having FPS problems[/color]
« Reply #10 on: December 12, 2011, 07:32:55 pm »

Yes, but Win7 tends to divide up single-core processes into multiple cores for no fucking reason.
If you mean hyperthreading, that's Intel's doing, not Microsoft's.

Actually no, this is something Windows does that has nothing to do with hyperthreading. See below:
http://imageshack.us/photo/my-images/525/cpuswapping.png
This is a 4-core cpu without hyperthreading. DF is the only process consuming any notable amount of cpu, and it's consistently using 25% (i.e. one full core). Look at CPUs 2 and 3 - note how 3 occasionally dips below full use and 2 correspondingly spikes; DF is getting arbitrarily swapped between 2 and 3. Note this is hardly unusual behavior, I just loaded up DF and saw it happening within seconds. Now I'm not claiming this has any noticeable effect on FPS, but it is certainly happening.

But it's still only ever using 1 core. I'm not sure exactly what you're saying...

I unlimited my FPS in DF to show you exactly what I'm talking about up there.

As it turns out, I legitimately get 8500 FPS in the arena with no creatures. Man, pathfinding's a bitch.

Anyway:


As you can see, the work is divided up pretty evenly along the CPUs, but is mostly on the fourth. With all 4 CPUs allowed, I get 8300 or so FPS in the arena; without, I get...

50 less FPS and a much louder CPU fan.

WTF?

Anathema

  • Bay Watcher
    • View Profile
Re: [color=limegreen]New to DF, and having FPS problems[/color]
« Reply #11 on: December 12, 2011, 08:44:51 pm »

But it's still only ever using 1 core. I'm not sure exactly what you're saying...

You're right that it's a single-thread process and only one core is processing DF at any given instant, but it's constantly (and needlessly) switching it back and forth between two cores; look at the screenshot, it's rarely or ever 100% core 3 or 100% core 2, it's spreading DF between the two cores as much as it can. There is a cost (time) associated with shifting a process and its accompanying cache between processors - this is why people sometimes recommend setting DF's processor affinity to improve fps. Which is more trouble than it's worth I think, the cost is pretty trivial, and FPS varies enough on its own that it's hard to even notice. All of which has nothing to do with the OP's graphics pack issue, of course :P

Putnam: if I understand correctly, you're saying you lose a little FPS by limiting DF to one core? Could be because it's not strictly a single-threaded app - I think the graphics get put on a second core. Which isn't much processing, but enough to explain losing 50 FPS out of 8300.
« Last Edit: December 12, 2011, 08:59:52 pm by Anathema »
Logged
The good news is that ghosts die of old age.

Caldfir

  • Bay Watcher
    • View Profile
Re: [color=limegreen]New to DF, and having FPS problems[/color]
« Reply #12 on: December 12, 2011, 10:52:22 pm »

The reason windows does that is because it spreads the heat generated from the calculations on each core more evenly at low use levels, and saves a bit of electricity. 

Threads are typically only scheduled for milliseconds at a time, so it really doesn't cost the processor anything to do things that way.  Doesn't give you any real kind of speed boost though. 
Logged
where is up?

Tharwen

  • Bay Watcher
    • View Profile
Re: [color=limegreen]New to DF, and having FPS problems[/color]
« Reply #13 on: December 14, 2011, 01:03:21 pm »

But it's still only ever using 1 core. I'm not sure exactly what you're saying...

You're right that it's a single-thread process and only one core is processing DF at any given instant, but it's constantly (and needlessly) switching it back and forth between two cores; look at the screenshot, it's rarely or ever 100% core 3 or 100% core 2, it's spreading DF between the two cores as much as it can. There is a cost (time) associated with shifting a process and its accompanying cache between processors - this is why people sometimes recommend setting DF's processor affinity to improve fps. Which is more trouble than it's worth I think, the cost is pretty trivial, and FPS varies enough on its own that it's hard to even notice. All of which has nothing to do with the OP's graphics pack issue, of course :P

Putnam: if I understand correctly, you're saying you lose a little FPS by limiting DF to one core? Could be because it's not strictly a single-threaded app - I think the graphics get put on a second core. Which isn't much processing, but enough to explain losing 50 FPS out of 8300.

OK, I see. So it basically comes down to how well Microsoft has tuned the algorithm to balance core-shifting overhead and finding a relatively load-free core.
Logged
[Signature]