Huge Physics Spikes (In empty scene and populated scene)
Note: This is still present in Unity 5.3.5f1 64-bit Personal Edition. This is the version I was told the bug was fixed. The spikes aren't as many but are still present. If you're experiencing this problem, I recommend using Unity 5.0.2f1 (64-bit) where this doesn't happen.
Hey everyone,
I'm having a problem with development lately and it's preventing me from going any further with it. It would seem with or without anything in a scene the Profiler is reporting huge game stopping spikes under Physics and Others (majority is due to Physics). This is giving a lag effect to the game and can slow it down for a second at random intervals throughout game play.
I've turned everything off in the layer collision matrix under Physics and under 2D Physics only set to use what I need. In the scene i'm reporting these spikes, there are no rigid body. I'm simply parallax scrolling some quad textures. There are a few directional lights, only one turned on at a time, with the exception of two running for a second or two.
I have tried experimenting with the Time To Sleep property under 2D physics settings,however it isn't helping solve the problem. I've contacted customer service and been advised to reach out to the community for help.
I'm running Unity Personal Edition 5.2.3p3. Below are a few screenshots of the profiler, these are the results from the start screen as described above
Sometimes these spikes get much bigger, they're inconsistent and always present. Any help would be really really appreciated! I just want to move on and this has prevented me to do so for a few weeks now :(
These spikes are still present in a empty project in a new empty scene, see below
Does anyone know of a Unity build where this doesn't happen? I've been out of development for nearly two weeks now and it's killing me not doing anything about it.
I can't reproduce the problem. I use Unity 5.3.3f1 64bit on Win8.1 64bit. With Vsync turned off i get this with an empty scene. You really should use a different playmode tint color as we barely see anything. Also do a deep profile and see what changes. You also should select / highlight one of the spikes when doing a screenshot and expand the top item in the list below.
It might be something related to your hardware / OS version.
ps: Don't post an answer if the post doesn't answer the question.
Hi
Can you click on the spike in the editor? This will give more information in the overview, also expand the tree in the overview that has the high time(ms) associated with it.
Do your quad textures that you are using for parallax scrolling have any Collider components on them? And are you doing any non-uniform scaling on them?
Can you make the screenshots easier to see also by not dark tinting as much?
Thanks Andy
Hi,
Thank you for the help!
@Bunny83 These results are consistent with Vsync on or off, in some cases worse performance when on. In one of the screenshots you can see the deep profile is active.
@andymilsom I've clicked onto the spikes and expanded where i can thank you. Non of hem have any Collider components on them. All of the them consist of a Quad (mesh filter), $$anonymous$$esh Renderer, a material for lighting to effect it and a script.
If I can provide any more information please tell, screenshots below
and if it helps a note on my OS version and hardware,
OS: Windows 10 Pro 64bit CPU: A$$anonymous$$D Phenom II X6 1075T 3000$$anonymous$$HZ 6 CORE RA$$anonymous$$: 8GB GPU: A$$anonymous$$D Radeon HD 6700 Series -$$anonymous$$em Size: 512$$anonymous$$B -Core $$anonymous$$HZ: 700 -$$anonymous$$em $$anonymous$$HZ: 1150
Also sorry I forgot to answer, the Quads are non uniform scaled, in each of their transform components, their x scale and y scale have different values. Is this causing the poor performance then? I've just done a quick google search and it would seem non uniform scaling isn't recommended ever. There are 6 quads in the startscreen scene, each with a child for scrolling effect. So a total of 12 quads that are all non uniform scaled.
Non uniform scaling on a quad without a Collider will not affect the Physics,
When using non-uniform scaling on simple quads without a Collider, It will not be a problem.
This looks like it could be a bug, Have you tried running your project in the latest release of Unity?
Ok thanks. No I was hoping I wouldn't have too. I will update to the latest Unity release tonight and report back if the problem is solved. Thanks again
Answer by Rickywild · Apr 21, 2016 at 02:52 PM
This doesn't happen in Unity 5.0.2f1 (64-bit). I'm marking this as solved as this version of Unity can be used to continue development.
This is still present in Unity 5.3.5f1 64-bit Personal Edition. This is the version I was told the bug was fixed. The spikes aren't as many but are still present. If you're experiencing this problem, I recommend using Unity 5.0.2f1 (64-bit) where this doesn't happen.
Answer by achimmihca · Mar 28, 2016 at 03:24 PM
Since I removed NGUI from my project, I don't have any more of those spikes in Physics.Processing.
I had the same issue: First I noticed heavy stuttering randomly in simple scenes. When I checked the profiler it showed spikes at random in Physics.Processing. They needed about 33ms to 60ms (30 to 15 FPS). Even in an empty scene they appeared. Even in a new project they appeared. Only when I restarted my PC, opened Unity and created a new project they were gone. However, when I opened my project and a scene, the spikes were back. Again I restarted my PC. The only tools I used, which don't ship with Unity, were NGUI and iTween. So I created a new project and imported first iTween and then NGUI. No spikes. But after I added NGUI objects (just basics and a button) the spikes showed up. As soon as they appeared once, they also showed up in empty scenes. Now I re-created my user interface with Unity UI (works like a charm by the way) and the spikes are gone.
In conclusion: I think there is something in my NGUI version (version 2.7.0) that causes those spikes in Physics.Processing as soon as it is loaded and until it is released somehow.
Interesting, thanks for the comment. I don't use NGUI or iTween unfortunately. I have no idea why it's doing this. All my drivers are up to date I have the latest Unity installed and it's not as if there's much going off in the game. Still no solution.
Edit- I've been told this is fixed in 5.3.5 however that won't be released for a few weeks, maybe longer.
Answer by Yossarian123 · Sep 28, 2016 at 10:53 PM
I was seeing Huge Physics.Processing spikes in Unity both an empty scene and the scene for my game. I counted 3 spikes in 1 minute on the empty scene and 10 spikes in one minute on my game.
I restarted my computer and ran unity without a bunch of other programs running on my computer. It didn't solve the problem outright, but it does seem like there are fewer spikes. There was 1 Huge Physics.Processing spike in 1 minute on the empty scene and 0 Huge Physics.Processing spikes in 1 minute on my game. These spikes seem really random though and I have no idea what causes them.
Answer by FishTard3Dart · Oct 21, 2016 at 07:18 PM
I had the exact same problem.. There were physics Spikes in my Game Scene aswell in an empty scene.
FIXED by Updating to version Unity 5.4.2f2 (64-bit)
Answer by OZAV · Nov 21, 2016 at 11:12 AM
I'm suddenly also having this issue, in Unity Plus 5.4.1f1... Before these spikes, my 15 GIG large project was ruing at 70 FPS to 200 FPS (never lower). Now, i'm having these "CPU 98% overhead" (Profiler) spikes, for no apparent reason... (even simple update is now needed to shoot them, by random, and stall my game play in Editor, every now and than, for a second or two each time... My goodness... what other problems we are running into, with every new Unity Update ? (every update - something else screws up, on another corner). This is not worth (any) of my paying unity Plus money, not really, i must say it, to be honest ... (on any of computers of me or my staff, there is now this gustly issue ...).
Your answer
Follow this Question
Related Questions
How can i solve the spikes on my empty project ? 0 Answers
Bad performance with Physics.Processing and impossible to find the reason why. 1 Answer
Backround roll 0 Answers
Need help profiling first game. Huge GPU spikes? 1 Answer
UpdateScreenManagerAndInput, which takes almost cpu usage in a profiler 2 Answers