Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Loaded Chunks #2591

Closed
ZzSnkeX opened this issue Jan 4, 2025 · 17 comments
Closed

Loaded Chunks #2591

ZzSnkeX opened this issue Jan 4, 2025 · 17 comments
Labels
Status: Need answer Waiting for more information to be provided by the issue's author.

Comments

@ZzSnkeX
Copy link

ZzSnkeX commented Jan 4, 2025

Expected behavior

No bad tps

Observed/Actual behavior

My Minecraft server has sufficient allocated RAM (6 GB) and maintains a TPS of 20 for most of the time. However, it occasionally experiences severe performance drops, with a warning message stating Can't keep up! Is the server overloaded? Running 2502ms or 50 ticks behind. As what i saw, the ram is not a problem since its no using more than 3 GB. High number of loaded chunks: "Skyblock" world has 818 chunks, Nether and End each have 529 chunks loaded, where the islands of the player are. I guess there are too many loaded chunks and entities, since my survival server uses less ram and have more players , with perfect 20 tps

Steps/models to reproduce

just load the plugin

BentoBox version

Running PAPER 1.20.6
(1.20.6-2233-0d6766e (MC 1.20.6))
Bentobox version: 2.6.0
Database: JSON

Loaded Game Worlds:
skyblock (Skyblock): Overworld, Nether, The End

Loaded Addons:
Biomes 2.2.0 (ENABLED)
Border 4.3.0 (ENABLED)
BSkyBlock 1.18.1 (ENABLED)
Chat 1.1.4 (ENABLED)
IslandFly 1.12.0 (ENABLED)
Level 2.14.0 (ENABLED)
Visit 1.6.0 (ENABLED)

Plugin list

No response

Other

No response

@tastybento
Copy link
Member

Hi there,

As you mention, RAM is not being used much, and loaded chunks would not be the cause.

I recommend you use the Spark profiler to detect what is causing the lag spikes and then we'll see what can be done about them. Read https://spark.lucko.me/docs/guides/Finding-lag-spikes and try and do what it says. Then report back.

Good luck.

@tastybento tastybento added the Status: Need answer Waiting for more information to be provided by the issue's author. label Jan 5, 2025
@ZzSnkeX
Copy link
Author

ZzSnkeX commented Jan 5, 2025

Here is the spark profiler
https://spark.lucko.me/HM2WnMWFIe

Here is the tickmonitor

[14:18:14] [Server thread/INFO]: [⚡] Tick monitor started. Before the monitor becomes fully active, the server's average tick rate will be calculated over a period of 120 ticks (approx 6 seconds).
[14:18:20] [Craft Scheduler Thread - 1096 - spark/INFO]: [⚡] Analysis is now complete.
[14:18:20] [Craft Scheduler Thread - 1096 - spark/INFO]: [⚡] > Max: 50.29ms
[14:18:20] [Craft Scheduler Thread - 1096 - spark/INFO]: [⚡] > Min: 49.74ms
[14:18:20] [Craft Scheduler Thread - 1096 - spark/INFO]: [⚡] > Average: 50ms
[14:18:20] [Craft Scheduler Thread - 1096 - spark/INFO]: [⚡] Starting now, any ticks with >100.0% increase in duration compared to the average will be reported.
[14:18:26] [Craft Scheduler Thread - 1111 - spark/INFO]: [⚡] Tick #237 included GC lasting 7 ms. (type = Young Gen)
[14:18:27] [Craft Scheduler Thread - 1111 - spark/INFO]: [⚡] Tick #246 included GC lasting 16 ms. (type = end of concurrent GC pause)
[14:18:27] [Craft Scheduler Thread - 1068 - spark/INFO]: [⚡] Tick #249 included GC lasting 0 ms. (type = end of concurrent GC pause)
[14:18:33] [Craft Scheduler Thread - 1107 - spark/INFO]: [⚡] Tick #377 included GC lasting 5 ms. (type = Young Gen)
[14:18:40] [Craft Scheduler Thread - 1068 - spark/INFO]: [⚡] Tick #517 included GC lasting 9 ms. (type = Young Gen)
[14:18:44] [Craft Scheduler Thread - 1087 - spark/INFO]: [⚡] Tick #588 lasted 112.22 ms. (124.45% increase from avg)
[14:18:47] [Craft Scheduler Thread - 1066 - spark/INFO]: [⚡] Tick #657 included GC lasting 6 ms. (type = Young Gen)
[14:18:48] [Craft Scheduler Thread - 1111 - spark/INFO]: [⚡] Tick #666 included GC lasting 15 ms. (type = end of concurrent GC pause)
[14:18:48] [Craft Scheduler Thread - 1082 - spark/INFO]: [⚡] Tick #669 included GC lasting 0 ms. (type = end of concurrent GC pause)
[14:18:54] [Craft Scheduler Thread - 1108 - spark/INFO]: [⚡] Tick #790 included GC lasting 6 ms. (type = Young Gen)
[14:19:01] [Craft Scheduler Thread - 1102 - spark/INFO]: [⚡] Tick #926 included GC lasting 15 ms. (type = Young Gen)
[14:19:07] [Craft Scheduler Thread - 1102 - spark/INFO]: [⚡] Tick #1062 included GC lasting 7 ms. (type = Young Gen)
[14:19:08] [Craft Scheduler Thread - 1079 - spark/INFO]: [⚡] Tick #1071 included GC lasting 9 ms. (type = end of concurrent GC pause)
[14:19:08] [Craft Scheduler Thread - 1095 - spark/INFO]: [⚡] Tick #1074 included GC lasting 0 ms. (type = end of concurrent GC pause)
[14:19:15] [Craft Scheduler Thread - 1103 - spark/INFO]: [⚡] Tick #1207 included GC lasting 4 ms. (type = Young Gen)
[14:19:22] [Craft Scheduler Thread - 1113 - spark/INFO]: [⚡] Tick #1347 included GC lasting 8 ms. (type = Young Gen)
[14:19:29] [Craft Scheduler Thread - 1102 - spark/INFO]: [⚡] Tick #1493 included GC lasting 6 ms. (type = Young Gen)
[14:19:29] [Craft Scheduler Thread - 1102 - spark/INFO]: [⚡] Tick #1503 included GC lasting 15 ms. (type = end of concurrent GC pause)
[14:19:30] [Craft Scheduler Thread - 1111 - spark/INFO]: [⚡] Tick #1506 included GC lasting 0 ms. (type = end of concurrent GC pause)
[14:19:36] [Craft Scheduler Thread - 1068 - spark/INFO]: [⚡] Tick #1637 included GC lasting 6 ms. (type = Young Gen)
[14:19:43] [Craft Scheduler Thread - 1107 - spark/INFO]: [⚡] Tick #1780 included GC lasting 10 ms. (type = Young Gen)
[14:19:50] [Craft Scheduler Thread - 1102 - spark/INFO]: [⚡] Tick #1917 included GC lasting 5 ms. (type = Young Gen)
[14:19:51] [Craft Scheduler Thread - 1111 - spark/INFO]: [⚡] Tick #1926 included GC lasting 9 ms. (type = end of concurrent GC pause)
[14:19:51] [Craft Scheduler Thread - 1079 - spark/INFO]: [⚡] Tick #1929 included GC lasting 0 ms. (type = end of concurrent GC pause)
[14:19:57] [Craft Scheduler Thread - 1109 - spark/INFO]: [⚡] Tick #2060 included GC lasting 6 ms. (type = Young Gen)
[14:20:04] [Craft Scheduler Thread - 1108 - spark/INFO]: [⚡] Tick #2202 included GC lasting 9 ms. (type = Young Gen)
[14:20:12] [Craft Scheduler Thread - 1089 - spark/INFO]: [⚡] Tick #2347 included GC lasting 8 ms. (type = Young Gen)
[14:20:12] [Craft Scheduler Thread - 1083 - spark/INFO]: [⚡] Tick #2356 included GC lasting 14 ms. (type = end of concurrent GC pause)
[14:20:12] [Craft Scheduler Thread - 1082 - spark/INFO]: [⚡] Tick #2359 included GC lasting 0 ms. (type = end of concurrent GC pause)
[14:20:19] [Craft Scheduler Thread - 1112 - spark/INFO]: [⚡] Tick #2492 included GC lasting 6 ms. (type = Young Gen)
[14:20:26] [Craft Scheduler Thread - 1103 - spark/INFO]: [⚡] Tick #2637 included GC lasting 11 ms. (type = Young Gen)
[14:20:33] [Server thread/INFO]: ZzSnkeX issued server command: /spark
[14:20:33] [Craft Scheduler Thread - 1096 - spark/INFO]: [⚡] Tick #2782 included GC lasting 5 ms. (type = Young Gen)
[14:20:34] [Craft Scheduler Thread - 1104 - spark/INFO]: [⚡] Tick #2791 included GC lasting 8 ms. (type = end of concurrent GC pause)
[14:20:34] [Craft Scheduler Thread - 1103 - spark/INFO]: [⚡] Tick #2794 included GC lasting 0 ms. (type = end of concurrent GC pause)
[14:20:35] [Server thread/INFO]: ZzSnkeX issued server command: /spark help
[14:20:40] [Craft Scheduler Thread - 1100 - spark/INFO]: [⚡] Tick #2922 included GC lasting 6 ms. (type = Young Gen)
[14:20:48] [Craft Scheduler Thread - 1112 - spark/INFO]: [⚡] Tick #3067 included GC lasting 5 ms. (type = Young Gen)
[14:20:48] [Server thread/INFO]: ZzSnkeX issued server command: /spark profiler start 60
[14:20:55] [Craft Scheduler Thread - 1103 - spark/INFO]: [⚡] Tick #3207 included GC lasting 8 ms. (type = Young Gen)
[14:20:55] [Craft Scheduler Thread - 1111 - spark/INFO]: [⚡] Tick #3216 included GC lasting 8 ms. (type = end of concurrent GC pause)
[14:20:55] [Craft Scheduler Thread - 1111 - spark/INFO]: [⚡] Tick #3219 included GC lasting 0 ms. (type = end of concurrent GC pause)
[14:20:59] [Server thread/INFO]: ZzSnkeX issued server command: /spark profiler start --timeout 60
[14:20:59] [Craft Scheduler Thread - 1108 - spark/INFO]: [⚡] Starting a new profiler, please wait...
[14:20:59] [Craft Scheduler Thread - 1108 - spark/INFO]: [⚡] Profiler is now running! (async)
[14:20:59] [Craft Scheduler Thread - 1108 - spark/INFO]: [⚡] The results will be automatically returned after the profiler has been running for 1m.
[14:21:02] [Craft Scheduler Thread - 1104 - spark/INFO]: [⚡] Tick #3352 included GC lasting 7 ms. (type = Young Gen)
[14:21:09] [Craft Scheduler Thread - 1111 - spark/INFO]: [⚡] Tick #3487 included GC lasting 12 ms. (type = Young Gen)
[14:21:16] [Craft Scheduler Thread - 1111 - spark/INFO]: [⚡] Tick #3632 included GC lasting 6 ms. (type = Young Gen)
[14:21:16] [Craft Scheduler Thread - 1115 - spark/INFO]: [⚡] Tick #3641 included GC lasting 9 ms. (type = end of concurrent GC pause)
[14:21:16] [Craft Scheduler Thread - 1104 - spark/INFO]: [⚡] Tick #3644 included GC lasting 0 ms. (type = end of concurrent GC pause)
[14:21:23] [Craft Scheduler Thread - 1095 - spark/INFO]: [⚡] Tick #3777 included GC lasting 6 ms. (type = Young Gen)
[14:21:31] [Craft Scheduler Thread - 1066 - spark/INFO]: [⚡] Tick #3926 included GC lasting 14 ms. (type = Young Gen)
[14:21:38] [Craft Scheduler Thread - 1087 - spark/INFO]: [⚡] Tick #4072 included GC lasting 6 ms. (type = Young Gen)
[14:21:38] [Craft Scheduler Thread - 1102 - spark/INFO]: [⚡] Tick #4082 included GC lasting 10 ms. (type = end of concurrent GC pause)
[14:21:39] [Craft Scheduler Thread - 1066 - spark/INFO]: [⚡] Tick #4085 included GC lasting 0 ms. (type = end of concurrent GC pause)
[14:21:45] [Craft Scheduler Thread - 1115 - spark/INFO]: [⚡] Tick #4220 included GC lasting 6 ms. (type = Young Gen)
[14:21:53] [Craft Scheduler Thread - 1112 - spark/INFO]: [⚡] Tick #4367 included GC lasting 10 ms. (type = Young Gen)
[14:21:59] [ForkJoinPool.commonPool-worker-6/INFO]: [⚡] The active profiler has completed! Uploading results...
[14:21:59] [Craft Scheduler Thread - 1115 - spark/INFO]: [⚡] Tick #4492 included GC lasting 6 ms. (type = Young Gen)
[14:21:59] [Craft Scheduler Thread - 1112 - spark/INFO]: [⚡] Tick #4501 included GC lasting 8 ms. (type = end of concurrent GC pause)
[14:21:59] [Craft Scheduler Thread - 1112 - spark/INFO]: [⚡] Tick #4504 included GC lasting 0 ms. (type = end of concurrent GC pause)
[14:22:00] [Attach Listener/ERROR]: [STDERR] [sun.instrument.InstrumentationImpl] WARNING: A Java agent has been loaded dynamically (/tmp/byteBuddyAgent7228417243773983754.jar)
WARNING: If a serviceability tool is in use, please run with -XX:+EnableDynamicAgentLoading to hide this warning
WARNING: If a serviceability tool is not in use, please run with -Djdk.instrument.traceUsage for more information
WARNING: Dynamic loading of agents will be disallowed by default in a future release
[14:22:00] [ForkJoinPool.commonPool-worker-6/INFO]: [spark] If you see a warning above that says "WARNING: A Java agent has been loaded dynamically", it can be safely ignored.
[14:22:00] [ForkJoinPool.commonPool-worker-6/INFO]: [spark] See here for more information: https://spark.lucko.me/docs/misc/Java-agent-warning
[14:22:01] [ForkJoinPool.commonPool-worker-6/INFO]: [⚡] Profiler stopped & upload complete!
[14:22:01] [ForkJoinPool.commonPool-worker-6/INFO]: https://spark.lucko.me/HM2WnMWFIe
[14:22:03] [Craft Scheduler Thread - 1112 - spark/INFO]: [⚡] Tick #4572 included GC lasting 8 ms. (type = Young Gen)
[14:22:10] [Craft Scheduler Thread - 1117 - spark/INFO]: [⚡] Tick #4712 included GC lasting 13 ms. (type = Young Gen)
[14:22:12] [Server thread/INFO]: ZzSnkeX issued server command: /spark tickmonitor
[14:22:12] [Craft Scheduler Thread - 1114 - spark/INFO]: [⚡] Tick monitor disabled.

Hope this helps

@ZzSnkeX
Copy link
Author

ZzSnkeX commented Jan 5, 2025

image

@tastybento
Copy link
Member

I think you have to run it long enough for those lag spikes to occur. From looking at that profile the TPS is 20 across the board. All the plugins are showing everything looks good.
Do you know what causes the lag spikes? Can you replicate it? If so, what do you do?

@ZzSnkeX
Copy link
Author

ZzSnkeX commented Jan 6, 2025

I believe I've identified the issue. From my observations and tests, setting the same values for -Xms and -Xmx causes spikes across the entire network, even if the allocated RAM isn't fully utilized. Additionally, when I configured BentoBox worlds to be the only worlds on the server, the superflat world generation was still occurring. I'm currently following the tutorial to resolve this, but the problem seems to persist.

level-name=skyblock
use-world-generator: false

I don't use multiverse or any other world generation plugin

https://pastebin.com/9LbAMYtq - here is the bukkit.yml

Already made the changes but as i can see in game and via console, the floor is still being generated
image

@ZzSnkeX
Copy link
Author

ZzSnkeX commented Jan 6, 2025

image

I tried giving it a biome provider

worlds:
skyblock:
generator: BentoBox
biome-provider: BentoBox
skyblock_nether:
generator: BentoBox
biome-provider: BentoBox
skyblock_the_end:
generator: BentoBox
biome-provider: BentoBox

Waiting for your response

@tastybento
Copy link
Member

tastybento commented Jan 7, 2025

Okay so you have fixed the lag spikes but now you have a different I ssue with super flat.

In a default installation this should never happen. It looks like you are trying to make Skyblock the default world. Did you try and follow this approach? https://docs.bentobox.world/en/latest/BentoBox/Set-a-BentoBox-world-as-the-server-default-world/

@ZzSnkeX
Copy link
Author

ZzSnkeX commented Jan 7, 2025

Yes, i gaved the bukkit file in a pastebin. I tried with Biome-Provider too but seems to be inneficient

@ZzSnkeX
Copy link
Author

ZzSnkeX commented Jan 8, 2025

hmm, any help?

@tastybento
Copy link
Member

Did you change the name of the world that BSkyBlock makes to "skyblock"? The default is bskyblock_world and not skyblock. The name of the world is set in BSkyBlock's config.yml.

Other than that, I cannot replicate this issue, sorry. It works perfectly on my test server.

> bbox v
[17:24:39 INFO]: Running PAPER 1.20.6.
[17:24:39 INFO]: (1.20.6-140-9e7f6c3 (MC: 1.20.6))
[17:24:39 INFO]: BentoBox version: 2.6.0
[17:24:39 INFO]: Database: JSON
[17:24:39 INFO]: Loaded Game Worlds:
[17:24:39 INFO]: boxed_world (Boxed): Overworld, Nether
[17:24:39 INFO]: bskyblock_world (BSkyBlock): Overworld, Nether, The End
[17:24:39 INFO]: Loaded Addons:
[17:24:39 INFO]: Bank 1.7.1-SNAPSHOT-b87 (ENABLED)
[17:24:39 INFO]: Biomes 2.2.0-SNAPSHOT-LOCAL (ENABLED)
[17:24:39 INFO]: Border 4.3.0 (ENABLED)
[17:24:39 INFO]: Boxed 2.6.1-SNAPSHOT-LOCAL (ENABLED)
[17:24:39 INFO]: BSkyBlock 1.18.1 (ENABLED)
[17:24:39 INFO]: CauldronWitchery 2.1.0-SNAPSHOT-#62 (ENABLED)
[17:24:39 INFO]: Challenges 1.3.0 (ENABLED)
[17:24:39 INFO]: Chat 1.2.0 (ENABLED)
[17:24:39 INFO]: CheckMeOut 1.2.0-SNAPSHOT-b95 (ENABLED)
[17:24:39 INFO]: ControlPanel 1.13.1 (ENABLED)
[17:24:39 INFO]: DimensionalTrees 1.7.0 (ENABLED)
[17:24:39 INFO]: ExtraMobs 1.13 (ENABLED)
[17:24:39 INFO]: Greenhouses 1.8.0-SNAPSHOT-b370 (ENABLED)
[17:24:39 INFO]: InvSwitcher 1.14.0-SNAPSHOT-LOCAL (ENABLED)
[17:24:39 INFO]: IslandFly 1.12.0 (ENABLED)
[17:24:39 INFO]: Level 2.14.0-SNAPSHOT-b575 (ENABLED)
[17:24:39 INFO]: Likes 2.4.0 (ENABLED)
[17:24:39 INFO]: Limits 1.21.0 (ENABLED)
[17:24:39 INFO]: MagicCobblestoneGenerator 2.5.2-SNAPSHOT-LOCAL (ENABLED)
[17:24:39 INFO]: TwerkingForTrees 1.5.1 (ENABLED)
[17:24:39 INFO]: Visit 1.7.0-SNAPSHOT (ENABLED)
[17:24:39 INFO]: VoidPortals 1.5.0.1-SNAPSHOT-b91 (ENABLED)
[17:24:39 INFO]: Warps 1.15.0-SNAPSHOT-b362 (ENABLED)
> 

@ZzSnkeX
Copy link
Author

ZzSnkeX commented Jan 12, 2025

image

Did you change the name of the world that BSkyBlock makes to "skyblock"? The default is bskyblock_world and not skyblock. The name of the world is set in BSkyBlock's config.yml.

Yes i did, in bskyblock, bukkit and everywhere else the name of the world for BSkyBlock is skyblock, here is my config in case u don't believe me

world:
friendly-name: SkyBlock
world-name: skyblock

i tried to change the world name back to world, in order to use clean superflat but it seems like this doesnt work properly. The superflat still remains even if i had the default world back

@ZzSnkeX
Copy link
Author

ZzSnkeX commented Jan 12, 2025

image
Here is after i re-did the tutorial, i think the issue here is the Clear superflat, idk
Flat generation doesnt come back so i think the setup is not the issue
it keeps clearing something that is not there
meanwhile where is superflat remains, the super flat is at Y = -60, superflat removal should have cleaned it

@tastybento
Copy link
Member

Okay. I recommend you turn off clean super flat. If you don't need the world, just delete it.

Apart from that, is everything working?

I'm still confused by your problems. If you install the plugin and BSkyBlock from scratch and use defaults then does it work for you? It should.

@ZzSnkeX
Copy link
Author

ZzSnkeX commented Jan 12, 2025

I need the world's and the islands so deleting is not possible for me. My issue right now is that the super flat generation cleans the respective chunk,but it seems like a loop,clearing something that is not there already. The world is not generating any superflat anymore. Where superflat is existent, it doesn't clear those respective chunks. Seems to be stuck at around X - 100. I teleported to those coordinates, turning off clean super flat, and I can't find a block/structure

@tastybento
Copy link
Member

Okay, I recommend you don't use clean super flat then. It seems it is incorrectly firing. It is a very simple algorithm and just checks is there is superflat blocks in the chunk. Maybe it is being fooled somehow. Anyway, best not to run it.

@tastybento tastybento closed this as not planned Won't fix, can't repro, duplicate, stale Jan 14, 2025
@ZzSnkeX
Copy link
Author

ZzSnkeX commented Jan 18, 2025

And what should i do in order to remove the actual superflat chunks? Manual or what?

@tastybento
Copy link
Member

Yes. Maybe use a tool like

https://www.9minecraft.net/mca-selector-tool

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Status: Need answer Waiting for more information to be provided by the issue's author.
Projects
None yet
Development

No branches or pull requests

2 participants