Search Unity

  1. Welcome to the Unity Forums! Please take the time to read our Code of Conduct to familiarize yourself with the forum rules and how to post constructively.
  2. We have updated the language to the Editor Terms based on feedback from our employees and community. Learn more.
    Dismiss Notice

Massive CPU usage spikes due to vSync with dramatic frame dropping

Discussion in 'Android' started by Loner_Cat, Jun 22, 2022.

  1. Loner_Cat

    Loner_Cat

    Joined:
    Jul 12, 2019
    Posts:
    5
    Hello everyone. I'm developing a small mobile game and I'm facing a weird performance iusse.
    The game is light and runs well most of the times, but from time to time the FPS drops down to less than 1 fps, for a few seconds. These drops comes apparently ramdonmly. They don't seem to correlate with particularly crowded scenes or with anything else.
    Using the profiler I see that this comes with a massive spike in CPU usage by vSync; also, I can't replicate the problem on the editor.
    Now, I'm running it on the Galaxy S22, which has dynamic screen refresh rate, might it be the cause?
    I'm using Unity 2020.3.36, and vSync is set on Every V Blank, as it was by default. The game is 2D.
    I attach a screen of the profiler view. screen_profiler.png
     
  2. Loner_Cat

    Loner_Cat

    Joined:
    Jul 12, 2019
    Posts:
    5
    To add more details:
    >I tried setting vSync to Not Sync but it does have no effect; it's kind of expected as this value should be ignored on mobile devices
    >I cannot access GPU usage because of the Vulkan not supported error.