Bay 12 Games Forum

Please login or register.

Login with username, password and session length
Advanced search  

Author Topic: [0.40.24] FPS issues for unknown reason  (Read 1196 times)

b12f

  • Escaped Lunatic
    • View Profile
[0.40.24] FPS issues for unknown reason
« on: December 18, 2015, 06:49:48 am »

Hi,
can you take a look at the save game and give me a hint why this save game is low fps (<30). The wiki (http://dwarffortresswiki.org/index.php/DF2014:Maximizing_framerate) doesn't help.
I have like no area under usage (only 1 floow). I got an 2.4ghz intel i7 pc with 16 gb ram with win10.
I tried locking df to one core (exclusive) and on all cores without difference . TaskMan Priority is real time.
The world (gen) size is small.
Things i tried:
I ran clean all from DfHack.
I locked the door to the wide area on first stone are which i was mining.
No flowing liquids any more.
I stopped the training if on fps gets real bad (disabled in save).
I checked checked the .
I also butchered all animals.
The caverns were not accessed yet.

Pictures of the fort:
http://imgur.com/a/X5WTW
There is a 3x3 stairs which is not shown from floor 141 to floor 130. No access to taverns.

My Question is:
How can i increase / rescue the fps in the current game?
If that's not possible how can i avoid the same mistakes if i start a new game?

Link to save game (it's a lnp based GAME but ascii default is used)
https://drive.google.com/file/d/0B_2viTLbU8uZeDdyS0w0VjRGMGs/view?usp=sharing
Link to the complete df folder.
https://drive.google.com/file/d/0B_2viTLbU8uZRkNRWTFYMUJvMWs/view?usp=sharing

I'm using version 40.24, version from JAn 2015.
Logged

Robsoie

  • Bay Watcher
  • Urist McAngry
    • View Profile
Re: [0.40.24] FPS issues for unknown reason
« Reply #1 on: December 19, 2015, 02:06:29 am »

I checked your complete df folder as i don't have 40.x anymore and noticed you have a lots of stockpiles.
I used to do the same, with specialized stockpiles and with the years making more of them , resulting in giant amount of surface taken by them, and performance dying, because dwarves will be very numerous and will calculate pathfinding to so many locations of those numerous stockpiles.

A huge performance improvement is to use a single quantum stockpile.

Quantum stockpiles have several advantage :
- they're very small and do not need to be any bigger with the time your fortress grow
- you need a single one of them for your whole fort, cutting a -hugely- lot on the many pathfinding calculations for your number dwarves.
- you can do them easily with a minecart stop :
http://dwarffortresswiki.org/index.php/Exploit#Quantum_stockpiles

Basically it's more than an exploit, it's unfortunately a must have if you want to avoid performance going bad on long lived fort.

So my recommendation is that you create a quantum stockpile near to your workshops, then delete all the other stockpiles your have so you dwarves will move all the item into the quantum one.

As you're using dfhack, to not waste time, once you have your quantum stockpile created and ready to work, pause the game, mass-design all your stockpile objects to be dumped ( press d -> b -> d to make whole dumping selection)

Once done , move the cursor to your quantum stockpile distribution point and in dfhack type
autodump
It will teleport all those objects marked for dumping to your cursor, will remove the dump mark and will forbid them all automatically

Now press d -> b -> c and mass-unforbid that way all those objects.
That's all.

Now delete all your existing stockpile so you have only that quantum one left.
With all those deleted stockpile you have many useless empty rooms that your dwarves have nothing to do in them, so you may wall them (or create doors and keep them closed) so your dwarves will not have their pathfinding calculation taking those huge spaces in account.
Basically the less the dwarves can run around, the better.

I didn't checked, but in case you have none, i recommend you create a simple atom smasher (just need a room, covered by a raisable bridge controlled by a lever), design it as the dump zone, and get rid of all the useless items that can be found on your map (the autodump works wonder there too) , the less objects, the better too.
http://dwarffortresswiki.org/index.php/Atom_smasher

That said, i recommend you to abandon that fortress and move to 42.x , the reason is that there will be more and more bugs fixed and they could make an impact on performance too.
You could load your 40.x fortress/worlds in 42.x , but due to many raw changes you may have lots of problems happening during gameplay and may miss some of the 42.x features.
dfhack is unfortunately not yet available for 42.x , so no access to that useful  autodump command, but still use quantum stockpile and atom smasher is a must to avoid the performances problems when your fort will get long lived.
« Last Edit: December 19, 2015, 02:11:04 am by Robsoie »
Logged

b12f

  • Escaped Lunatic
    • View Profile
Re: [0.40.24] FPS issues for unknown reason
« Reply #2 on: December 20, 2015, 11:05:46 am »

Thank you for the nice tipps. I'll try them out now.
Logged

omega_dwarf

  • Bay Watcher
  • Adequate Architect, Dabbling Modder
    • View Profile
Re: [0.40.24] FPS issues for unknown reason
« Reply #3 on: December 20, 2015, 12:05:31 pm »

Other general tips:

(Even) if you haven't hit magma yet, try turning off temperature. Sometimes that helps when it doesn't even make sense for it to. (You will, unfortunately, have non-deadly magma at that point.)

You can also turn down G_FPS cap (see my sig) with very little gameplay impact (basically the GUI works a little slower, but it's hardly noticeable compared to the FPS boost.)

There may also be some random fight going on in the caverns that you just can't see (some combat situations have a tendency to murder FPS, typically those involving many repeated attacks per frame.) Try using DFHack to get rid of all animals/beasties on the map. Idk the command for that.

Aerth

  • Bay Watcher
    • View Profile
Re: [0.40.24] FPS issues for unknown reason
« Reply #4 on: December 20, 2015, 03:58:06 pm »


Just a question regarding quantum Stockpiles,  Robsoie. In a fort with a population from several dozens to 2-300 dwarfs, how many of those stockpiles would you get yourself and if more than one how do you classify/regroup them?
Logged

Robsoie

  • Bay Watcher
  • Urist McAngry
    • View Profile
Re: [0.40.24] FPS issues for unknown reason
« Reply #5 on: December 20, 2015, 05:15:51 pm »

I usually limit my fort to 120/150 max pop to avoid getting DF going too slow.

At that level of population i usually only have 1 quantum stockpile that is located next to my "workshops" zone in which i regroup all my workshops , to avoid the dwarves working having to path too much distance (so they can get work done faster)
I found that for my fortress needs, only 1 quantum stockpile is enough (considering there's then no limit to how many item it can hold on such a small area)
Spoiler (click to show/hide)

Now and that is for personnal preferences, i usually do not include food in my quantum stockpile, because i prefer to put a food (and drink) stockpile next to my Dining Room, that in 42.x is additionally a part of the library (as it has many tables and chairs, so people will use that room for the drinking/eating and the reading)

Spoiler (click to show/hide)

Now if you go down to expand your fortress, i think it's a good idea to add another quantum stockpile , with only the required type of item to be used there allowed .
By example i have setup a 2nd barrack in the cavern area, in preparation for some fun things to do.
To avoid those military dwarves having to path all the way back up and down for everytime they're hungry, thirsty or need a sleep, i setup a new food/drink/armor/weapon stockpile just for them, and setup a well for the additional drink need in case they run out of wine.

The goal is still to avoid dwarves to walk too much around, as unfortunately pathfinding is (and has always been) very likely the major performance killer .
« Last Edit: December 20, 2015, 05:21:00 pm by Robsoie »
Logged

PatrikLundell

  • Bay Watcher
    • View Profile
Re: [0.40.24] FPS issues for unknown reason
« Reply #6 on: December 20, 2015, 05:26:57 pm »

Not being Robsoie (obviously), I'm still using QS. The number of them depends on demand (as in: where do I need them), basically.
My normal setup is:
- Farmer's QS: Plants, fruit, thread, cloth, masterworks clothing. All farm related industry nearby.
- Workshop QS: Stone, wood, furniture, rough gems, finished goods (except clothing, and crafts), bars, ammo, coin (basically everything).
- Refuse QS: In the decked over courtyard.
- Magma Sea QS: For magma workshops. Shifting metal bars flux stone, goblinite etc. here from Workshop QS (I don't have metal at my embarks, otherwise ore would go here)
- Sapient Refuse QS: Corpse stockpile in 0.42.03. Corpse + sapients in 0.40.24 (sapients removed from standard refuse stockpile). Sapients shifted as they're encountered.
- Trade Depot QS: Inferior quality furniture I mass produce but only want to keep masterworks of (beds, tables, chairs, cabinets, coffers,...) Removed from Workshop QS, leaving the masterworks in the workshop until placed.

Note that I use several feeder stockpiles when needed. Stone, for instance, is best hauled using wheelbarrows, and you may also want to shut hauling off by changing stockpiles to "take from links only" at times. My farmer's QS' feeder stockpile tends to stall early on, so I add a fairly large food only stockpile to avoid produce rotting in the fields for lack of stockpile space (feeding mine carts is a low priority task).

Inferior quality clothing goes into a regular bin supported stockpile close to where I strip prisoners.
Logged

Aerth

  • Bay Watcher
    • View Profile
Re: [0.40.24] FPS issues for unknown reason
« Reply #7 on: December 21, 2015, 09:04:48 am »

thanks guys! (including the not-obviously-Robsoie who was very helpfull :) )

I like to have populous fortresses (250-300) with very segmented zones for different castes (farmers, crafters, Smiths etc..), enclosed and nearly autonomous. I can live with 25-30 fps or even a bit less but I was scared with this new awesome version and the return of the invasions than this would be even too much to hope for in a full grown fortress.

Those QS stockpiles are an improvement in my context. Thanks again
« Last Edit: December 21, 2015, 11:01:43 am by Aerth »
Logged