Search Unity

  1. Unity 2020.1 has been released.
    Dismiss Notice
  2. Good news ✨ We have more Unite Now videos available for you to watch on-demand! Come check them out and ask our experts any questions!
    Dismiss Notice

Massive physics CPU spikes in 5.3

Discussion in 'Physics' started by MikeUpchat, Dec 8, 2015.

  1. MikeUpchat

    MikeUpchat

    Joined:
    Sep 24, 2010
    Posts:
    929
    Just tried our 5.2 project on the newly released Unity 5.3 and I am getting horrible CPU spikes from the physics, goes from 0.34ms to 18ms every few seconds, this makes 5.3 unusable for us, is this known about? Is there a work around?

    It is very simple to reproduce here, make a scene, add a plane, add a rigidbody component and make it kinematic, then add a cube above that, again add rigid body component, turn the profiler on and play the scene, every few seconds the Physics usage goes from 0.3ms to 8.5ms. This is running on Windows 7 64 bit, target platform is PC standalone.
    unity53bug.jpg
    unity53bug1.jpg
    unity53bug2.jpg
     
    Last edited: Dec 8, 2015
  2. MikeUpchat

    MikeUpchat

    Joined:
    Sep 24, 2010
    Posts:
    929
    Can anyone at Unity help on this, it happens on every project I start with Unity 5.3 making it unusable for me, is this know about or is this just happening on my system?
     
  3. Peter77

    Peter77

    QA Jesus

    Joined:
    Jun 12, 2013
    Posts:
    5,003
    I'm also seeing physics spikes (5-14ms) every few frames in a windows standalone build. This occurs even in a (empty) scene where no physic-objects exist.

    I bug-reported this as:
    Case 753638: Physics performance in scene without physics

    The bug-report contains a project to reproduce the issue.
     
  4. MutatedSoftware

    MutatedSoftware

    Joined:
    Dec 4, 2014
    Posts:
    5
    Running into this same issue. I can't seem to find your bug report in the issue tracker so I can vote it up :(
     
  5. Peter77

    Peter77

    QA Jesus

    Joined:
    Jun 12, 2013
    Posts:
    5,003
    Unity is unable to reproduce the issue I reported as:
    Case 753638: Physics performance in scene without physics

    The bug-report does contain a project with which I'm able to reproduce the issue though. I hardly believe that they're going to spend more time looking at it.
     
  6. Peter77

    Peter77

    QA Jesus

    Joined:
    Jun 12, 2013
    Posts:
    5,003
    I'm happy to say my assumption was wrong. Unity did take another look at the issue and replied with the following text to the bug-report:
     
  7. MutatedSoftware

    MutatedSoftware

    Joined:
    Dec 4, 2014
    Posts:
    5
    Thanks for the update. I ended up finding this bug report: http://issuetracker.unity3d.com/issues/physics-spikes-on-android-cause-frame-rate-drops

    Which seems like the same issue but with an unfortunate platforms specific title. Except it doesn't have a description now...

    Anywho, seems to be a legit bug that is being worked on. I started a new project, new scene, one cube yesterday and saw the same issue in 5.2.2p3. Also this thread seems related: http://forum.unity3d.com/threads/unity-5-profiler-shows-physics-spikes-on-android-device.317396/
     
  8. snacktime

    snacktime

    Joined:
    Apr 15, 2013
    Posts:
    2,932
    Same problem here and it gets worse with larger scenes. I'm getting 100ms+ spikes on a 2000x2000 terrain with 100 kinematic rigidbodies that aren't moving.
     
  9. Stardog

    Stardog

    Joined:
    Jun 28, 2010
    Posts:
    1,539
unityunity