I think Unity 5.4 was the cure to this. I have not done much testing, nor have I looked into this for months. Tried the latest version, booted up the car scene and it seems to be stable for 20 minutes straight, 32- and 64-bit. Happy times!!! I will report back if I see any unity games in the 5.4 era which have the bug in it.
I feel like bringing this to their attention was my biggest contribution to the world of gaming and technology
Original post:
Hey Unity community!
I have a VERY serious problem. Please, help me squash it! I’m not a developer yet but right now just playing Unity games I am getting 100% CPU usage on many games.
My system:
Windows 7 X64 SP1
24-Core Xeon (2x 12-core Xeon E5 2685)
32GB ECC DDR4 (2x 16GB)
Asus Z10PE-D16 WS motherboard
AMD Radeon R9 290 4GB (reference)
And I mean as in, 100% usage across all cores, not just momentarily… the whole time the game is running. If I use battle encoder shirase to limit the CPU usage of a game, it runs poorly. For example, the very first game I had this issue with (4 days after building this brand new computer), I got 100% CPU usage in Feed and Grow: Fish and started troubleshooting. I limited it to 60% CPU usage overall and the performance went down to 15-20 FPS. I then used Process Lasso and limited it to 6 cores, 2 cores, or even 1 core, and the framerate kept dropping as low as 2 FPS. Ridiculous, I gave them a bad review because I had never seen something like this before, but I deleted my review after I started to notice this issue on other games as well.
The next game I had an issue with was Dark Days, but the first area was okay. It just started to 100% on me on the second level. Buggy game overall, I didn’t think much of it at the time. I have a second computer which does not have this issue (AMD FX-8320-powered), so I figured I could just use that for the buggier games.
I then came across Square Heroes. Extremely simple game without 3D graphics, instantly goes 100% usage on all cores. Can’t even get 10 seconds into the game. It was at that time I was suspicious of some bug in the Unity engine…
Now just a few minutes ago, PewDiePie: Legend of the Brofist is giving the 100% CPU usage bug. Interestingly, I can make it through the first level okay, but as soon as it goes to load the world map the computer 100%'s all cores.
Does anyone have an idea what is going on here? It’s not all Unity games, just some of them. I have a library that spans several thousand games so I have tested probably 20 other Unity games in the past week which do not have this bug, playing for hours in some games, no sign of any problem.
There is something in common with these problematic games. Do you guys want me to keep listing off games with the bug? I’ll surely come across more of them this week. Is there a troubleshooting procedure I could provide to you? CPU-Z systeminfo, maybe?
But why so many games, and not others? and only on my computer? it is a bug. I know it’s something in the developer’s code that is causing the issue, but what? surely pewdiepie’s game is not blowing out everyone’s computer, just mine.
Some developers put vsync on by default, some off etc, or use Application target framerate… lots of reasons, but this isn’t a bug. If you think it is a bug, you need to create a reproduction in Unity then use the bug reporter. Unity will then be able to check it against your hardware and verify or not.
Currently, it’s not a bug until you can prove it. 100% utilisation isn’t a bug, it could be anything on your computer. There’s no proof, and in this industry, proof is everything.
What if I sat here and went through all my games and could find you 100 examples where that is not true. I have over 5500 to go through, and it seems to be 25% of all unity games have this bug.
I have two computers, side by side, my AMD rig does not have this issue, the Xeon one does. So your theory of the developer’s code is not exactly true because otherwise it would 100% CPU in both systems.
Then Unity would 100% ignore you. Unless you can prove it with a reproduction scene sent to them via the bug reporter. It’s a few clicks, so start developing
As I said, anyone can say anything. It doesn’t matter if you’re a huge developer or an individual, in this industry it’s required to prove there is a bug. As you say, it doesn’t happen on your other computer. This alone is grounds for a proper bug report from within Unity + repro scene. Or they won’t touch it.
Open Unity
get a test scene going
make a standalone build
If it happens:
send a bug report via help->report a bug, be sure to explain your situation in the text box provided there.
So it is impossible to get support from Unity as an individual. I don’t have source code to these games, but also you don’t have the hardware I have to test it on.
So what stops you reporting a bug using the bug reporter? BTW I am not Unity staff, I just help people out. I’m helping you out by telling you what Unity DOES listen to, and that’s a bug report from a program you make - it can be as small as you like. You did point out you’re planning to so make a box scene and submit it. The bug reporter tool gathers the information about your system hardware that is required.
Do you have any suggestions on what to include in the box scene? I’ve used unity once or twice but the chances I create a scene with this problem are slim. Like I said, 75%+ of games work fine.
Maybe there is a demonstration scene I can find which has this issue already… Is there a way to tell what Unity version a game is using? Maybe they are Unity 4 scenes, maybe Unity 5…
Well any fixes applied by unity aren’t going to affect your games unfortunately, unless the developer chooses to update to the latest version. Many developers do not want to as Unity 5 games require re-engineering a lot of the source and assets.
Providing it is a bug. Is this problem you’re having when they’re in the background or in focus? If the game is still using 100% CPU - with ‘run in background’ not checked - then that’s a bug.
If you’re talking about games IN focus still being 100% then that’s actually intentional.
I suspect you should probably update GPU drivers or force vsync on as this will sufficiently throttle just about anything. If vsync is off, Unity will run as fast as it possibly can, with no waiting for GPU.
Forcing Vsync is a great idea. I haven’t tried doing that. But even that Grow Fish game was only running 60 FPS with vsync on and it was still 100%ing the CPUs. And yes, all games are in focus, I have dual monitors and I have task manager open on the second screen to monitor my CPU usage.
The games you are running are probably CPU bound, i.e. the CPU never has to wait for the GPU and so keeps running 100% of the time in order to produce the best possible framerate. If you had a worse graphics card or run more graphically intensive games, you will see lower CPU usage, because the CPU has to spend some time waiting for the GPU to catch up (and so will surrender the CPU to other processes while it waits, including the ‘system idle process’). This would also explain why you see the CPU usage change as you move between scenes in a single game.
What makes you think that 100% CPU usage is a problem in the first place? Do you want your CPU to just sit around doing nothing for some of the time?
24 cores, though. That’s a lot of CPU to be consuming. It doesn’t make sense. I would think then, in theory, if it is trying to write frames as fast as possible, it would be producing more than 60 frames per second. Which is happening inconsistently, as in one game does that, the other doesn’t.
Site note: I had a completely unrelated issue with the program Action! Gameplay Recording and in my troubleshooting, I installed an older video card driver. Right now I’m downloading the latest one. I will be SUPER happy if I was causing this issue myself with this older driver and I come back in a moment to say it is fixed. I really hope so. Because I still couldn’t get Action to work with any driver at all. Their software is not designed, or at least tested, on dual Xeon computers. I’d explain what it was specifically, but I gave up on them anyway, although their support was responsive.
I’m currently installing Unity 5.3 so I can’t install a new driver for probably 10-20 minutes so instead of waiting for me I’ll give you some screenshots I was doing just now.
I know dying light and csgo aren’t unity at all but I was intending on showing you examples of a couple dozen games, and unity games which do not have a problem at all, but once I realized this system is using a couple-versions-old driver I stopped, and I figured I might as well post those so you can see what I’m up against.
hmm… no change. it wasn’t even that old of a driver I was using so I was not expecting much but I just wanted confirmation: latest driver on radeon r9 290 4gb is installed and this bug is still as present as ever.
I just tried two games in a row Drift Streets Japan and Hooligan Fighters. Both do the 100% CPU thing. Ridiculous how many games do this now, so I’m going to install Windows 10 and hope for the best.
NO problem at all. What gives? I’m installing more on that system now. I’ll show you the side by side comparison, and trust me, it will be EXACTLY as I stated previously: there is a problem with the Unity game engine. The sooner you can believe me the sooner we can get fixing this mess.
What would be the best course of action that I could take, from a user standpoint?
The problem is not in Unity, you probably have a bad set of processor utilization, I have only two cores, and most of my games running at 35-50 fps.
In addition, most games have a limit set fps to 60 fps is the perfect speed as if they were too high fps (approximately 200fps) game would run so fast that it was absolutely unplayable.
if you want such a situation to try to get ePSXe (PlayStation1 emulator) and off fps limit, the game will run at 200-400 fps which is too fast for any game.
You mentioned program Action! If these games are recording so it is not surprising, screen recording, encoding and storing a record on disk is extremely difficult especially for the Activity of the processor. As for me I am happy that the game runs without any lag and things like CPU usage do not care at all, in your place I would be glad that your processor is not boring;)
ps. what do you need such a high performance? You could be controlled by one piece house and the neighbor’s garden:smile:
You mention… a some games have a limit cap, etc, but that doesn’t explain why a game can run at 60 fps on two computers with vsync on and on the 24 core it runs at 100% on all cores but only a little bit of activity on the slower 8 core system. Same game. There are countless examples. It’s not a frames per second thing. Like look at my vector strain ones, it was running at 300 fps and I forced it down to 60 fps and it changed nothing. Instead of high cpu usage, it’s full blown 100% all around. It’s an issue. Or at least I’d like to solve it, whatever is causing it, and any advice is helpful. But it’s not because my system is drawing frames faster than another system.
I did mention Action recording, and yes I do record. But all of these tests are done without recording them. I like to be able to encode video in realtime, which is something I have not been able to do on the 8 core. Using Action I was happy with it for a long time because it did no processing in realtime or any impact on the game’s performance. Now that I have this crazy system (finally got all the components around new years of this year, 20ish days ago), I have been trying out all kinds of different solutions. Mainly because Action does not support this computer either. They had to put in a special mode in the interface to limit the encoding to a single core and it only works in that mode (and not in windows 10 at all even in this mode). I tried various software, and found OBS-MP to be the only viable solution. It can encode H.264 in realtime and gives me virtually unlimited control over the output. Being a community-based project, they have limited support and it basically doesn’t work at all in windows 10 even on other computers I have tried, so it’s not perfect either but it’s free. Tried Xsplit last night but it doesn’t support more than one audio track. I’m sort of stuck with OBS and Win7, but at least it works.
Regardless, my problems aren’t when I’m recording. I can install Windows from scratch, put on any of the games mentioned above, and immediately have the 100% CPU usage issue without any other running software. I can’t even get 2D games to run at 30 FPS, it’s that bad. Meanwhile on the AMD system beside me is able to run them without issue. That Feed and Grow Fish game runs at like 5-10 FPS, unplayable. It’s not drawing too fast, it’s basically unable to draw at all in some cases, the complete polar opposite of a too-high framerate.
And why do I need such high performance? Why not? Let’s get as high of performance as humanly possible These CPUs retail for $6000 per pair but if you sit on eBay for months on end you can sometimes snipe out a deal. I got the pair of these for $758 and that works out to like $379 a pop. Basically the deal of the lifetime, and it’s the most modern version as well, the V4 is not even released yet. Once it comes out in the next few months, there will be a FLOOD of these server chips on eBay. It’s basically like having six i7-4770k’s in your system as it is built upon the same 22nm process and the only thing you suffer is a bit of clock speed. If you compare the prices (and consider the really bad Canadian dollar), the best thing you can get at the store for this budget is the 6-core i7-5930k. If you ever see someone go out and buy a 6-core for that sum of money, ask them why they don’t just buy the 24 core for the exact same price? It doesn’t make sense to buy anything else in the world except these magical Xeons. Plus the current motherboards have BIOS updates that supports the V4 series so 22 core (44 core if you have two), so you will always have an upgrade path that will give you virtually limitless upgrade potential. There’s even a guy on eBay right now with a pair of 18 core E5-2699 processors and the bidding is at like $300 for all 36 cores, sold in as-is condition. You could take a gamble on that and have a computer that will last you half a decade. Oh, the only problem is that if you got that beastly 36 core running, you won’t be able to play games based in the Unity engine. Ooops, that’s like >50% of all PC games.
And why, even with the power, would I need it? Well my AMD 8-core is just too slow at video encoding. If I make a 1-hour video it would take 10 hours to encode. It was ridiculous. And if I made a tiny mistake in editing, or Vegas crashed, power went out, or anything along those lines it would be ANOTHER 10 hours. Not only that, but there is a flaw in Sony Vegas right now which I’ve complained to support over where even if you have a paid legit version, and apply a certain filter, save your project, restart Vegas, the (internal) plugin would run in demo mode. The only way to fix it is to click on the plugin thing to remove it and re-add it, each time you opened that project, on EVERY clip in the project. So if you waited 10 hours for your project to finish, and Vegas crashed at the end, then you would re-open it and render it again, for another 10 hours, not realizing that Vegas was intentionally destroying your video. Once that’s done, you howl at the goddamn moon about how horrible Vegas’ support is and fix the little clips up again and wait another 10 hours for the render. All that for a single 1-hour video, the entire time your computer is entirely maxed out and unusable for anything but watching videos on youtube. I’ve never been more frustrated in my life. So I planned out the best computer I could possibly build for doing rendering. Now instead of 10 hours per 1 hour video, it’s more like… 40 minutes? The frames rendered counter just goes absolutely ballistic. Plus I can stack multiple instances of Vegas on top of each other. Using an SSD as a source drive and multiple spinning disks as output drives, I could render 4-5 videos at a time, and still play any game I want without any huge performance impact. As you saw the popular games don’t really tax the system that much, so if she’s at 80% usage all around I can still boot up GTA5 and have a go at it.
More interestingly, however, is the fact that I can encode a game I’m playing in H.264 and still render video in the background. Here, look: http://i.imgur.com/f4HIX28.png Rendering h264 in two instances of Vegas and rendering my game in h264 at the same time plus being able to play at 70+ FPS. Still have 20% of resources left. This level of freedom is incredible. I can film something, open Vegas, edit it, start rendering, minimize, and film something else, I never really have to stop because my computer is working. My productivity is skyrocketing, but I know with these videos it will take 10 years to probably get my return on investment, let alone pay for the coffee I drank while writing this.
Back on topic, though, why the heck is Unity pinning the system? Not frames per second related. It’s literally the only problem in my entire plan. My solution right now is just to have my AMD 8-core hooked up at the same time and it’s easy for me to hit the input button on my monitor to use that computer instead, but that’s not a solution I can live with. I’d prefer this fixed, and with datacenters dumping tons of these chips on the market in the next month or so, I’m not going to be alone. The cost is so low and Unity is so widely used, sooner or later you guys are going to have to fix it. I’m willing to do whatever it takes to get that done. I’ll download every demonstration scene until I find one with the flaw, and I will present it to you. Just was busy in the past couple of days.
Still would love to hear other peoples’ ideas, tips, suggestions, solutions, etc!