FTBTeam / FTB-Modpack-Issues

Any and all FTB Modpack issues are here! Please create a new issue, add to an existing one or maybe even suggest a feature in the discussions
https://feed-the-beast.com/modpack
38 stars 10 forks source link

[Bug]: [Server]Huge delay near Power pots. #569

Open EnterFor opened 2 years ago

EnterFor commented 2 years ago

Modpack

FTB OceanBlock

Modpack version

1.11.0

Log Files

none

Describe the bug

The problem is at the server When placing multiple Power Pots, close players will experience extremely high latency and drop calls. I tested it with two other players on the server, and they too experienced delays and dropped calls. When I was away from Power Pots, everything was fine.

Steps to reproduce

1.Place more than 5 power pots 2.Let them work, get close and wait for results

Expected behaviour

There will be no delays or dropped calls.

Screenshots

image image

I don't think I put a lot of them

Additional information

My English is not good, I use Google Translate, I wonder if you can understand?

quietust commented 2 years ago

Doest the problem also occur if you replace the Crystal chests with Diamond or Obsidian chests?

EnterFor commented 2 years ago

I didn't place the box before, I was using an XNET-only solution, When I found a problem, I tried a different way of thinking, but the problem still happened

EnterFor commented 2 years ago

image I thought it was a server bandwidth problem, so I tried to have only two people online. Problems will still arise..

Raidobw2 commented 2 years ago

Can you try to wrench the Mekanism cable so that they look like a hopper inputting power into the power pots? Use a configurator to transform the end of each cable so that it only puts its energy inside the power pot. Also I'd say to use a buffer in the middle, like an energy cube instead of 2 flux plugs directly on the cable if you can. image image I know Mekanism cables had an issue like that in 1.12 when having mod interactions. Let me know if that did anything and thanks.

mistermania commented 2 years ago

Hey. I get the same problem, you can find the trace with the full discussion on FTB discord here: https://discord.com/channels/372448486723158016/560188834592063488/938379146558595163. Seems to be the same problem with all sources of energy than i tried. No solution found atm, but someone adviced me to put the powerpot in compact Machines. Probably what i will try next.

PS: Pls notice than the problem can have an impact on some other things due to the server lags and create more problems: When you adding more mk4, you can push the server over his limits, and timed out all players and stopping all processing ticks of machine process (probably due to the lag), including mob grinder and things like that. Weirdly, you have to reboot the server to reconnect, and clean all entities (Kill @e), because they are stacking on their spawn point.

MichaelHillcox commented 2 years ago

Anyone here able to send me a world to test this on?

mistermania commented 2 years ago

Anyone here able to send me a world to test this on?

https://gofile.io/d/0DnTi7

MichaelHillcox commented 2 years ago

Thanks, I'll look into this for you

Raidobw2 commented 2 years ago

Thanks Michael!

MichaelHillcox commented 2 years ago

Thanks @mistermania I've loaded up your world but could not confirm that the issue was power pots, your world is lagging for multiple reasons but not down to the power pots.

For @EnterFor please install spark mod to your instance and server and run the profiler command and attach a link the report it generates here please

mistermania commented 2 years ago

Thanks @mistermania I've loaded up your world but could not confirm that the issue was power pots, your world is lagging for multiple reasons but not down to the power pots.

For @EnterFor please install spark mod to your instance and server and run the profiler command and attach a link the report it generates here please

Maybe for the lag, but i can confirm the issue on ping. Removing pots and putting them in a compact machine is fixing the connection pressure.

For others issues, pretty sure that the big one is causing all of them, cause such pressure on client come often with big pressure on servers.

EnterFor commented 2 years ago

I have analyzed it with Spark and I can assure you it is not A TPS problem, just a lag in latency. At present the integration package has graduated, recently did not play

Raidobw2 commented 2 years ago

I've done some research using the world mistermania uploaded and found some results and behaviors.

On a clean download of their world and load, just a fresh idle server, it crashes after 60 seconds. Assuming this is caused by item problems which I've seen in the past with other players having overflowed farms, I decided to run /kill @e a few times very quickly as the server loaded. Console showed: Killed 22695 entities Killed 16514 entities

Lag was cleared somehow, and with a fresh client I was able to join localhost and enter the server, at spawn. I quickly set up a repeating command block to kill all entities, and checked their base coordinates from the files.

First scenario, I tp'd in their base right away. Plain server crash, so no good.

Tried a different approach, render distance of 4 on the server and slowly crawl towards the base. Chunk by chunk from about 1000 blocks away, I checked if the command blocks still outputted. At one point, they were put to a massive halt of a few seconds, right after crossing that border. Although it didn't crash! image With a controlled render distance, it's easy to see what is loaded, and so the red rectangle represents the chunks that got loaded when I crossed the border. What's interesting is the farm in the red circle. image The chunks were already loaded serverside, but not on my client. So something was sent to my client when I approached those chunks, and it made me lag crazy for a few seconds. Went in the farm, decided to check some chunk coords in NBT Explorer, on the old world (the one that I couldn't join at first). image (All the floor was filled with blursed earth, which I removed) image image And here's what (14, 304) and (14, 305) look like: image (14, 304) will not open at all. Either the data is corrupt, or there is too much for the program to handle. (14, 305) has only 2736 entities, whilst I killed 39 209 earlier. Here's what those items would look like if we look at a crash report from the Watchdog (the first initial crash). This adds up to 43 559 entities (these would be itemstacks btw, not just items). mistermania probably already knows this is the only mob farm in their base capable of generating that much experience and items. Let's not talk about the 1804 alive pigs and 970 alive enderman either. image image image The farm is bottlenecked by an absorption hopper. If the absorption hopper cannot distribute XP fast enough, it will clog up. Same for the items. And it looks like that could effectively clog up, since only one doesn't clear very fast. image absorption_hopper Moving on, I removed the farm and other Mekanism machines, plus a lot of the Refined Storage and Integrated Dynamics system, since there are hundreds of cables and networks caused by these. I gave the Power Pots some power as well and made sure they could produce. image I then went on a teleport session multiple times, from within the base around the power pots to spawn and vice versa. I got no crashes at all. It's also worth noting that my server was local, if that has any influence at all. If EnterFor wants to send their world, we can take a look. Although from this current case, it would be advisable to check running farms and build off switches, since in the current base there are none, everything is always active. Which leads me to think this base was getting clogged up from items and XP orbs, and we can see that from the numbers (or, as stated before, chunk could have been corrupted). Please let me know what you think of this, and once you've made changes to your base to sort that out and clear some things please get back to us so we can know if we can close this issue.

P.S. I ran multiple Heap Dumps and Thread Dumps to analyze the "freezes", and all that was worth mentioning was already in the crash stacktraces, multiple references to entities. Cheers and I hope that helps.

mistermania commented 2 years ago

Hey. Big Help with your tests, I was aware about the farm problem, but i was pretty sure than it was caused by lagging. After some Sparks test, i think than there is an issue with Mob Fan on my map for weird reasons about Slime and Spiders. (https://spark.lucko.me/eYldo6WqIW). It's a different issue of the original one, but removing them and use draconic to kill mobs fixed all the problems. To the original problem, put powerpot in Compacts Machines is resolving the issue as long as you are not entering in.

Big Thanks to all for your help on our map.

MichaelHillcox commented 2 years ago

I'll take another look at powerpots. I might just write the entire implementation myself and find a way to just hijack the Botany Pots recipies. I don't think there is anything specifically wrong with that mod, it's a lot better than the old one. I feel like I can make some pretty big performance improvements ontop of what I've already done here. You're not the first person to say that Power Pots is causing issues but as you get to it so late in the game you're likely going to blame one thing vs the other. Don't get me wrong, it could be causing issues, I've just not been able to find any solid evidence of this fact. When I loaded your world, the first thing I did was remove power to the pots as the moment there is no power, it instantly stops running any checks. After I did this, I saw no meaningful improvements in TPS nor FPS.

You have a huge amout of ticking tiles (functional blocks, yes cables are included here...) in a few chunks and it will cause lag. The best solution is utilising Compact Machines, minimising your cable runs and make sure you're automation jobs are stopping when full or not needed. Modded servers are one hell of a task to keep running smoothy.

Raidobw2 commented 2 years ago

Thanks for the feedback mistermania :) I'm glad we managed to solve those issues at least for the moment, returning you to a better performance.

Our developer will take a look at the mod again as stated here and improve the functionality of it as time allows it.

Modded servers are one hell of a task to keep running smoothy.

This is very true Michael! 😄

KuroPeach commented 2 years ago

I have similar problem. Fortunately, the potted plant base was not placed in the main world at the beginning, but was collected in a compressed space with a drawer drive. The impact is not particularly serious. A single player is in a compressed space, and the server's bandwidth can still support it.

Raidobw2 commented 2 years ago

While our mod dev gets the time to investigate further, try placing the Power Pots inside a compact machine. This could be a temporary solution, if it works for you as well.