Bay 12 Games Forum

Please login or register.

Login with username, password and session length
Advanced search  

Author Topic: Help me with some fort issues  (Read 753 times)

Slyjoker87

  • Bay Watcher
    • View Profile
Help me with some fort issues
« on: August 16, 2014, 11:19:16 pm »

So I'm running a fort on OSX and I'm having a few issues:

1. My FPS is hovering around 30. My fort in its 6th year, population is 110, embark is 3x3, pocket world, no world history. I've tried using DFHack to clean, I've turned off spotlight search, and I've tried to optimize traffic. Still can't get it to run any faster and CPU is showing 100% use.

2. One of my indoor farms refuses to plant past 50% capacity. It's weird because its like it plants one side and leave the other side empty as a mirror image.

3. Several types of plants refuse to be planted (i.e. Asparagus).

As for the CPU / FPS issues, I'm running a late 2010 Imac core i7 @ 2.9 Ghz with 12GB RAM.

So, anyone have any thoughts?

EDIT:

DFhack command "Flows" gives the following:

Code: [Select]
Counting flows and liquids ...
Blocks with liquid_1=true: 14
Blocks with liquid_2=true: 9
Blocks with both:          9
Water tiles:               5393
Magma tiles:               45912

EDIT:

Turning off temperatures gives 1-2 FPS increase at most (if at all).

EDIT:

I tried booting into windows on the same machine, and I'm getting an increase of about 10-15 FPS running native. Perhaps there are some significant Linux / OSX optimization problems going on here?

EDIT:

In an effort to conduct some !!SCIENCE!! I installed the windows version and tried running it through WINE. Turns out I get about 50% boost in FPS running through WINE instead of using Toady's download for OSX. Not sure why this is happening, but perhaps it has to do with running 32-bit vs 64-bit versions?

Now my only problem is running Therapist because the OSX version can't hook into the wine DF. Thoughts?
« Last Edit: August 17, 2014, 11:43:38 am by Slyjoker87 »
Logged

Chevaleresse

  • Bay Watcher
  • A knight, returned from a journey weary and long
    • View Profile
    • Patreon
Re: Help me with some fort issues
« Reply #1 on: August 17, 2014, 12:04:11 am »

DF can only use one core iirc, so multiple cores will not help. How many critters do you have running around? Caging them will help. Flowing liquids are hell for your FPS as well, particularly magma because it creates temperature recalculations.

I don't think all of the new plants are implemented yet, so lots of them will have this flaw.

No idea about #2.
Logged
GM of Trespassers V2.
If you like my work, consider becoming a patron. (Since apparently people think this is a requirement: no, my game(s) are free to play and always will be.

Slyjoker87

  • Bay Watcher
    • View Profile
Re: Help me with some fort issues
« Reply #2 on: August 17, 2014, 12:43:34 am »

DF can only use one core iirc, so multiple cores will not help. How many critters do you have running around? Caging them will help. Flowing liquids are hell for your FPS as well, particularly magma because it creates temperature recalculations.

I don't think all of the new plants are implemented yet, so lots of them will have this flaw.

No idea about #2.

I only have about 14-15 animals and 15 other (random beasts, etc).

I did dig down to the lava levels. I tried using DFhack temp fixes and that didn't seem to do much more than 3-4 FPS boost.
Logged

Deboche

  • Bay Watcher
    • View Profile
Re: Help me with some fort issues
« Reply #3 on: August 17, 2014, 01:04:46 am »

I gave up on a fort recently because of fps death. It's better to make your embark area small, have a pop cap and keep few animals.

Also try to sell off as much of your stuff as possible to caravans. Get rid of all extra items you don't need like tattered clothing, corpses and so on.

And also don't dig anymore than you have to. Walling off areas of the fortress that you don't need seems to help.

As for the farm problem, maybe some of the tiles were exposed to light. When soil is exposed to light, it never goes back to being considered underground.
Logged

Dwimenor

  • Bay Watcher
    • View Profile
Re: Help me with some fort issues
« Reply #4 on: August 17, 2014, 02:41:35 am »

1. My FPS is hovering around 30. My fort in its 6th year, population is 110, embark is 3x3, pocket world, no world history. I've tried using DFHack to clean, I've turned off spotlight search, and I've tried to optimize traffic. Still can't get it to run any faster and CPU is showing 100% use.
Lower your population cap. In Launcher set it to 50, kids: 5:10. Open init editor and manually set hard_cap to something about 70. If you are aiming for king, dragons, sieges and other endgame FUN, set pop cap to 80, and hard cap to 100 (I hope I don't miss anything)
Make smaller embark zone:2x2, look for place without rivers.
Make less items. Open advanced stock menu (z->stocks->e), switch to per item view (tab) and see how many items you have. Do you need all those crafts? Doesn't worn cloths clutter in your fort? Do you need to have 300 iron bars reserve? Do you have a lot of stone lying around? Read about quantum stockpiling (although I'm not great fan of it)
Don't use rendermax, that's HUGE cpu eater.
"clean all" command from dfhack can give you 1-2 fps, but it's not worth loosing some FUN
Turn off temperature. Thats the biggest cpu eater in the game. Turning off weather also helps a bit.
Think about your fort design. In theory 1 tile wide corridors are better (less pathfinding) but this means more collisions. I use 3 tile wide corridors as a compromise between pathfinding, esthetic and dwarf collisions. "Anthill" like design also doesn't help your CPS (tree-like design with main trunk is somehow better)

Also read what Deboche said about walling unused areas.
Logged

Dame de la Licorne

  • Bay Watcher
  • Cats? Check. FPS? Uh-oh...
    • View Profile
Re: Help me with some fort issues
« Reply #5 on: August 17, 2014, 04:06:43 am »

Slyjoker87,

So I'm running a fort on OSX and I'm having a few issues:

1. My FPS is hovering around 30. My fort in its 6th year, population is 110, embark is 3x3, pocket world, no world history. I've tried using DFHack to clean, I've turned off spotlight search, and I've tried to optimize traffic. Still can't get it to run any faster and CPU is showing 100% use.

This happens with large populations, regardless of history/world size.  Are your animals in a pen/pasture, or are they free to roam the fort from meeting area to meeting area?  If they're free, assign them to a pen/pasture zone, it may help a smidge.  Also, as suggested by others, look around for any moving water/magma (flows and pathing are the two main cpu hogs, once you've cleaned all of the spatter & owned items).  Something else to check: how much *stuff* do you have?  If you've made a lot, the game spends an inordinate amount of cpu space/time tracking each and every little thing, unless you trade it to a caravan and get it off your map.  And as Dwimenor suggested, turn off weather/temperature in the init to gain some FPS.

Quote
2. One of my indoor farms refuses to plant past 50% capacity. It's weird because its like it plants one side and leave the other side empty as a mirror image.

Is the unplanted part of the farm by any chance labled "inside (or outside), dark (or light), aboveground"?  If yes, your dwarves will *never* plant underground crops in it, even if you roof it over (this bug has been around ever since the transition to 3D).

Quote
3. Several types of plants refuse to be planted (i.e. Asparagus).

As stated before, this is common to many of the new plants, because ToadyOne hasn't finished them yet.

-Dame de la Licorne
« Last Edit: August 17, 2014, 04:08:42 am by Dame de la Licorne »
Logged
If software was real world, then it'd be something equivalent of hitting a nail with a hammer and having a building collapse on the other side of town.

Don't worry people, sometimes -moments occur

martinuzz

  • Bay Watcher
  • High dwarf
    • View Profile
Re: Help me with some fort issues
« Reply #6 on: August 17, 2014, 06:53:51 am »

Flowing liquids are hell for your FPS as well, particularly magma because it creates temperature recalculations.
Not really. Only poorly built magma pump stacks, and perhaps magmafalls as well, will cause temperature recalculations.

Temperature recalculations do not happen that often at all with flowing magma.
Only when a tile adjecent to magma loses all magma neighbors, or a tile that was not adjecent to magma gains a magma neighbor, will it's temperature need to be recalculated.
1/7 magma still heats neighboring tiles. So a pool with 5/7 magma wobbling about will not cause more fps drain that that same pool with 5/7 water.

Practical example with pump stacks:
I will try to explain while this pumpstack configuration will not cause temperature recalculations:
Code: [Select]
wwwww   wwwww   w - wall
ww.ww   w+++w   . - channel (pump intake)
wwVww   ww^ww   + - floor
wwVww   ww^ww   V  ^
w+++w   ww.ww   V, ^ - pump (from north, from south)
wwwww   wwwww
z(0)    z(1)
While this one does:
Code: [Select]
wwwww   wwwww
ww.ww   ww+ww
wwVww   ww^ww
wwVww   ww^ww
ww+ww   ww.ww
wwwww   wwwww
z(0)    z(1)

Let's start with the bad pumpstack, and see what happens over time, when it actually pumps magma.
Code: [Select]
wwwww   wwwww
ww.ww   ww+ww   7 - 7/7 magma
wwVww   ww^ww
wwVww   ww^ww
ww7ww   ww.ww
wwwww   wwwww
z(0)    z(1)
at t=0, we have some magma in the bottom pump's output reservoir, heating up the walls around it, and the part of the pump it touches.

Code: [Select]
wwwww   wwwww
ww.ww   ww7ww
wwVww   ww^ww
wwVww   ww^ww
ww+ww   ww.ww
wwwww   wwwww
z(0)    z(1)
at t=1, the pump sucked up the 7/7 magma from the bottom level, causing it's surrounding tiles to recalculate temperature, and the magma now heats the tiles around the upper pump level's output reservoir. These states will keep switching, causing temperature recalculations on every frame the pumps are actively filling something. They will eventually stabilize once whatever it is you're filling is full, and no more new magma needs to be sucked through. FPS pain though, when activating a larger pumpstack made of these elements.

Now the other design. Why does this not drain FPS?
Code: [Select]
wwwww   wwwww
ww.ww   w+++w
wwVww   ww^ww
wwVww   ww^ww
w777w   ww.ww
wwwww   wwwww
z(0)    z(1)
at t=o, the tiles surrounding the bottom pump's output reservoir are all heated.
Code: [Select]
wwwww   wwwww
ww.ww   w+7+w   1 - 1/7 magma
wwVww   ww^ww
wwVww   ww^ww
w1.1w   ww.ww
wwwww   wwwww
z(0)    z(1)
at t=1, the tiles surrounding the bottom pump's output reservoir are still heated, thanks to the 1/7 magma left on both sides of the center, from which the pump above draws.
There will be no more effect on FPS once this pump stack is running, it will not need any recalculations after first initialization.

EDIT: crap, colours don't work together with code tags :( I had painted it so nicely maroon and red for you.
« Last Edit: August 17, 2014, 06:55:22 am by martinuzz »
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

Slyjoker87

  • Bay Watcher
    • View Profile
Re: Help me with some fort issues
« Reply #7 on: August 17, 2014, 09:56:42 am »

Thanks for the replies guys.

As for the FPS stuff, I am just surprised at how poorly its performing considering I've run 4x4 forts with 100 pop cap just fine in prior versions.

As for the farm, it's never been exposed before and says nothing of the sort. Could tree roots be at fault here?

EDIT:

DFhack command "Flows" gives the following:

Code: [Select]
Counting flows and liquids ...
Blocks with liquid_1=true: 14
Blocks with liquid_2=true: 9
Blocks with both:          9
Water tiles:               5393
Magma tiles:               45912

EDIT:

Turning off temperatures gives 1-2 FPS increase at most (if at all).
« Last Edit: August 17, 2014, 11:08:07 am by Slyjoker87 »
Logged

Dame de la Licorne

  • Bay Watcher
  • Cats? Check. FPS? Uh-oh...
    • View Profile
Re: Help me with some fort issues
« Reply #8 on: August 17, 2014, 01:24:46 pm »

Hiya,

There is one other possible cause for lower FPS, since the game is also simulating world-level events in the background as you play fort mode.  Toady had made some improvements with lag for the calendar screen, but I'm guessing there's a fair amount of optimization left for that background simulation.  If that's the cause, then there's nothing that you can do.

-Dame de la Licorne
Logged
If software was real world, then it'd be something equivalent of hitting a nail with a hammer and having a building collapse on the other side of town.

Don't worry people, sometimes -moments occur

martinuzz

  • Bay Watcher
  • High dwarf
    • View Profile
Re: Help me with some fort issues
« Reply #9 on: August 17, 2014, 02:07:36 pm »

If that's the cause, then there's nothing that you can do.

You could roll an adventurer and dwarfly euthanize every single sentient creature on the map, then unretire your fortress....
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

Slyjoker87

  • Bay Watcher
    • View Profile
Re: Help me with some fort issues
« Reply #10 on: August 17, 2014, 02:57:36 pm »

Hiya,

There is one other possible cause for lower FPS, since the game is also simulating world-level events in the background as you play fort mode.  Toady had made some improvements with lag for the calendar screen, but I'm guessing there's a fair amount of optimization left for that background simulation.  If that's the cause, then there's nothing that you can do.

-Dame de la Licorne

Actually, it seemed to be related to the OSX release. The windows version using WINE runs much faster. No idea why.
Logged