myxal Posted October 26, 2023 Share Posted October 26, 2023 (edited) Cheers. I've been running a world with Uncompromising mode and a bunch (~20) of small mods for almost 2 years now; 2 players, wortox and wickerbottom. Since about a year ago, I've started noticing an annoying performance issue - when it's not raining, during day or dusk, in the forest shard, we get periodic freezes - the server stops responding to anything (including commands on the native - not in-game - console) for ~15 seconds before coming back, seemingly without issues, for another 30 seconds. IIRC, initially it only happened during spring, recently I noticed it during summer. I wasn't too bothered, as the Wicker player would just call the rain to make the issue go away, or we'd want to stay in the caves for extended periods anyway, where the issue never happened. Does anyone have any tips what (else) to try to track down the cause? So far I've tried attacking on multiple fronts, without much success (on the affected shard, unless specified otherwise): disabled all mods: no change print(scheduler) periodically - never shows any running task printwrap("",scheduler:GetListForTimeFromNow(1000)) - if there ever was anything in the returned list, I could never get anything to parse it, I always got just "[ ]" - tried also with dumptable, tabletodictstring, tabletoliststring. the 2 points above, but for staticscheduler instrument_userdata(...) in-place replacement on TheNet: nothing distinct before the freeze, just a gap in logs during the freeze instrument_userdata(...) in-place replacement on scheduler: same as with TheNet, just a gap in logs during freeze, with indistinct noise surrounding the gap instrument_userdata(...) in-place replacement on TheWorld.net.components.weather - no output tried instrument_userdata in-place replacement on TheSim, this just locks the game up instantly and permanently; Is there a trick to tracing TheSim calls? Bringing out the big guns, I made a few perf recordings, but these seem to be useless without debug symbols. Any chance there's a build of DST out the where Klei didn't scrub the symbols? (a recent beta, perhaps?) Removed every entity with a witherable component - didn't help I haven't reported a game bug (yet) as my gut tells me this is almost certainly down to some of UM's past worldgen/base-item-changes shenaniganery which is baked into the save at this point. (A save I'm willing to dive into and fix manually if needed, I've done it before...) EDIT: I think I got the cause, the regrowth manager is trying to regrow thousands of flowers, hundreds of mushrooms. I think this might be from UM's full-moon transformations back in the day. Still, I'd love to have a generic approach which gives me a debug stack during time of misbehaviour, or tracing capabilities, rather than relying on lucky guesses... <log> [01:47:38]:ReceiveRemoteExecute(print(TheWorld.components.regrowthmanager:GetDebugString())) @(409.98, -186.70) [01:47:38]: --flower:5006 timemult:0.00 next:-86.00 0 --blue_mushroom:536 timemult:2.00 next:30.00 6394 --carrot_planted:7 timemult:0.00 next:1215.00 6387 --red_mushroom:1381 timemult:1.00 next:30.00 5006 --green_mushroom:1172 timemult:1.00 next:1.00 6930 <regrowthmanager.lua> self:SetRegrowthForType("flower", TUNING.FLOWER_REGROWTH_TIME, "flower", function() -- Flowers grow during the day, during not winter, while the ground is still wet after a rain. return ((_worldstate.israining or _worldstate.isnight or _worldstate.iswinter or _worldstate.wetness <= 1 or _worldstate.snowlevel > 0) and 0) or (_worldstate.isspring and 2 * TUNING.FLOWER_REGROWTH_TIME_MULT) -- double speed in spring or TUNING.FLOWER_REGROWTH_TIME_MULT end) Edited October 26, 2023 by myxal Link to comment https://forums.kleientertainment.com/forums/topic/151998-tips-for-troubleshoooting-performance-issues/ Share on other sites More sharing options...
_zwb Posted October 26, 2023 Share Posted October 26, 2023 Maybe you can do something similar in DST? Link to comment https://forums.kleientertainment.com/forums/topic/151998-tips-for-troubleshoooting-performance-issues/#findComment-1675142 Share on other sites More sharing options...
myxal Posted October 26, 2023 Author Share Posted October 26, 2023 Thanks for sharing that. I've managed to guess at the cause in the meantime so I only quickly tried `TheSim:ProfilerPush('marker_name')` which doesn't seem to exist. Not surprising since that post dates back to the days when Don't Starve was a Chrome app, that was almost certainly dropped during the move to a full app, I'm guessing. Would be cool if dev chimed in to say that the current version have this or similar capability :P Link to comment https://forums.kleientertainment.com/forums/topic/151998-tips-for-troubleshoooting-performance-issues/#findComment-1675151 Share on other sites More sharing options...
_zwb Posted October 27, 2023 Share Posted October 27, 2023 That's sad. Looks like now the only way you can monitor resource usage is by hacking the game... Link to comment https://forums.kleientertainment.com/forums/topic/151998-tips-for-troubleshoooting-performance-issues/#findComment-1675312 Share on other sites More sharing options...
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now