Bunsan / TechNodeFirmaCraft

Configs for TechNodeFirmaCraft
MIT License
20 stars 6 forks source link

Lagg issue #46

Closed save99 closed 8 years ago

save99 commented 8 years ago

I am having sever lagg issues, from what i can see its a mod loading soemthing my computer cant hanndle and the only thing i can se on opis is 300 soemthing loaded chunks tps is 20 across the board this is the tracking Dimensions http://prntscr.com/9zo05x i have tryed purging but it goes straight back to supper lagg I know its one of the mods screwing something up but I cant figure it out someple please help me.. I'm going to test some other mods, I'm starting with TerraFirmaCraft_TNFC

Bunsan commented 8 years ago

All of that seems fine. Your render distance determines how many chunks are loaded. At 10 chunks it is 400 chunks surrounding, give or take. The fact that the TPS is 20 suggest that the issue is client side and will be either render issues or an issue with your java GC settings. My suggestion is to go read http://wiki.terrafirmacraft.com/Performance_Optimization for some JVM arguments for you client. Basically it is caused when java fills up the heap space where is stored temporary files it needs and has to empty it. If this isn't optimized (and by default java is crap at it) the client will lag in a regular pattern. If you open your F3 debug screen you will see the RAM used and allocated, the lag will correspond when the percentage drops.

Also don't fall into the trap that more RAM is better. You shouldn't set the allocation above 3 unless you are running high def textures or shaders, or if you are crashing with out of memory error.

save99 commented 8 years ago

I do have 6g of ram alocated i can put more if needed but that hjas never been the issue so i did some further digging and jsut was like f it and deleted the whole thing and reinstalled it and put on optifine and lowered some of the settings that would cause client side lagg and fixed my lagg problem but ty for the help : ) Oh and that number jumped to 2999 when i gave up XD so i knew something i had messed up or soemthing so eh : )

fluffle commented 8 years ago

Hi!

The pack appears to be causing a memory leak, which is probably why you're seeing lag spikes. I set up a server ~12h ago and already the old-gen is completely full and the server is GC thrashing. I'm using this mod to help monitor:

http://www.minecraftforum.net/forums/mapping-and-modding/minecraft-mods/2413629-prometheus-server-monitoring-integration

I have JVM flags set to dump a heap when the GC thrashing takes >80% of the JVMs execution time. Looking at the graphs that will be sometime today, so I should have much better information on what's leaking this evening.

fluffle commented 8 years ago

Someone logged on and all the RAM that was being held live by ... something ... got GCd, so the server recovered. I will keep this thread updated. The container now has jmap in it, so i can grab dumps whenever.

fluffle commented 8 years ago

OK, so it happened again and this time I got a heap. The problem seems to occur during the worldgen that occurs as players walk around. The heap dump I'm looking at has 7301 chunks loaded. 2545 are directly held live by a farseek.world.gen.structure.StructureGenerationChunkProvider and its loadedChunks hash map. Another 4756 are directly referenced by nothing in particular and appear to have leaked somehow -- this might explain how the server previously recovered. I'm wondering if they're using weak references or similar to keep things around and they can only be collected by a full GC rather than a CMS collection.

I will go and file an issue over there.

Bunsan commented 8 years ago

Thanks. I'll look into this a bit too. I also noticed that plant mega pack pushed an update due to a worldgen issue that caused crashes. I'll see if there are any crash logs posted publicly for that.

fluffle commented 8 years ago

It seems that the rest of the loaded chunks have a path to the GC roots via a com.bioxx.tfc.Chunkdata.ChunkDataManager, but the reference from com.bioxx.tfc.Chunkdata.ChunkData to its "chunk" variable is not being recognised as retaining the net.minecraft.world.chunk.Chunk by MAT. That's irritating. It seems from the code over there that the chunk variable is declared final.

https://github.com/Deadrik/TFCraft/blob/master/src/Common/com/bioxx/tfc/Chunkdata/ChunkData.java

I don't know whether that is the reason why MAT doesn't think it's a dominator.

fluffle commented 8 years ago

For the record, we're having a reasonable amount of luck using ProfMobius's Admin Commands Toolbox to pre-generate lots of chunks so players can go exploring.

http://mods.curse.com/mc-mods/minecraft/221584-admin-commands-toolbox

Anyone reading this should note that the /pregen commands all take chunk coords not block coords. Divide in game coords by 16, or you'll end up generating thousands of chunks more than you expect, nowhere near where you want them :-)

Bunsan commented 8 years ago

Yes that is a decent tool. We include WorldBoarder-Forge as an option in the server package to use for pregeneration. It is a tool we were comfortable with from use on mcpc+/cauldron servers and found it an intuitive, well documented and stable tool.

As for the rest, I've poked my collaborator as I don't have a programming background and am slower digesting things such as this.