Search Unity

More camera takes more cpu usage on Linux

Discussion in 'Linux' started by pancymon, May 16, 2019.

  1. pancymon

    pancymon

    Joined:
    Jul 9, 2017
    Posts:
    2
    I'm making an application with Unity 2018.3.6f1 on ubuntu 16.04 and opengl 4.5

    I used to have one camera in my scene, and the built player takes about 50% of cpu, as shown in top, which is fine. Then one day, I added six more cameras to my scene for the purpose of a new feature. The problem is that, with these cameras added, the cpu usage is over 300% now.

    I tried running the built player with -force-gfx-direct, it would reduce the cpu usage from 300% to 200%. I still wanted that 50% cpu usage though.

    I've done some experiments and it looks like the cpu usage increases with every extra camera. I would expect -force-gfx-direct to force the player to be strictly single threaded, so that cpu usage goes below 100%.

    Could you please explain to me, why the cpu usage increases with each extra camera?
    And why with -force-gfx-direct, it's still multithreaded, like 200% cpu usage?
    With my curent settings of six cameras, is it possible to force the player to run in one thread, i.e. below 100% cpu usage, or I have to figure out a way to work with only one camera?

    Your help would be greatly appreciated. Thanks in advance!