Mojira Archive
BDS-19101

Entering a nether portal causes 100% CPU every time

Any player entering a nether portal causes 4000% CPU (100% across all CPUs) usage. The server does not crash but recovers after a few minutes and the nether successfully loads. The problem is that it should not take 40 cores 2-3 minutes to load the nether every time and for every player. There are no errors in the log. This is an almost new server, the nether was created near the spawn.

Environment

Bedrock Server v1.20.62.03
Proxmox running linux container running docker container with 40 CPU cores
Plenty of SSD hard drive space
Plenty of RAM
Local gigabit networking
Thread count set to 0

Linked Issues

Attachments2

cpu usage.png
cpu usage.png

Rogue Cheddar

Comments23

Does this issue occur outside of BDS?

Not to my knowledge, however I did confirm that changing the thread count setting in the server config from 0 to 8 means that it only uses 800% CPU.

It also happening on 1.20.71

This problem has occurred on my server since many updates ago, probably 6 months or more. It seemed to get better with 1.20.64, slow to load through nether portals but did not crash the server. But since updating to 1.20.73, the crashes have started occurring again. Previous to 1.20.64, the crash would cause me to be at the entrance portal's coords in the dimension I was meant to be exiting to, so e.g. I go into portal in overworld at 100 64 2000, and end up on relog in the nether at 100 64 2000. Now when the server crashes it just takes me back in time by 30 seconds or so. CPU jumps to 700%, sometimes it will crash, other times is just takes ages to load as others see. Cannot replicate on single player world when use downloaded copy of the world and some portals perform better than others with varying levels of builds on either side of the portal. Server is hosted through Nodecraft, performance other than this portal issue is very good. Can answer questions if more info required.

This issue is still occurring on 1.20.81 

Still occurring in 1.20.81.01

@greymagic27 This does not happen outside of BDS

can confirm that

server.properties:
client-side-chunk-generation-enabled=false
 
reduce time to load nether while entering portals.
overwise, sometimes (below 50% cases) - player can hear footsteps sounds for a minute or so, and then after loading to Nether can fall down to lava through blocks below the portal.
 
So, developers, server need more time to load - just add more seconds in a process, or make some subrouting to check memory loading.
High CPU = unzipping and reading too more chunks in one moment.
 
IMO

Thanks for the report. We will take a look.

If client-side-chunk-generation-enabled isn't set to "true" in the server.properties, it can take quite a long time for CPU performance to settle if render distances are high.

If you're experiencing this, please post a comment with whether you're using client-side-chunk-generation-enabled and mention what your max render distance setting is.

For what it's worth, my 1.21.1.03 BDS has the same issue, but a perf recording during the issue period where a client is nether portaling mostly shows that the CPU "usage" is actually just threads spin-waiting on lock contention.

client-side-chunk-generation-enabled=true

for me, but it shouldn't matter greatly in this particular portaling event, the surrounding areas on both sides of the portal have been mutated and stored into the leveldb already so need to be fetched from the server anyways rather than the client generating its own.

The performance is extremely bad at all of the client view distances I tried from 24-50, and entering the nether portal takes 20-30 seconds.

 

edit: I spun up my world on Windows Server 2022 and it has the same issue, it's not exclusively a linux issue.

 

Thank you for your report!

However, this issue has been temporarily closed as Awaiting Response.

Is this issue occurring also in newly created worlds?

This ticket will automatically reopen when you reply.

Quick Links:
📓 Issue Guidelines – 💬 Mojang Support – 📓 Project Summary – 📧 Suggestions – 📖 Minecraft Wiki

Can confirm this is still an issue in version 1.21.2.02

Something to note; this issue not only occurs in brand new worlds, but also effects both Modded and un-modded Worlds.

Further update, I enabled client-side-chunk-generation-enabled on the server that I help run, with render distance set at 20, and this actually caused a lot more issues than when it was disabled.

Not only was the nether laggy, but the overworld starting lagging more, with chunks taking anywhere up to 30 seconds to load in.

After disabling the client-side-chunk-generation-enabled, the world goes back to only lagging when players go to the nether.

To add some data from my experience:

  • Newly created worlds
  • Tested BDS on:
    • debian 12 LXC (12 CPU Cores)
    • ubuntu 22.04 LXC (12 CPU Cores)
    • Windows 10 VM (12 CPU Cores)
  • Tested using `max-threads` set to 4, 8, 12, and 0.

In all instances, all threads use 100% CPU.

 

Some interesting observations:

  • The greater the view distance, the longer it takes to load the Nether.
  • It appears the more chunks previously generated in the Nether, the longer it takes to load.
  • The more threads I assign to a world, the longer it takes to load the Nether.
  • The CPU usage when navigating around the Nether (generating new chunks), is much higher than in the Overworld (when generating new chunks). 

Steps to reproduce:

  1. Create new world from fresh unzip of bds server download, using the default `server.properties`.
  2. Edit `server.properties` and set to creative mode, cheats enabled
  3. Start server
  4. Join world with Windows client set to 32 view distance
  5. Back at server console, give user OP
  6. Back at client, Create a portal
  7. Enter portal (At this point it doesn't take too long)
  8. Fly around nether to generate some chunks, in all directions away from portal.
  9. Return to Overworld
  10. Enter portal to Nether

Expected:

Nether should load in a few seconds

Actual:

It now takes longer to load the Nether.  

Sometimes the Nether appears, but you cannot interact with it, nor can you open your inventory.  After a while (10 - 60 seconds), you are teleported back to the portal and you can now interact with the Nether.

 

I can confirm this issue occurs on Windows 11 23H2 running 1.21.3 BDS with client-side-chunk-generation-enabled=true.

 

I also experienced that after immediately loading into the Nether, the portal, all other structures, and excavating is reverted to the original Nether landscape. After 30-60 seconds, the Nether loads with the structures and excavating, and you "teleport"/snap to the portal.

Below is a link to a video showing the lag described above.

https://youtu.be/xxw9vdYZ3Bs

 

Dedicated Server Specs are below.

Device name    minecraftserver
Processor    Intel(R) Core(TM) i7-9700 CPU @ 3.00GHz   3.00 GHz
Installed RAM    32.0 GB (31.8 GB usable)

 

 

Thank you for the details and the repro video! We will take a look

client-side-chunk-generation-enabled true or false cause same issue with my server i'v 3 server with same nether bug on linux centos

Having the same issue. Teleporting to the nether causes 100% CPU usage (all cores) for a good 30 seconds. The other players in the overworld experience severe lag.

Confirming I still have this issue on v1.21.23. Running on a Debian 12 VM on ESXi with plenty of power. All of my server players have this issue. I’ve had this issue running the server on Windows 11, Windows Server 2019, and Debian 12. Tried multiple setting and VM adjustments as well as kernel level adjustments and nothing seems to make it better. Just massive usage every time entering the nether. I’ll have 48 GHz of CPU Usage pulled just by my Minecraft VM.

I have this issue on my BDS as well and made a ticket about it last year here: BDS-19244

Interestingly, my server's issue is a bit different than the ones described here and at BDS-19359

I have the long nether loading time, which is alleviated when turning the render distance down. Also have chunks that refuse to load for 30+ seconds, which is present even with lowest render distance. (server render distance is 24 by default, I tried turning it to 5, same result.)

However, eating and flying are normal (not laggy as described in the other ticket). And notably, server CPU usage does not spike to 100% but goes up to around 60% for the duration of loading.

My server is hosted by Bisect Hosting and the "client-side-chunk-generation" option is not present in my server properties file

Also experiencing this issue on the server I play on.
 

History18

anladwig

Changed environment:

Bedrock Server v1.20.62.03
0Proxmox running linux container running docker container with 40 CPU cores
0Plenty of SSD hard drive space
0Plenty of RAM
0Local gigabit networking
0Thread count set to 0

anladwig

Changed summary:

One player entering a nether portal causes 100% CPU every time Entering a nether portal causes 100% CPU every time

[Mod] Greymagic27
[Bot] Arisa
anladwig

Added affects versions: 1.20.81

[MCQA] v-weszaj

Confirmation Status: UnconfirmedPlausible

[Mojang] CornerHard

Confirmation Status: PlausibleConfirmed

clockfort
anladwig

Added affects versions: 1.21.0

[Mod] Jarl-Penguin

Added affects versions: 1.21.1

[Mod] Jarl-Penguin
[Mod] Jarl-Penguin
[MCQA] Bartłomiej Słodkowski
[Bot] Arisa
anladwig

Added affects versions: 1.21.3

[Mod] Jarl-Penguin

Added affects versions: 1.21.23

Rogue Cheddar

Added attachment:

Unresolved
anladwig
17
17
Confirmed
1265097
1.20.62 - 1.21.231.20.62 1.20.81 1.21.0 1.21.1 1.21.3 1.21.23