HbmMods / Hbm-s-Nuclear-Tech-GIT

A flaming wreck of a minecraft mod about nuclear technology that is somehow still in development.
GNU General Public License v3.0
376 stars 268 forks source link

Lag spikes #627

Open Granniesgotaids opened 2 years ago

Granniesgotaids commented 2 years ago

Screenshot (18)

(Hope the screenshot went through alright)

I am getting lag spikes every 3-5 seconds or so where the game pretty much freezes quickly and resumes afterwards like nothing happened. It began after the NTLogistics update and the latest update did not fix it. My autosave is set at every 3min so I know it is not that. My GPU and CPU is not working at anywhere near 50% utilization. I have played around with the settings to no avail. Not sure what else to do, anyone know anything.

HbmMods commented 2 years ago

Lag spikes like these are common when the memory usage is just barely scraping the maximum, although that doesn't seem to be the case here. The new conveyors can lag if you have a ton of items going over them, but that's not the case either. I've looked over all changes between MEMEPACK-9 and X4263H1 and couldn't find any that would impact rendering a whole lot. Does this happen on other worlds too? Did it start right away after updating or did you load any new areas/use the new blocks first?

Granniesgotaids commented 2 years ago

I tested other worlds and they did not have this issue, I also tested my survival world in the older 4251 and it had lag spikes about half the size and double the frequency. That would explain why I did not notice them beforehand, It's obviously a problem with my world as other worlds seem to run fine. I still don't understand why my world is affected but I don't assume you'd be able to help with that?

HbmMods commented 2 years ago

You can enter the subsections of the pie chart by hitting the number key associated with the section: grafik I'm afraid it will most likely show "unspecified" for most sections but we should at least find out whether the heavy load comes from tile entity, entity or general world rendering. I'm not sure if the pie chart really picks up on these spikes but it's worth a shot.

One more suspicion I have would be chunk loading, I think optifine (which according to F3 is present) has several options regarding how chunks are rendererd when loading. You could try either changing the settings for chunk rendering or remove optifine completely to see if it makes a difference.

Granniesgotaids commented 2 years ago

The pie chart doesn't seem to pick up on the spikes, I played around with the chunk rendering settings and removing optifine but to no avail. I feel it may have something to do with my fusion reactor and my rbmk. These along with the water tanks and power grid might put more strain on the computer although it isn't using anywhere near 100% utilization. I still have no idea what could be doing this, I will continue playing around with stuff in the hope that I find something that works.

HbmMods commented 2 years ago

RBMKs have to use the less efficient rendering mode to work, which may cause an issue for larger setups, although the load should be even over time instead of creating lag spikes, same goes for the fusion reactor. Do you perhaps use ReaSim fuel rods or have a cooling tower that only emits clouds sporadically? Some people reported that the transparent effects of the steam clouds/RBMK cherenkov lights causes lag, although I've never seen the game freeze completely before.

Since the vanilla debug tools don't seem particularly helpful in this situation I might add my own debug options. These freezes seem to happen only within one frame, so a tool that would look at those frames in particular would probably be helpful.

Granniesgotaids commented 2 years ago

I don't use ReaSim and my setup isn't very large. I only have 1 fusion reactor so that should be aight. My cooling tower often ends up full, sometimes when my reactor is off. My water tanks often full up completely so the cooling tower fills up with water. I wouldn't have thought this would cause any issues but it is the only thing I have left to note. Adding some more specific debug tools would be amazing, thanks. Also thank you for your help it has been really good helping me narrow down the possible issues.