Bay 12 Games Forum

Please login or register.

Login with username, password and session length
Advanced search  

Author Topic: Periodic Lag, no apparent cause. Suggestions?  (Read 558 times)

EkarusRyndren

  • Escaped Lunatic
    • View Profile
Periodic Lag, no apparent cause. Suggestions?
« on: September 02, 2012, 06:49:29 pm »

I'm running DF 34.11 and my past few forts have around year two or three started lagging with different numbers for population, as well as layouts. I've changed settings (Disabled weather, temperature, invasions) and had no luck, I've had this problem since 34.10 and gained no understanding of the cause. Originally I assumed it was my crappy laptop getting worse... (I'm running vista 32 bit, 2 gigs of RAM, a 1.6 GHz Dual core processor) I've tried eliminating unnecessary paths around the fort, reassigning traffic designations, setting the high designation to match normal, even a suggestion to remove wells with no luck. No hidden fun stuff, no (visible) invasions, nothing.

It lasts about 30 seconds then I get about twenty of game play, there's no apparent change in CPU usage before, during, or after these periods of lag. This lag only happens while the game is running, if paused it's perfectly fine. Attempting to preform actions (click, pause the game, activate the "look" mode, etc) will cause nothing to happen at first, but once the lag is over the game will execute them though I've noticed if you try to do more than a few things windows will determine dwarf fortress is "not responding" and ask me if I want to close it.

The only "consistent" variables I can think of are one: I have a tenancy to stockpile (at least what I believe to be) obscene amounts of metal bars (At one point over 10 thousand) and I'm also using Dwarf Therapist and DFHack.

If anyone has had experience with this, or at least some more suggestions to possibly fix this I would be greatly appreciative. Also, Apologies in advance if this is on the wrong thread wasn't too sure if it was a bug or me just being stupid. I would very much like to get back to loosing forts to fun as apposed to lag.
Logged

Quietust

  • Bay Watcher
  • Does not suffer fools gladly
    • View Profile
    • QMT Productions
Re: Periodic Lag, no apparent cause. Suggestions?
« Reply #1 on: September 02, 2012, 08:05:51 pm »

When the game freezes, is there any disk activity going on?
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.

Hyndis

  • Bay Watcher
    • View Profile
Re: Periodic Lag, no apparent cause. Suggestions?
« Reply #2 on: September 02, 2012, 10:44:58 pm »

In my experience it appears to be related to smelters doing a periodic status check.

If you have vast amounts of metal bars or metal ore, or any thing a smelter can potentially make use of, that will cause the slow down.

Every so often the smelter will check to see how much of potentially usable items you have available. If you have a very large number of items this will temporarily cause the game to stop for a few seconds until it finishes counting up these items. This is similar to the stocks menu being slow if you have a lot of items in the fortress.

The more smelters you have and the more material the smelters can potentially work with, the greater the slowdown is.

The way around this is to either get rid of smelters, or get rid of the metal. Somehow. Forge the metal into items.

Doing this reduces the amount of counting the game needs to do, which should then speed things up.
Logged

EkarusRyndren

  • Escaped Lunatic
    • View Profile
Re: Periodic Lag, no apparent cause. Suggestions?
« Reply #3 on: September 02, 2012, 10:46:40 pm »

In my experience it appears to be related to smelters doing a periodic status check.

If you have vast amounts of metal bars or metal ore, or any thing a smelter can potentially make use of, that will cause the slow down.

Every so often the smelter will check to see how much of potentially usable items you have available. If you have a very large number of items this will temporarily cause the game to stop for a few seconds until it finishes counting up these items. This is similar to the stocks menu being slow if you have a lot of items in the fortress.

The more smelters you have and the more material the smelters can potentially work with, the greater the slowdown is.

The way around this is to either get rid of smelters, or get rid of the metal. Somehow. Forge the metal into items.

Doing this reduces the amount of counting the game needs to do, which should then speed things up.
EDIT: Disc reads and writes to not seem to be increasing with the spikes.

Still working on getting another fort to the point where it happens again (Because out of stupidity I deleted the bloody thing), but out of curiosity will forbidding the metal and/or forges do any good?
« Last Edit: September 03, 2012, 11:08:04 pm by EkarusRyndren »
Logged