Bay 12 Games Forum

Please login or register.

Login with username, password and session length
Advanced search  

Author Topic: Magma pump stacks, lag, and FPS - fourteen years later  (Read 1762 times)

xadism

  • Bay Watcher
    • View Profile
Magma pump stacks, lag, and FPS - fourteen years later
« on: January 22, 2024, 01:14:58 pm »

It's been 14 years since this legendary thread, which is still linked from the wiki as the authoritative discussion on magma pump stack design and how it affects FPS. Question: is pump stack lag even still an issue? Does the 3x1 reservoir design still make a difference vs. the 1x1 reservoir?

The reason I ask: I went to test it for !!SCIENCE!! and I couldn't reproduce the lag problem.  I'm in 0.50.11.  I built a 10 Z-level pump stack and turned it on ... no change in FPS.  So I built a 25-level pump stack, and even spent two in-game years linking up 50 little drawbridges so that my entire pump stack could be converted on-the-fly between a 1x1 reservoir design and a 3x1 reservoir design.  And still - no change in FPS.

In the latter case of my 25-level pump stack in a 210-dwarf, 12-year-old fort:
  • pump stack off:  22FPS
  • pump stack on, 1x1 reservoirs: 22FPS
  • pump stack on, 3x1 reservoirs: 22FPS


I went back and forth several times and saw no change in FPS whatsoever.  Before you ask, yes, temperature was switched on, and when I switch on the stack I can see the temperature changing both with warmth indicators in mining mode and #probe in DFHack.

So ... did Toady fix the magma-pump-lag/presumed temperature-recalculation issues?  Should the wiki be updated that people shouldn't worry about pump stack lag anymore?  Or do other people still have this problem and I've found some magical solution?  Or something else?

Please help me, it's for !!SCIENCE!!.

The only thing I can think of I've really done different are 1) I surrounded my entire pump stack with constructed walls,  so I never accidentally mine into it while it's running. And dug tunnels around those walls for construction access because I built the walls after the channels and pumps were in place. And 2) I added the drawbridges to the reservoirs on each level.  Except those weren't there in my first 10-Z-level test, and I didn't see lag there either.   This is what my pump stack levels look like:


.......
.=====.
.=B.B=.
.==%==.
X.D%=..
..=_=..
..===..
.......
 


Where = is a constructed wall, . is an empty tile, %% is the pump (pumping North), _ is a channel, B is a one-tile drawbridge, D is an access door, and X is the staircase.

Many thanks for input from the more experienced Dwarvish scientists in the forum!
Logged

Schmaven

  • Bay Watcher
  • Abiding
    • View Profile
Re: Magma pump stacks, lag, and FPS - fourteen years later
« Reply #1 on: January 22, 2024, 05:32:41 pm »

25 Z-levels is a rather small pump stack in the absence of magma tubes.  It might be a noticeable difference with 100+ Z-level pump stacks.  Also, computers were slower 14 years ago, so perhaps those temperature calculations are no longer a bottleneck?
Logged

anewaname

  • Bay Watcher
  • The mattock... My choice for problem solving.
    • View Profile
Re: Magma pump stacks, lag, and FPS - fourteen years later
« Reply #2 on: January 22, 2024, 11:22:31 pm »

The source tile at the bottom of the pump, is it constantly being refilled by 7/7 magma due to magma at a higher level (meaning the stack draws in 7/7 or nothing every time it pulls)?
Logged
Quote from: dragdeler
There is something to be said about, if the stakes are as high, maybe reconsider your certitudes. One has to be aggressively allistic to feel entitled to be able to trust. But it won't happen to me, my bit doesn't count etc etc... Just saying, after my recent experiences I couldn't trust the public if I wanted to. People got their risk assessment neurons rotten and replaced with game theory. Folks walk around like fat turkeys taunting the world to slaughter them.

xadism

  • Bay Watcher
    • View Profile
Re: Magma pump stacks, lag, and FPS - fourteen years later
« Reply #3 on: January 23, 2024, 03:30:38 am »

The source tile at the bottom of the pump, is it constantly being refilled by 7/7 magma due to magma at a higher level

Not in my case, no.  The source reservoir is being fed from one level above, with a 2-wide feeder.  But the pump stack is still dramatically faster than the refill rate.  The reservoir, which is 3x8, gets drained pretty low while the stack is running.  With the source tile itself typically only having 0 or 1 deep magma.  Here's some shots of levels -99 and -100 with the pump off, and again with the pump on. 

https://imgur.com/a/QA8q7r6

Logged

xadism

  • Bay Watcher
    • View Profile
Re: Magma pump stacks, lag, and FPS - fourteen years later
« Reply #4 on: January 23, 2024, 03:55:20 am »

25 Z-levels is a rather small pump stack in the absence of magma tubes.  It might be a noticeable difference with 100+ Z-level pump stacks.  Also, computers were slower 14 years ago, so perhaps those temperature calculations are no longer a bottleneck?

For where I need to get the magma, I have to go 120 levels, so I guess I'll know soon!  While it's true that computers are faster, other things (like lots of dwarves) can still slow a fort way down.   And the original thread makes some pretty extreme warnings: 

"10-level pump stacks of that style, which is shown on the wiki and is the most commonly-cited style for new players due to its efficiency, can drop a fort at 50 FPS down to 20 while they're running. 30-high stacks can drop 100 FPS forts to single digits"

If a 30-high stack could take 100FPS down to < 10FPS back then, it seems odd that a 25-high stack would have no visible effect whatsoever on FPS just due to a faster computer.  I think it's more likely that Toady made some optimizations to the temperature-calculation code sometime in the last 14 years, which is great if so, and maybe means the wiki needs some updates.   But I'm curious what experiences others have had with pump stacks.   This is my first one, so i don't know if my experience is typical.

But your  suggestion is a good one.  And I have a couple of 10+ year vintage laptops sitting around I may bust out soon for !!SCIENCE!!.  I'll report back what I find both with the older machines and the 120 level stack.   
Logged

Schmaven

  • Bay Watcher
  • Abiding
    • View Profile
Re: Magma pump stacks, lag, and FPS - fourteen years later
« Reply #5 on: January 23, 2024, 06:46:53 am »

It's quite a bit of work to build a large pumpstack.  I haven't made one up from the magma sea in the premium version yet.  I just have a few dozen magma smelters, so the minecart method was easiest.  A magma moat and magma-fall would be nice at some point though, so a large pumpstack is somewhere in my future.

I read a while back that the designation order of building the pumps in the pump stack can make a big difference.  Designating from the bottom up being the best way.  Maybe that performance boost negates the temperature effects?
Logged

xadism

  • Bay Watcher
    • View Profile
Re: Magma pump stacks, lag, and FPS - fourteen years later
« Reply #6 on: January 24, 2024, 10:51:41 am »

I read a while back that the designation order of building the pumps in the pump stack can make a big difference.  Designating from the bottom up being the best way.  Maybe that performance boost negates the temperature effects?

I'm going to find out.  It's one of the things I'm testing in this week's science project.  I'm literally going to have seven parallel pump stacks, each of which varies just one variable from the base design.  Most of them are built simultaneously with DFHack (using blueprints, quickfort, and the dig-now and build-now commands).  But the last two stacks will be built by the dwarves, designated one at a time bottom-up and top down, to see what difference that makes.
Logged