[BDS-19101] Entering a nether portal causes 100% CPU every time Created: 06/Mar/24  Updated: 10/Jan/25

Status: Reopened
Project: Bedrock Dedicated Server
Affects Version/s: 1.20.62, 1.20.81, 1.21.0, 1.21.1, 1.21.3, 1.21.23
Fix Version/s: None

Type: Bug
Reporter: anladwig Assignee: Unassigned
Resolution: Unresolved Votes: 15
Labels: None
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


Attachments: PNG File cpu usage.png     PNG File image-2024-06-18-05-24-34-858.png    
Issue Links:
Relates
relates to BDS-19244 High render distance causes long Neth... Open
relates to BDS-19359 Nether lags dedicated servers Reopened
Confirmation Status: Confirmed
ADO: 1265097

 Description   

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.



 Comments   
Comment by Rogue Cheddar [ 10/Jan/25 ]

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

Comment by benshan36 [ 15/Sep/24 ]

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.

Comment by taffofox [ 21/Aug/24 ]

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.

Comment by Jean-René [ 18/Aug/24 ]

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

Comment by [Mojang] CornerHard [ 24/Jul/24 ]

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

Comment by Joseph Kasal [ 24/Jul/24 ]

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)

 

 

Comment by John Tock [ 18/Jul/24 ]

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.

 

Comment by Tony Smith [ 12/Jul/24 ]

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.

Comment by Tony Smith [ 11/Jul/24 ]

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.

Comment by [MCQA] Bartłomiej Słodkowski [ 10/Jul/24 ]

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

Comment by clockfort [ 18/Jun/24 ]

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.

 

Comment by [Mojang] CornerHard [ 17/Jun/24 ]

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.

Comment by [Mojang] CornerHard [ 12/Jun/24 ]

Thanks for the report. We will take a look.

Comment by nspirit74 [ 09/Jun/24 ]

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

Comment by anladwig [ 07/Jun/24 ]

@greymagic27 This does not happen outside of BDS

Comment by anladwig [ 07/Jun/24 ]

Still occurring in 1.20.81.01

Comment by Benjamin N Brooks [ 30/May/24 ]

This issue is still occurring on 1.20.81 

Comment by AusCatDad [ 12/Apr/24 ]

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.

Comment by JndjanBartonka [ 11/Apr/24 ]

Pls fix that!

Comment by JndjanBartonka [ 23/Mar/24 ]

It also happening on 1.20.71

Comment by anladwig [ 11/Mar/24 ]

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.

Comment by [Mod] Greymagic27 [ 09/Mar/24 ]

Does this issue occur outside of BDS?

Generated at Sat Jan 11 08:24:19 UTC 2025 using Jira 9.12.2#9120002-sha1:301bf498dd45d800842af0b84230f1bb58606c13.