Insufficient memory during pregeneration

Hello!

I've run into a problem with pregenerating a minecraft world using Distant Horizons. Whenever i try to pregenerate a somewhat larger chunk of the world (256 chunk radius in this case), the pregeneration eats up all my RAM causing a bottleneck and essentially making the server unresponsive.

I haven't run into this issue while playing 1.21.4 and using 2.3.2b. I could generate even 512 chunk radius in the overworld + half of that in the nether and the end in one go without any issues (i7-9750H, 8 GB 2667 MHz allocated RAM, running DH [Balanced preset, Internal server mode] + Fabric API + Lithium + FerriteCore + C2ME). So i'm wondering whether this is an issue with the current version or something is wrong on my part.

Testing was done on a laptop with an i7-9750H and 16 GB 2667MHz RAM (8 GB was allocated), and also on a PC with a Ryzen 7 5700x and 32 GB 3600MHz RAM (tried with allocating 8 GB, 16 GB and 24 GB).

Steps:
  1. Run Fabric installer 1.0.3 (1.21.7., loader version 0.16.14.)
  2. Download the server jar from the fabric installer GUI and generate a start.bat file
  3. Run the server, terminate, agree eula, run it again, terminate again, put DH 2.3.3b into the mods folder, run it again, terminate again
  4. The generation mode is then set to INTERNAL_SERVER in the config file
  5. Run the server again, then use dh pregen start overworld 0 0 256 (using BALANCED preset)
After the pregen starts, my Ryzen 7 5700x can generate 70-80 cps on a balanced preset. During the pregen, the RAM is slowly filling up until it hits the Xmx parameter, overshooting a bit, and after some minutes i get the following message:

"Insufficient memory detected.
This may cause stuttering or crashing.
Potential causes:
  1. your allocated memory isn't high enough
  2. your DH CPU preset is too high
  3. your DH quality preset is too high"
After that the cps starts to tank and at this time the server is basically unresponsive to any commands, doing pregeneration until terminated externally.
Was this page helpful?