[MCPE-22362] Lag/Massive resource usage Created: 04/Jun/17 Updated: 22/Dec/17 Resolved: 09/Oct/17 |
|
| Status: | Resolved |
| Project: | Minecraft (Bedrock codebase) |
| Component/s: | None |
| Affects Version/s: | 1.1.0.55, 1.1.2.50, 1.1.3.1, 1.1.4.51, 1.1.5.0, 1.2.1.1 |
| Fix Version/s: | 1.2.2.3 |
| Type: | Bug | ||
| Reporter: | Quintus Janse van Rensburg | ||
| Resolution: | Fixed | Votes: | 16 |
| Labels: | None | ||
| Attachments: |
|
||||||||||||||||||||||||||||||||||||||||||||||||||||
| Issue Links: |
|
||||||||||||||||||||||||||||||||||||||||||||||||||||
| Confirmation Status: | Confirmed | ||||||||||||||||||||||||||||||||||||||||||||||||||||
| Platform: | Windows | ||||||||||||||||||||||||||||||||||||||||||||||||||||
| CHK: | |||||||||||||||||||||||||||||||||||||||||||||||||||||
| Description |
|
When playing the game uses around 90% CPU and anywhere from 500MB - 3GB ram usage
Currently the host is a Intel I7 with 16 GB ram, game is loaded on a Intel Pro 2500 series SSD. |
| Comments |
| Comment by Terry Petersen [ 28/Sep/17 ] |
|
This appears to have fixed issues with maps and movement, however new issues resulting in lag have appeared with regards to the crafting changes (also dragging items across crafting table slots). Also an issue that was not as prominent before was placing torches while mining. If placed quickly enough it would take a torch from your inventory placing it for a split second before vanishing, since joining the BETA program this is much easier to encounter and also seems to occur when moving and placing torches. I have also encountered a minor inventory glitch where shift clicking 6 brown mushrooms into a chest with 44 mushrooms, left a "ghost" item in my character inventory and did not update the chest inventory. The main thing is that the map glitches now appear to be corrected. |
| Comment by Jesús A. Álvarez [ 27/Sep/17 ] |
|
1.2 seems to have completely fixed these issues for me. |
| Comment by richard alton [ 20/Sep/17 ] |
|
Tried to access 1.2 beta on xbox insider hub but it won't show up in the contents page. Boohooo |
| Comment by richard alton [ 20/Sep/17 ] |
|
Thanks for the prompt reply Richard. I may yet give it a try... Richard A |
| Comment by richard alton [ 20/Sep/17 ] |
|
Thanks again Terry. Your explanations are very thorough and thought provoking. Richard A |
| Comment by Richard Craig [ 20/Sep/17 ] |
|
On Windows 10 and Android, it works like any other update and loads your previous worlds just fine, no hunting required. |
| Comment by richard alton [ 20/Sep/17 ] |
|
Hi Richard Craig, Richard A |
| Comment by Richard Craig [ 19/Sep/17 ] |
|
I've updated to the 1.2 beta and am happy to report that I'm no longer having this issue! |
| Comment by Terry Petersen [ 19/Sep/17 ] |
|
Unfortunately I cannot do justice to the explanation of how LevelDB works nor it's use in Minecraft. What I do know is that it's not at all surprising to me to see hiccups like this when reading and writing millions of records concurrently. I mean lets assume your render distance is 16, this would create a grid 32 (+1) chunks squared the +1 is due to the fact that chunks are rendered based on what blocks should be visible not just when you enter/exit a chunk. Every time you move, that 32 (+1) squared set of chunks gets moved. Doing the math on this 32 (+ 1) squared grid results in 67,108,864 to 71,368,704 blocks being loaded in memory at any given moment. If you only move in one direction, let's say North, you'll be generating 2,162,688 (a row of 32 (+1) chunks) new blocks 15 chunks North of you all while saving changes to the 2,162,688 blocks that are no longer needed in memory 16 blocks South of you. To make matters worse, all these blocks are relative so they have to take into consideration the neighbouring chunk's blocks to complete cave systems and alike. I'll be pleasantly surprised if in fact Mojang does find a working solution to avoid corruption using the same database format. |
| Comment by richard alton [ 19/Sep/17 ] |
|
Yes, I'm having the same problem(s). And have been referred to this post which does appear quite similar. For me it is the mother of all problems at in my opinion it renders the whole game useless. I am now on my 3rd survival world which has now become unplayable. |
| Comment by [Mojang] Mega_Spud (Jay Wells) [ 19/Sep/17 ] |
|
Thanks for all of the input so far. We are very much aware of this issue and progress is being made. Many players that suffered with this problem on their worlds have had this issue solved in the 1.2 beta. Quick Links: |
| Comment by Richard Craig [ 16/Sep/17 ] |
|
All great points! I'm hoping that the unified nature of the Better Together update might entail some improvements to the DB system. And to be fair, I've been running at a 56 chunk render distance... Hate to scale it back as that's been a major part of how I explore my world, but it's better than ruining everything I suppose. Here's to hoping 1.2 fixes this even if this Jira ticket has gone ignored by Mojang... I'm sure this issue affects several aspects of performance. |
| Comment by Terry Petersen [ 16/Sep/17 ] |
|
The issue is caused by a number of known faults in the leveldb file system, Minecraft PE/Win 10/Console uses this to store game data with, one of the most common of these faults is reading/writing to RAM too quickly for the filesystem. Now while leveldb a very fast and exceptionally lightweight database structure it is seriously prone to corruption, Mojang has created their own version of this database for Minecraft but they have clearly not been able to resolve the issues which lead to corruption. In theory one way to correct a damaged database would be to re-write the files however this would result in more lost data due to corrupted segments needing to be ignored entirely, re-written data would therefore be incomplete and need to be regenerated which would probably cause chunks to be completely different, in other words you house might end up being half destroyed and replaced with a random tree. Things you can try to mitigate database corruption are:
It is worth remembering that Minecraft both reads and writes to the map files at the same time, the larger your render distance the more chunks needs to be loaded and unloaded while you move, this is just added stress to the database which we now know is not reliable enough to handle these changes. |
| Comment by Richard Craig [ 16/Sep/17 ] |
|
I make regular backups, but that doesn't really help the problem of being unable to expand our world. If I have to keep reverting to a backup, what's the point in doing anything at all? It's certainly good advice to always keep a backup, though! I may just run the world on an old laptop as the host since it's only the host that experiences CPU spiking; my partner doesn't experience any lag on the same world, only me since I'm the host. |
| Comment by Terry Petersen [ 16/Sep/17 ] |
|
Start making backups of your worlds, currently there is no known way to revert the damage to your world files without Mojangs developers creating a fix. |
| Comment by Richard Craig [ 16/Sep/17 ] |
|
Having the same issue, and my world is slowly becoming unplayable. Why is this still not being looked at? This is a major, game-breaking bug. |
| Comment by Da3va [ 07/Sep/17 ] |
|
Same problem here! I have a 175 MB survival world (single player). When I play, the CPU usage go to 100 % without motivation. This cause a continuos stuttering, making the videogame impractical. I have a decent hardware and Minecraft Windows 10 Edition is the only game that causes me this problem. I have already reinstalled the game, updated all the drivers (gpu included). Nothing changed. |
| Comment by Schmedricks MC [ 26/Aug/17 ] |
|
So I made another thread which has now been redirected to this, and I would like to ask if the developers or working on optimizing these issues? Or have they at least heard of it? These issues can ruin the whole Minecraft Experience (although the Marketplace will ruin everything) and I would at least like to know that someone is looking for a fix. |
| Comment by Ovyxo [ 26/Aug/17 ] |
|
I have probably the worst PC ever and everything is running smoothly for me on all the version so listed. Are You awareness of anything triggering this extreme CPU usage? |
| Comment by Jesús A. Álvarez [ 16/Aug/17 ] |
|
I'm having the same problem on 1.1.5 on Windows 10, with similar hardware (i7-4770k, 16GB RAM, GeForce GTX 780 and Samsung EVO SSD) Sometimes it freezes for a couple of minutes when going to/from the nether, before even showing the loading screen, and it can also crash immediately when using a portal. |
| Comment by Terry Petersen [ 30/Jul/17 ] |
|
I can now confirm beyond much doubt that hardware has little to no effect on this issue. I upgraded my hardware a couple of days ago and there has been no noticeable reduction of CPU consumption on my Minecraft world. However, unlike before decreasing render distance to 5 does (sometimes) impact how long the CPU spikes last. |
| Comment by Sarah [ 17/Jul/17 ] |
|
Our realm has been experiencing extreme lag and frequent realm crashes since the 1.1 update. It seems to be worse when players are going through a nether or end portal, in another dimension or trying to connect to the game. Chunks do not load, pressure plates and buttons fail to work, chests cannot be opened, dropped items cannot be picked up from the ground, the entire realm grinds to a halt often resulting in a realm crash. Reducing render distance and other graphic settings don't make any difference. After the 1.1 update, we did travel 10,000 blocks from spawn to find one of the new woodland mansions. We have also traveled great distances in the end in search of end cities. It seems like that should not cause serious issues as these generated structures are intended to be rare and require distant travel to reach. |
| Comment by Terry Petersen [ 08/Jul/17 ] |
|
Unfortunately if you are now experiencing CPU spikes like this when standing still there is no current way to repair you map files. If you get the occasional CPU spike when moving to a new area stop everything and just wait for it to pass, this appears to mitigate the currently irreversible damage to map files. Your graphical settings will have no effect on this. |
| Comment by Michelle Phillips [ 07/Jul/17 ] |
|
I have the exact same problem. Whilst it certainly becomes more apparent and grossly worse as overland travel is done via horse or running, it is still a prominent occurrence just staying within a small area. Reducing the render distance does not have a noticeable effect for me, and I also have an 8 Core machine. Simply standing still is enough to make it cause soaring CPU Usage. Oddly enough, my girlfriend's computer which often connects via LAN to me, does not suffer from the same lagging issue, and she has an Intel CPU one step down from mine, with otherwise equivalent hardware. Though, she does often have invisible, unloaded chunks when my CPU is soaring from it. When I first started the world, it ran fine. In fact, I had an even larger one I was running just a few months ago on the same machine and it never experienced this lag. But this world has progressively gotten worse and has more or less just plateaued at this level of lagginess. Sometimes it borders on unplayable, other times it's fine. I don't experience this issue with any other application or game. |
| Comment by [Mojang] Mega_Spud (Jay Wells) [ 27/Jun/17 ] |
|
The lag certainly feels like .ldb processing, but to a much greater degree than normal. I agree that travelling large distances quickly might be a root cause, as this happened on one of my survival worlds when I travelled to and from a woodland mansion. |
| Comment by Terry Petersen [ 27/Jun/17 ] |
|
This may have something to do with how fast the player moves in a given direction, when my world was corrupted I had been riding a horse, I restored that world from a backup, climbed on a new horse and am now experiencing this issue again. My best bet is that the speed of player movement may cause too many updates in quick succession for the database/storage device to handle potentially resulting in "fragmentation" of database files, especially when traversing new areas where chunks have not yet been generated, as I was. If this is the case a method be added to the world settings to "defragment" or sanity check the '*.ldb' files in the same way you can run a compact and repair on an Access database to free the deleted records and correct varying levels of fragmentation/corruption may help the user mitigate the issues this causes as not everyone has access to backups or is willing to loose a "days work". |
| Comment by [Mojang] Mega_Spud (Jay Wells) [ 27/Jun/17 ] |
|
Still affecting worlds in 1.1.3.1 |
| Comment by Joshua Scotson [ 26/Jun/17 ] |
|
We are experiencing this as well. We had our world hosted on a Realm and it was lagging horribly for everyone all the time, does not appear to be player event driven for us. We thought it was network lag because it was effecting everybody so we downloaded the realm and tried playing locally. For the network players they experience laggy response but for the host it is complete UI freezes and extremely high CPU utilization. It appears to be periodically triggered as it will spike for awhile then clear up then start again. There are about 7 threads starting from ucrtbase.dll!o__realloc_base+0x20 that take up all available CPU when the hanging starts. I have an 8 core CPU and it's taking over all 8 cores. I've removed all resource packs and it hasn't had any impact. |