Constant lag spikes for denizens

Hearthlings (animals, and monsters) stop moving for 3-10 seconds every few minutes. GUI works fine; can navigate menus, queue crafting, and pick up fences while everything is stopped (though the arrow icon wont show until the lag stops). Happens at x1, x2, and x3 game speeds. Random CPU spikes from %40 to %90 (not in sync with the game lag). Saving and Loading the game file stops the lag for 10-20 minutes.

Steps to reproduce:

  1. Open saved game.
  2. Play game normally.

Expected Results:
Don’t have my game lag.

Actual Results:
Have my game lag.

Saved game included - Google Drive (see below),
Full PC specs included - Speccy (see below).

“New users can’t use attachments”.

Version Number and Mods in use:
Version (x64)
(All default mods running)
Radiant Core Library
Northern Alliance
Rayya’s Children
Debug Tools

System Information:

Operating System
Windows 10 Pro 64-bit
Intel Core i5 6600K @ 3.50GHz 26 °C (o’clocked to 4.10GHz)
Skylake 14nm Technology
32.0GB Dual-Channel Unknown @ 1466MHz (15-17-17-35)
VX2457 (1920x1080@75Hz)
VX2457 (1920x1080@60Hz)
4095MB NVIDIA GeForce GTX 970 (MSI) 50 °C
465GB Samsung SSD 850 EVO 500GB (SATA (SSD)) 32 °C
1863GB Seagate ST2000DM001-1ER164 (SATA ) 32 °C (Stonehearth stored here)

That sounds like maybe it’s auto-saving? Since it’s on a hard drive instead of an ssd, it might take a few seconds. But you say that saving and loading stops it for 10-20 minutes, which is longer than the “few minutes” interval you experience it at, so maybe not. How many hearthlings do you have?

+Recommended graphics settings are Ultra. Issue doesn’t change between Ultra or Low.

31 Hearthlings. Started at 29. I had a larger village on 1.0 (yesterday) with 38 and no issues.

It acts like the auto-saving but that displays on screen.

Can you check your save directory on your hard drive and see if the files are getting updated when the lag happens? Or turn off auto-save and see if it still happens? I wonder if it’s just a display problem.

I moved the files to the SSD and testing now. (Lag just happened as I was typing this lol)

I’ll turn off auto-save now and see.

Restarted the game (now on SSD) with Autosave turned off. 2 minutes in the lag spikes started :frowning:

CPU capped at 100% now with Stonehearth using 88-92% (Lowest settings possible, auto-save off, x2 speed).

Sounds more like the ai is falling over itsself, is there a monster camp around somewhere semi far off ish? Try exterminating that

I cleared the 2 camps that were near and noda.

This is my first time playing the Artic race and I just leave the “attacking” animals alone. They. Are. Everywhere. Think that may be an issue? I’m letting my archers run amuck and gonna see what happens.

Well I remembered these kinds of spikes when me and a friend played multi and made towns far apart, the ai doesn’t like enemies far off because of patching calculations. Genocide is usually the solution :’) (its also why I don’t play Na, I think they implemented hunting terribly)

I think it’s fixed! I have a lot of 2 high walls where I didn’t want Archers chasing animals away (leading my Hearthlings out in the wild chasing drops). I built ladders and some deer rushed over, once they were killed the game is playable again on my normal settings. Letting my Archers clear the lands rn to keep testing.

Thanks you two for the help.

The Northern is kind of annoying. They’re pretty limited and rely on the rng of traders for crops (which is fine with Market Stalls, I guess). The fact the Archers always chase animals and require babysitting when raiding is really annoying.

Okay. Tested it again by reloading and just killing the deer and it didn’t fix it. Let my archers go on a killing spree and it worked. Seems to be the shear number of AI :man_shrugging:

1 Like

Combat was not optimized enough yet, so it can still make the game lag in some situations.
Hopefully someone can revisit combat performance for 1.1, we’ll see.

Thanks for the savefile! :slightly_smiling_face:


Through my tests, I’ve seen that Stonehearth doesn’t use all the cores of a CPU equally. Over the course of an hour, core 2 will go from 30% to just under 70%. The other cores tend to hover at around 8% to 30% throughout the playthrough. Core 2’s usage drops a bit (performance improves) when going underground.

During my tests though, I didn’t get spikes, but a steady increase in CPU usage for core 2.

Mm I didn’t check which cores were under stress. Multithreading never comes to mind :stuck_out_tongue:

Because stonehearth doesn’t really have any :wink:

Yesterday’s patch includes some performance fixes. Let us know if it helped with the lag.