extreme tps lag on Craft to Exile 2 modpack

Modpack: Craft to Exile 2 1.0.7 DH 2.3.4b PC Specs: 7800x3d, 32GB DDR5, nvme SSD, OS Linux (CachyOS/Clear Linux), openJDK21 Xms/Xmx 10G/20G While generating LOD, time essentially freezes for 10 of seconds every few seconds, and the generation is extremely slow. CPU usage does not really go up either. pregen 256 takes about 10 hours to complete at about 7cps Modpack works fine without Distant Horizons What I've tried: >distantGeneratorMode FEATURE/INTERNAL SERVER >numberOfThreads 4/8/16 >threadRunTimeRatio 0.8/1.0
17 Replies
Miki_P98
Miki_P984w ago
Internal Server will lag the server more during generation, but then less after the generation when player move around If you want less lag reduce the DH CPU load If you want faster generation increase the DH CPU load If your server can’t handle the generation when players are on the server, pregen the LODs (optionally chunks too) before playing and during gameplay reduce CPU load to minimum and/or disable distant gen on the server all together
kak
kakOP4w ago
Thank you for the reply, i have already tried pregenning but pregenning only 1000 chunks takes hours this is pregen 256 and it takes like 10 hours on a fresh world without any players.
kak
kakOP4w ago
No description
Miki_P98
Miki_P984w ago
Yeah, generation is slow, especially with some worldgen mods and Internal Server gen mode !slowgen
YAGPDB.xyz
YAGPDB.xyz4w ago
World generation in general is quite slow, if you want to speed it up: Install Noisium, Lithium and C2ME(DH 2.3.0+). These mods can improve generation speed by a bit, but it will still not be fast. Increase CPU Load in Distant Horizons settings for faster generation, but you will experience more lag spikes and stuttering due to heavier workload on CPU. To see if Distant Generator is really working or not: 1) Check CPU usage while in-game, using Aggressive settings of CPU Load. If CPU usage's hovering around 80-100%, the LoDs are generating in the background. 2) Go to DH settings > Advanced Options > Debug > Wireframe, set Enable Debug Wireframe Rendering and Show World Gen Queue to True. Enabling both settings will show you the visualization of world gen tasks queued and working on the map (blue boxes for queued tasks, red boxes for working tasks)
kak
kakOP4w ago
it's slow but it's not supposed to be 7cps slow right? also on other modpacks it's still playable while generating, this modpack the whole gameworld just freezes
Miki_P98
Miki_P984w ago
Do you have C2ME? If on INTERNAL_SERVER and without it, the generation can be tens of times slower than with C2ME or on FEATURES There can also be some mod compat issue at play In this case you can check the raw DH only, or better DH + performance mods, performance And perform a !binary
YAGPDB.xyz
YAGPDB.xyz4w ago
Try a binary search and figure out which mod is causing it. So disable half of the mods, see if issue is still there, if yes disable half again etc etc until you find the mod that's causing the issue.
Tenor
Miki_P98
Miki_P984w ago
To find the problematic mod
kak
kakOP4w ago
thanks again. the modpack is on forge so it's not on c2me. on FEATURES it seemed to be slower than INTERNAL_SERVER i also have already tried disabled about a dozen of mods (mostly performance related mods) to find the problematic mod but i still havn't identified one
kak
kakOP4w ago
the game world freezes like this and is unplayable when it's generating LOD (you can see the NPCs are frozen in place)
kak
kakOP4w ago
and here's a mostly vanilla setup, you can see when it's generating LOD it's still playable
kak
kakOP4w ago
Miki_P98
Miki_P984w ago
You can use Sinitra Connector (or something like that) to run C2ME on forge Even it it seems that INTERNAL is faster, it is just impossible for it to be so Features can run on multiple threads at the same time, and uses more efficient Generation method Internal just called MC code, runs on 1 thread at most (unless C2ME is installed) and does not have any improvements
kak
kakOP4w ago
i have forgot about sinytra connector. i am testing it now. seems to be working! (have to disable Canary) its giving a lot of errors in the log but so far it's been working, i am identifying the issue. [CheckedThreadLocalRandom/]: ThreadLocalRandom accessed from a different thread (owner: Server thread, current: C2ME worker #11) I just found out dimensional theading is in the pack and is playing a huge part in the issue
hardester
hardester4w ago
Interesting finding.
kak
kakOP4w ago
this issue seems to be caused by the mod Enhanced AI after removing enhanced AI the error message changes but theres still frequent errors

Did you find this page helpful?