Search Unity

ECS on older computer are worse than old gameobiect system

Discussion in 'Entity Component System' started by pracalic, Jan 4, 2019.

  1. pracalic

    pracalic

    Joined:
    Oct 23, 2012
    Posts:
    14
    I have prety old laptop, but i create some games on it (it have i5-2540M 2.66 procesor and itegrated graphics HD 3000). When i test example scene TwoStic in your ECS examples the best framerate i have when i run TwoSticClassic.scene. Next some worse TwoSticHybrid and the baddies TwoSticPure. When i watch framerate from statistic Classic version is have almost 2X more fps than TwoSticPure scene.

    So performance about all talking work only on new one machines with good (not integrated) graphics cards and new one cpu?

    How works this performance in Your machines guys? This is like from media - almost 10x performance when everything is work. Or someone try sell S*** everyone?
     
  2. tertle

    tertle

    Joined:
    Jan 25, 2011
    Posts:
    3,761
    Are you running this in editor or as a build?
     
    orionburcham and Antypodish like this.
  3. pracalic

    pracalic

    Joined:
    Oct 23, 2012
    Posts:
    14
    Ok sorry i have mistake. To short try. But i don't know why the hybrid version work some better than classic and pure. The classic and pure works nearly same framerate (classic have biger frame drop in first game phase but when it stablish two version work about the same framerate). I increase player live and then write some more.
     
  4. pracalic

    pracalic

    Joined:
    Oct 23, 2012
    Posts:
    14
    Ok mybe i'm crazy or i have some hardvare problem, but when i set player live to more amount the avergae framerate it wil some about:
    for classic - something about 54 fps
    for hybrid - after some play - fps it wil under 20 fps
    for pure - something about 44 fps
     
  5. Antypodish

    Antypodish

    Joined:
    Apr 29, 2014
    Posts:
    10,780
    As @tertle said, can you build game, and test performance there?
     
  6. julian-moschuering

    julian-moschuering

    Joined:
    Apr 15, 2014
    Posts:
    529
    I don't think a build will be very different as it looks like you are GPU bound. Performance should be very similar for the three cases then. You could try reducing the game view size first.
     
  7. pracalic

    pracalic

    Joined:
    Oct 23, 2012
    Posts:
    14
    Ok i check this on other machine. And and i saw hybryd version don't free obiect they are added and added so when i will ply longer ap will crash probably. After check two classi and pure performance is better on pure - something about 20-40% beter. I think it's time to change laptop to use new unity feature (how i say before is old).

    So i sorry and Unity Team - fix hybrid example. I think we can close this topic. Thanks for helps guys.
     
  8. Antypodish

    Antypodish

    Joined:
    Apr 29, 2014
    Posts:
    10,780
    Still, spears OP didn't even try to build any of version. Which could make significant difference.
     
  9. UNDETON

    UNDETON

    Joined:
    Aug 20, 2018
    Posts:
    8
  10. Antypodish

    Antypodish

    Joined:
    Apr 29, 2014
    Posts:
    10,780
    Seams like GPU bottle neck in this case.
     
  11. Arowx

    Arowx

    Joined:
    Nov 12, 2009
    Posts:
    8,194
    Your CPU only has 2 cores and even in ECS Unity still uses one core for the main thread, so the classic version will use the main thread/core for the processing and that will leave the second core for rendering. Or it will divide the workload between the cores.

    In ECS you will be running both cores as well as rendering, so I'm guessing that the ECS Jobs are slowing down your game by using up more of both cores. On >2 core systems the ECS jobs will be spread over more cores so their impact will be reduced.

    It would be interesting to see the CPU charts for these three examples... If my hypothesis is right you should see one core maxed out in ECS and less so in classic and hybrid.
     
  12. Joachim_Ante

    Joachim_Ante

    Unity Technologies

    Joined:
    Mar 16, 2005
    Posts:
    5,203
    Thats not how it works. If only one core is available to do work, all jobs will run on one core.
     
    xVergilx likes this.
  13. Arowx

    Arowx

    Joined:
    Nov 12, 2009
    Posts:
    8,194
    So in a two or more core scenario is the first main core not allowed to run ECS Jobs or only Unity Jobs?

    This definitly looks like a core workload balancing or scheduling issue?

    Look at the above CPU graphs the classic is steadier the ECS seems a lot more thrashy (jagged peaks).
     
    Last edited: Jan 16, 2019
  14. Soaryn

    Soaryn

    Joined:
    Apr 17, 2015
    Posts:
    328
    My assumption, is the fact that the "Graphics card" is the integrated graphics which is just part of the CPU. Notice where your peaks are in relation to each other. So you are running something that is GPU bound on the CPU still.
     
  15. tertle

    tertle

    Joined:
    Jan 25, 2011
    Posts:
    3,761
    What am I missing here? Are you guys basing all these assumptions off the GPU graph?

    Because I'm pretty sure the trough is just when the application is not running.
    Notice how the GPU memory is low during the same period, this would not drop when tabbing out or losing priority.
    The classic screenshot was just run for a lot longer before a screenshot was taken.

    As far as I can tell, when the app is actually running, at the very least in its current state, all 4 screenshots show 100% gpu usage and minimal, 10-30% cpu utilization.

    -edit-

    there's something a little strange going on here. have you made modifications?
    the ecs with jobs is meant to spawn 26000 ships, not 2k.
     
    Last edited: Jan 16, 2019
  16. NoDumbQuestion

    NoDumbQuestion

    Joined:
    Nov 10, 2017
    Posts:
    186
    For integrated graphic card on PC, try disable/enable GPU instancing inside mesh material of ship prefab. Because your PC,no graphic card, might not work well with GPU instancing which might increase CPU usage for Renderer.
     
  17. I think the HD 3000 does not support GPU Instancing at all.
    According to this (under the "Intel® Core™ Processors" label) it is supporting DirectX 10.1 and for GPU Instancing we need at least DirectX 11 according to the manual.
     
  18. tertle

    tertle

    Joined:
    Jan 25, 2011
    Posts:
    3,761
    The hd 510 posted half way down this thread is more confusing to me as it supports dx12.
     
  19. I may be wrong. Intel's page may be wrong. :) Unfortunately I don't have it to try out. And since it's Intel-magic, maybe with newer drivers support dx12? Honestly I'm not really familiar with these GPU-imitations (I have a 630 built into my laptop, but I don't use it, the GTX1080 is good enough for everything).
     
  20. tertle

    tertle

    Joined:
    Jan 25, 2011
    Posts:
    3,761
    Antypodish and Lurking-Ninja like this.