Bay 12 Games Forum

Dwarf Fortress => DF Dwarf Mode Discussion => Topic started by: Superdorf on December 18, 2022, 02:34:07 am

Title: Pump stack lag
Post by: Superdorf on December 18, 2022, 02:34:07 am
Finished up a 100 z-level pump stack today, using a design from this thread (http://www.bay12forums.com/smf/index.php?topic=72296.0) with 1x3 reservoirs... the system reliably drops my FPS from 80+ to 4 or lower.
I could swear I was able to get a reasonably speedy pump stack going on my old laptop, using this design. Did I do something wrong, or are pump stacks really just that laggy? :-\

Save (https://dffd.bay12games.com/file.php?id=16245)
Title: Re: Pump stack lag
Post by: Schmaven on December 18, 2022, 02:44:56 am
I remember pump stacks treating fluids differently depending on build order (top to bottom vs bottom to top).  In 1 of the build orders, the fluid is 'teleported' the entire distance in 1 tic, but 1 level at a time the other way.  Do you remember which level you started on?  I think it's just the designations that determine the function, it doesn't matter which order dwarves then assemble them.
Title: Re: Pump stack lag
Post by: Superdorf on December 18, 2022, 02:49:51 am
Hrm... I went top-to-bottom generally, but I had two architects/masons working at once. Some pumps probably finished ahead of the one directly above them. Everything was designated in order though, far as I know

edit: I turned temperature off, and that lagged just as much... which suggests the pumping itself is the problem. Maybe construction order matters in addition to designation order?
Blech, I'll hafta rebuild all the pumps if so
Title: Re: Pump stack lag
Post by: Schmaven on December 18, 2022, 09:35:49 am
I've always designated pump stacks from highest to lowest / top to bottom, and haven't seen lag that extreme that you're experiencing, but I haven't built a pump stack in the premium version yet, so it's entirely possible something changed there.  I also use that 3 tile wide reservoir on each level.  Supposedly it helps minimize temperature calculations.

On the Wiki, it doesn't specify whether building top - down is just the designation, or if it's also the order in which they are built that is the determining factor.  But the difference between 1 z-level per tick, and the entire height of the stack per tick seems like a big enough difference to cause that sort of lag spike.  Unfortunately, the only way to really test that is a lot of work.  Especially without DFHack shortcuts like superdwarf.
Title: Re: Pump stack lag
Post by: Superdorf on December 18, 2022, 12:03:48 pm
Ah, I'm still 47.05 to be clear.
I've filled up my magma reservoir to deal with the next siege, so whenever the goblins show up I'll clear the stack and do a rebuild. Thanks for helping troubleshoot!

edit: Just started tearing down pumps, and things are crumbling apart in small stacks, supported by the pumps immediately below. Construction order clearly matters, in addition to designation
Title: Re: Pump stack lag
Post by: Superdorf on December 19, 2022, 03:45:38 am
...I just rebuilt everything, one pump stack at a time, and it still tanked the FPS to 3 when I turned the monster on. I'm at my wit's end :-X

Only good news is, my reservoir makes it possible to at least magmify goblins at a reasonable speed
Title: Re: Pump stack lag
Post by: Schmaven on December 19, 2022, 08:03:59 am
It could be due to fluid flows on the outlet and magma waves in the magma sea.  If turning the stack off recovers FPS immediately, then it's the stack for sure, but if the FPS takes time to recover, I'd suspect the flow patterns.  In which case re-shaping the outlet, or even the magma sea, might be able to help.
Title: Re: Pump stack lag
Post by: Superdorf on December 19, 2022, 05:23:42 pm
FPS recovers the instant the gear assembly unlinks. Magma seems to be flowing instantaneously, it's just... crushingly slow.
Maybe the janky Ubuntu laptop I had was just better at running pump stacks? This machine's been running really well otherwise though
Title: Re: Pump stack lag
Post by: Magmacube_tr on December 19, 2022, 05:26:11 pm
Magma seems to be flowing instantaneously,

It's a very CPU-extensive process, okay! It's not my fault!
Title: Re: Pump stack lag
Post by: Schmaven on December 19, 2022, 08:36:14 pm
I'm not that familiar with other operating systems, but Windows lets you designate CPU priority to programs, and I set the DF .exe to top priority.  Maybe some setting like that is out of whack?
Title: Re: Pump stack lag
Post by: Doren I on September 16, 2023, 04:28:58 pm
I have been having this same exact problem as this thread from a year ago.  I am using the same 1x3 design for lag-less pumps stacks, moving magma up about a hundred z-levels.  Having temperature on/off makes no difference for my FPS, which is good.  The bad news is that when the pumps are moving magma, I get <1 FPS in my otherwise smoothly running fort.

I'm hesitant to rebuild my pump stack because evidently this didn't help the OP.  I have tried running it on a different, older computer too and that had no effect.  In this same fort I've been able to drain the ocean into the magma sea while still getting more frames per second than I do when the magma pump is running!  I am at a loss for what to do: I need a lot of magma for this project.  Does anyone have any advice?

This is what it looks like:
https://imgur.com/a/bmpwGP8 (https://imgur.com/a/bmpwGP8)
Title: Re: Pump stack lag
Post by: anewaname on September 17, 2023, 03:11:24 pm
I would do a tick-by-tick review of about 4 z-levels of the pump stack near the source. While I don't know how the build order of the pumps would effect the system, but suspect it will not matter if you intake 7/7 magma at the source at every intake. If you intake less than 7/7 magma at every intake, the whole pumpstack will have lag and "wave movement/magma redistribution" in those 1x3 reservoirs. I suspect the ideal powered pumpstack would have the lowest pump located 1 or 2 z-levels below the regenerating layer of the magma source, so that when 7/7 magma is moved, 7/7 magma immediately replaces it by falling down.
Title: Re: Pump stack lag
Post by: Doren I on September 17, 2023, 05:22:08 pm
This is really helpful.  I'll test this in a bit and see if it works.
Title: Re: Pump stack lag
Post by: Doren I on March 28, 2024, 04:40:01 pm
Has anyone else had this problem?  I was never able to solve it and it still happens for me on the Steam release.