LunaPixelStudios / SteamPunk

8 stars 3 forks source link

Unnaceptable worldgen lag, makes elytras much harder to use. #240

Closed InfinityDevTech closed 2 months ago

InfinityDevTech commented 2 months ago

Describe the Bug

World generation is insanely slow on enterprise grade hardware.

The server is using the GraalVM jvm, with hugepages enabled and 20 gigs of ram. I removed a bunch of mods that were adding a performance hit, like "alexs mobs" and "aether", but its still bad. I have taken every step I can think of in order to fix this, I am publishing a server on the 10th and it needs to be decent.

Spark Profiler Output

Reproduction Steps

  1. Install 22HF server pack
  2. Run it as normal. Changing nothing
  3. Suffer.
  4. Attempt to add nice JVM args
  5. Attempt to change the JVM entirely
  6. Remove some mods that were too slow
  7. Change some other config stuff ...

Screenshots and Videos

Screenshot_20240506_235936

Crash Report or Log

No response

Operating System

Debian 12

Minecraft Version

1.19

Modloader

Forge

Modpack Version

v22HF

Optifine

No

Other Mods

Chunky, as an attempt to pre-gen chunks. No performance impact.

InfinityDevTech commented 2 months ago

Chunky is getting about 8 chunks per second, where 15 would be normal for a modpack of this size.

chorbintime commented 2 months ago
  1. The garbage collector is struggling - this is likely due to you allocating 20gb on a server that has 1 player online. There is too much junk RAM that is going unused, overloading GC.
  2. I suggest using the java args from here https://github.com/Mukul1127/Minecraft-Performance-Flags-Benchmarks
  3. Java 18 should perform better, and, if the server starts with it, Java 20 or 21 would be best
  4. Do not remove mods, it prevents players from joining on a fresh install. Redistributing a modified version of the modpack to players for ease of use would break many licenses (not that that's what you're doing, but it'd be the only easy way for people to join)
  5. There are a few mods that will be updated in the next modpack update which are likely causing slow chunk gen speeds, but this shouldn't be a big deal as you can just pregenerate ahead of time. Updating the Better Chunk Loading mod serverside, if an update is available already, would help tremendously. You could also try removing it completely. This would likely not prevent people on unmodified instances from joining.
InfinityDevTech commented 2 months ago

I am going to give G1GC a try, but I do have to allocate that much ram because my actual world in play uses that much, this server is just me testing out the mods.

The java args you linked appear to be Bruce the mooses args, with a bit more info, I will test those.

I'm using GraalVM enterprise edition, since it has the best performance, I believe it's only available in java 11 17 and 18.

Alex's mobs don't really seem to be a necessity, neither the aether, since these are both just random added features. I did remove a variety of performance mods, that actually did the thing they claimed to destroy.

Removing some more mods, and replacing others, got me to about 12 chunks per second, which is huge. I am hoping to get this higher though, my next option is to manually go through and collect these mods in their fabric or NeoForge forms lol.

I think there is another issue at play though, but the mods are doing a lot of it.

CristianPetre12 commented 2 months ago

image I have the same issue. I m playing mp lan with my friend, but i have also this problem on singleplayer it is frustrating

chorbintime commented 2 months ago

I am going to give G1GC a try, but I do have to allocate that much ram because my actual world in play uses that much, this server is just me testing out the mods.

The java args you linked appear to be Bruce the mooses args, with a bit more info, I will test those.

I'm using GraalVM enterprise edition, since it has the best performance, I believe it's only available in java 11 17 and 18.

Alex's mobs don't really seem to be a necessity, neither the aether, since these are both just random added features. I did remove a variety of performance mods, that actually did the thing they claimed to destroy.

Removing some more mods, and replacing others, got me to about 12 chunks per second, which is huge. I am hoping to get this higher though, my next option is to manually go through and collect these mods in their fabric or NeoForge forms lol.

I think there is another issue at play though, but the mods are doing a lot of it.

Once again, Alexs Mobs and The Aether are major content mods that are not "just random added features".

If you refuse to follow what I'm saying and insist on removing undisclosed amounts of mods then I am unable to offer any support, as you're no longer playing anything resembling what Steampunk is.

image I have the same issue. I m playing mp lan with my friend, but i have also this problem on singleplayer it is frustrating

Please read what I said earlier replies.

CristianPetre12 commented 2 months ago

I tried Java 21 and followed some steps from Mukul, but it doesn't work for me. I didn't install anything, and I didn't remove any mods. I have the same problem.

InfinityDevTech commented 2 months ago

Once again, Alexs Mobs and The Aether are major content mods that are not "just random added features".

If you refuse to follow what I'm saying and insist on removing undisclosed amounts of mods then I am unable to offer any ?support, as you're no longer playing anything resembling what Steampunk is.

Alex's mobs is not a major content mod, it is just a mod that adds a bunch of random bosses that provide nothing to the game, its an option. Now the aether, I can see, I re-added that back after getting my server up and running. Overall, my final config is

GraalVM EE 21 G1GC args 20 Gigs of ram 10 CPU cores

And a lot of hope.

This pack just needs a lot of performance tweaks, and I reccomend removing server sided performance mods, those actually caused a lot more lag than they fixed.