Uploaded image for project: 'Minecraft: Java Edition'
  1. Minecraft: Java Edition
  2. MC-117566

Minecraft uses excessive CPU time and electrical power when idle, not in focus, and/or completely invisible

XMLWordPrintable

    • Icon: Bug Bug
    • Resolution: Invalid
    • None
    • Minecraft 1.12 Pre-Release 3
    • None
    • 2015 MacBook Pro
    • Unconfirmed

      It's common for video games to use a lot of power, because graphical display rendering is very compute-intensive. However, Minecraft uses an enormous amount of power regardless of whether or not you can even see the screen.

      I did some experimentation. On my 2015 MacBook Pro, I had a few apps basically idle in the background, like Word and Safari and such, and I measured power consumption of 17 Watts.

      I then fired up Minecraft, with the frame rate set to 60 fps (actually unlimited but with vsync enabled), and I found that it consumed more than 90 Watts, constantly all the time. It used 90+ Watts while I was playing, and it used 90+ Watts if I paused the game in single player mode. When I play MC, I get full-screen by using the green orb in the window decorations, giving the game its own desktop. So I can switch desktops and have MC be completely invisible and not having focus. Even when the graphical rendering output is going absolutely nowhere. Even then, the game uses 90+ Watts. The game can obviously tell when it doesn't have focus, so there's no reason it should be rendering anything when it's not possible for the player to see it.

      To make sure that this was graphics, I dropped the framerate to 10fps, and the power dropped to 28 Watts.

      Why is this so important? Idling in Minecraft is not the least bit an unusual thing for people to do. I personally get called away from the game a lot. Someone comes to the door, my kid needs help with something, my kid need help with their Minecraft game, I get distracted by something on TV, I'm waiting for items to smelt in the game, you name it. I am by no means unique in this regard. Minecraft users spend a heck of a lot of time idling, and very often, there isn't any opportunity or desire to stop and quit the same, and certainly no opportunity to hunt through the menus to manually change the framerate. When an interruption happens, you have no choice but to get up and handle it, with some users under the mistaken impression that pausing the game makes any difference. (Most instances of AFK are not planned out in advance, where you can take the time to manually lower your frame rate.) Now, let's multiply that idle time and wasted power across the millions of Minecraft users...

      According to a Google search, Dinnerbone had mentioned in January of 2015 that at any given time, there over a million Minecraft users logged in simultaneously. In the 2 years since then, a lot more people have bought Minecraft, but let's go with this figure and make some other conservative assumptions:

      • Only 10% (100 thousand) of those people are idle at any one moment.
      • They have similar power consumption to mine. Many older systems will require a higher proportion of processing power and consume more power, but for the sake of argument, let's assume they're only using 91 Watts when playing at 60 fps.
      • Let's also go with the 28 Watts that I get at 10fps, although it could be even lower if the framerate could be reduced further.

      Doing the math, we get (91-28)*100000 = 6300000. So I estimate that Minecraft users are WASTING at least 6.3 million Watts globally, probably a great deal more.

      This is not the least bit environmentally friendly.

      Mojang should be particularly concerned about this, considering how wildly popular the game is, which gives them an unusually large user base and environmental footprint. I would qualify this burden on global energy resources as "unintended bad behavior" and also a "performance bug" of sorts.

      Before we get complicated, there is one relatively simple things that can be done that would save an enormous amount of power. Since it is possible for the user to change the framerate while the game is running, then it should also be possible for the game to dynamically change the framerate.

      A simple and highly effective solution would be to detect when the game is invisible or even just out of focus and drop the framerate to 10 fps (with the option to turn the feature off, of course). That's it, and this is simple enough that it should be possible to sneak it into 1.12 as part of the "final optimizations" that your engineers are currently working on.

      Going forward, the game could be even smarter about this. Framerate could be dynamically adjusted between a selectable frame rate cap and floor, based on user activity and the amount of visible activity on the screen. If I'm walking or panning, smooth animation is very important, but if I'm just standing around in the game, the jitteriness is hardly noticeable to me even at 20 fps for most things. Putting a preliminary version of this into snapshots for 1.13 would also really help work out the best heuristics for this.

      A dynamic framerate feature would also be a major boon to laptop users. The heat and fan noise can make playing MC on a laptop rather uncomfortable. I've forced myself to get used to 30 fps, which helps a lot. But this could be handled much better.

      Thank you very much for your time and consideration.

            grum [Mojang] Grum (Erik Broes)
            theosib2 Timothy Miller
            Votes:
            5 Vote for this issue
            Watchers:
            4 Start watching this issue

              Created:
              Updated:
              Resolved: