Massive IPS drops (5-20) at x15 speed when trucks can't find a destination

Performance Vehicles & Roads
omegataze [discord] · 2 months ago

Summary:
When a truck can't find a valid destination (depot full, mine control tower with no dump zone assigned, parking full), the game seems to keep retrying expensive pathfinding for these trucks in a loop. Result: the IPS (simulation tick rate) crashes in repeated sawtooth drops (e.g. 75 → 12 → 19 → 58 → 74...) roughly every ~5 seconds, even with the camera static over an area with no particular activity. The effect is amplified at x15 simspeed since these cycles happen much more often per real-time second.

Steps to reproduce:

Have a medium/large base (~4000 pop, several thousand entities).
Trigger a logistics deadlock: full truck parking (50/50), mine control tower with no dump zone assigned ("No place available to dump products"), or any other case where a truck shows "Truck struggling to find an accessible destination".
Switch to x15 simspeed.
Watch the IPS in the debug HUD: cyclic drop to 12-20 IPS every ~5s, while CPU/GPU aren't saturated (CPU ~30-65%, GPU ~40-95% variable).
Fix the deadlock (e.g. assign a dump zone) → IPS climbs back progressively to stable values (70-75) as the backlog of stuck trucks clears.
Technical hypothesis:
Pathfinding is likely being retried every tick (or at very high frequency) for each truck without a valid destination, instead of backing off after a failed attempt. With several trucks stuck at once, this creates a periodic CPU spike that breaks the simulation tick rate.

Suggested fix:

Add an exponential backoff/cooldown before retrying pathfinding for a truck that just failed to find a destination, instead of retrying every tick.
Stagger these retries across stuck trucks so they don't all retry on the same tick.
Test context: ~4000 pop base with third-party mods installed — behavior is reproducible independent of mods; the root cause appears to be core pathfinding/logistics-deadlock handling, not a specific mod.

1 attachment only for registered users
Captain Matt Captain Matt · 2 months ago

Which debug HUD are you referring to?

Captain Jeremy Captain Jeremy · 2 months ago

There's already time-sliced pathfinding and backoff. I'll take a look at the save to see what might be going on. It may well be job search, as after you've done the split you have many more idle trucks.

Captain Jeremy Captain Jeremy · 2 months ago

You say it reproduces without mods: do you have a save which reproduces it without mods?

omegataze [discord] · 2 months ago

The HUD I was reading is the Steam overlay FPS counter, not an in-game debug panel — so the "IPS" number I quoted was just Steam's rendered FPS display, not necessarily the game's internal simulation tick rate. Sorry for the confusing terminology — the drops themselves were real (visually choppy, ~5s cyclic pattern), but I can't confirm it was literally the sim tick counter without a proper in-game profiler.

I don't have a mod-free save reproducing this — that line in the original report was an unverified assumption on my part, not a tested fact. I inferred it was mod-independent because the trigger looked like a generic logistics deadlock (truck parking full, mine dump zone missing), not anything wind-turbine-specific, but that's a guess, not a repro.

What I can confirm from watching it live: the FPS tanked hard (down to ~10-20) in cyclic bursts while trucks were stuck with "no accessible destination" and a mine dump zone was unassigned. Once we assigned a dump zone and the truck backlog started clearing, FPS climbed back to stable levels. If it's a job-search issue after a truck fleet split (like you suspected), that'd fit what we saw — happy to send our save if that helps you dig into it directly.

Captain Jeremy Captain Jeremy · 2 months ago

Do you run predictive or uncapped sim speed? FPS tanks from stuff like this is probably still something going on in the simulation.

omegataze [discord] · 2 months ago

Ai find this cause : TreeHarvester #29371 (Forestry Tower #272, pos 3206.4/501.5) stuck in a repeating job-failure loop: tower routed its truck straight to town storage instead of a local buffer, the haul routinely missed the 60s job timeout, the job got cancelled and reassigned, repeat — 46+ times over ~11 min, each cycle writing a full exception stack trace and re-running pathfinding/job assignment on the sim thread. That periodic load spike matches the observed fps drops.

Temporary Fix: Added a local buffer stockpile at the base of the tower — job completes within timeout, loop stopped, spikes gone.

giant tree forestry 2435 tree on zone

Captain Jeremy Captain Jeremy · 2 months ago

I very much doubt a single tree harvester would be causing a FPS drop from 70 to 11 because it's stuck in a job failure loop. If you're going to copy-paste the output of AI, at least say "AI said this" rather than making it sound factual.

omegataze [discord] · 2 months ago

Okay no problem . Now after this , 10 escavator and 30 truck stuck in new mining zone do same think , pathfinding loop cause lot of lag at x15 , after release it , loop stop and lag too

Stuck by construction plan

10 Showing 1–10 of 10