Search Unity

Quiet about Graphics jobs

Discussion in 'General Discussion' started by AndersMalmgren, Apr 17, 2018.

Thread Status:
Not open for further replies.
  1. AndersMalmgren

    AndersMalmgren

    Joined:
    Aug 31, 2014
    Posts:
    5,358
    So Graphics jobs was introduced as experimental long time ago. But its been very quiet about the feature from UT ever since. Its still in experimental, it still crashes the player both in DX11 and Vulkan.

    Now when 6 and soon 8 cores are the norm for gaming PCs it would be nice if we could distribute the render load over multiple cores
     
    tatoforever likes this.
  2. QFSW

    QFSW

    Joined:
    Mar 24, 2015
    Posts:
    2,906
    6 and 8 cores still definitely aren't the norm for your average gaming pc, but regardless, I share your concern about graphics jobs. Has anything changed about it in recent times?
     
  3. Tautvydas-Zilys

    Tautvydas-Zilys

    Unity Technologies

    Joined:
    Jul 25, 2013
    Posts:
    10,680
    Did you report bugs for said crashes?
     
  4. Joe-Censored

    Joe-Censored

    Joined:
    Mar 26, 2013
    Posts:
    11,847
    Clicked thread expecting to type something about using Unity Connect.... :p
     
    AndersMalmgren likes this.
  5. AndersMalmgren

    AndersMalmgren

    Joined:
    Aug 31, 2014
    Posts:
    5,358
    Even with only 4 cores 8 threads you benefit from graphics jobs. In the mainstream segment maybe 4 cores is still the norm, but VR and none casual gamers are moving toward Ryzen and Intel 8700k

    But never the less its still interesting getting this feature for anyone with more than one logical processor?
     
  6. AndersMalmgren

    AndersMalmgren

    Joined:
    Aug 31, 2014
    Posts:
    5,358
    Truth be told I don't bother with that for experimental features, I use that time to report bugs on stable features :D
    But its easy to recreate, just check the Ghraphics Jobs, build game and it will crash almost instant. I test it once every new release I upgrade to
     
  7. QFSW

    QFSW

    Joined:
    Mar 24, 2015
    Posts:
    2,906
    Oh I definitely agree that it's still very useful for 4C/8T and even 4C/4T (which I'd say IS the common gaming CPU). Maybe VR, sure, but you have to realise they are by no means the average gamer, but high end and/or a niche. I'd say mainstream and even medium core gamers will still be on 4C, most games just don't benefit from more so there isn't the incentive yet
     
    angrypenguin likes this.
  8. QFSW

    QFSW

    Joined:
    Mar 24, 2015
    Posts:
    2,906
    Odd, I use graphics jobs without crashes
     
  9. AndersMalmgren

    AndersMalmgren

    Joined:
    Aug 31, 2014
    Posts:
    5,358
    We are getting there fast though the new Ryzens are crazy cheap, and I bet the 1700x will drop now
     
  10. AndersMalmgren

    AndersMalmgren

    Joined:
    Aug 31, 2014
    Posts:
    5,358
    We use forward rendering and SteamVR, single pass rendering, soon we switch to single pass instanced when all our shader bugs are fixed (Though instanced only saves on batches and not set pass calls and for us it seems the set pass calls are by far the most expensive thing). I dont know if its a combo of those. But Im pretty sure I tried it in a vanilla project too. Maybe its becasue I'm on 16 threads? :D
     
  11. QFSW

    QFSW

    Joined:
    Mar 24, 2015
    Posts:
    2,906
    Vanilla forward rendering for me, no issues yet. The only issue I've found is that if you stop remote profiling a remote dev build it crashes
     
  12. AndersMalmgren

    AndersMalmgren

    Joined:
    Aug 31, 2014
    Posts:
    5,358
    Any performance gains?
     
  13. QFSW

    QFSW

    Joined:
    Mar 24, 2015
    Posts:
    2,906
    I think I saw a speed boost but I haven't compared in a long time, was worth turning on
     
  14. AndersMalmgren

    AndersMalmgren

    Joined:
    Aug 31, 2014
    Posts:
    5,358
    I tried with 2017.4.1 and no crash for the short time I tried, thats nice!

    But also no real perfomance gain either. I'm on a 8 core ryzen 1800x

    Here with Gfx jobs enabled, watch the CPU frame time above graph
    upload_2018-4-19_19-52-29.png

    And here without gfx job
    upload_2018-4-19_19-52-55.png

    This part of the map culls pretty bad so its many set pass calls here
     
    Lu4e likes this.
  15. AndersMalmgren

    AndersMalmgren

    Joined:
    Aug 31, 2014
    Posts:
    5,358
    Single pass instanced does not seem todo much either for performance just yet

    upload_2018-4-19_20-31-29.png
     
  16. AndersMalmgren

    AndersMalmgren

    Joined:
    Aug 31, 2014
    Posts:
    5,358
    Tested jobs a bit more, and it seems it distributes work over more cores

    upload_2018-4-28_16-8-26.png

    Right side is with Graphics jobs. Since frame rate is locked to 90 fps in SteamVR GPU usage will not change. But the frame time for teh CPU is not changed either, isn't that strange?
     
  17. Martin_H

    Martin_H

    Joined:
    Jul 11, 2015
    Posts:
    4,436
    Do you test with builds or in the editor?

    Also are you sure there isn't anything else bottlenecking your frametime on the cpu?
     
  18. AndersMalmgren

    AndersMalmgren

    Joined:
    Aug 31, 2014
    Posts:
    5,358
    Built, can't really bench in editor, SteamVR has a built in tool which calculates the time between frames both on CPU and GPU. Our domain is really thight and only adds a few fractions of a millisecond. There is no change in CPU frame time between gfx job enabled and disabled
     
    Last edited: Apr 28, 2018
    Martin_H likes this.
  19. grimunk

    grimunk

    Joined:
    Oct 3, 2014
    Posts:
    278
    https://store.steampowered.com/hwsurvey/cpus/

    4 physical cores is a big chunk of gaming rigs these days. No idea if they are hyperthreaded or not...
     
  20. QFSW

    QFSW

    Joined:
    Mar 24, 2015
    Posts:
    2,906
  21. hippocoder

    hippocoder

    Digital Ape

    Joined:
    Apr 11, 2010
    Posts:
    29,723
    You guys are all forgetting just how many PS4's and XBOnes there are out there that Unity's very well supporting. I think those have a fair few cores. Threading is high on Unity's list of priorities (possibly near the top).
     
    angrypenguin, Ryiah and QFSW like this.
  22. AndersMalmgren

    AndersMalmgren

    Joined:
    Aug 31, 2014
    Posts:
    5,358
    They probably need to perfect the syncing of the threads, my guess is that the overhead of thread syncing is too big and that's why I don't see any performance gains.

    Also maybe Vulkan works better I only tried dx11
     
  23. hippocoder

    hippocoder

    Digital Ape

    Joined:
    Apr 11, 2010
    Posts:
    29,723
    If you use profiler you can see where the work goes (the built in Unity one).
     
    Peter77 likes this.
  24. grimunk

    grimunk

    Joined:
    Oct 3, 2014
    Posts:
    278
    Technically, you don't 'sync' threads so much as you wait until all of them have finished their work. In practice this means that the program is only as fast as the slowest thread, however in most cases the gains from breaking up the processing are so high that it's easy to ensure all the required work gets done in the time budget...

    That is if you don't bury yourself in mutex locks or stuff inordinately large amounts of data on message queues...
     
  25. AndersMalmgren

    AndersMalmgren

    Joined:
    Aug 31, 2014
    Posts:
    5,358
    I revisited this today, Unity 2017.4.5

    DX11 No jobs


    DX11 with Jobs, a small performance boost it seems


    Also tried Vulkan, didnt get Jobs to nto crash so this is only without Jobs, seems Vulkan needs more work
     
    Peter77 likes this.
  26. AcidArrow

    AcidArrow

    Joined:
    May 20, 2010
    Posts:
    11,791
    It has been experimental for at least two years and it barely does anything.

    I’m not holding my breath.
     
    AndersMalmgren likes this.
  27. Peter77

    Peter77

    QA Jesus

    Joined:
    Jun 12, 2013
    Posts:
    6,618
    It hurts seeing 15 cores basically doing nothing... :eek:
     
    AndersMalmgren likes this.
  28. AndersMalmgren

    AndersMalmgren

    Joined:
    Aug 31, 2014
    Posts:
    5,358
    It would be so awesome if we could see some real performance gains from jobs, it could mean so much more fidelity for VR games
     
  29. AndersMalmgren

    AndersMalmgren

    Joined:
    Aug 31, 2014
    Posts:
    5,358
  30. AndersMalmgren

    AndersMalmgren

    Joined:
    Aug 31, 2014
    Posts:
    5,358
    Tried 2018.2.1 and Vulkan + gfx jobs. Does not crash so thats an improvement, but I get exactly the same perfomance with Vulkan with Jobs as I get DX11 with no jobs

    Vulkan with Jobs

    upload_2018-7-26_21-25-27.png

    DX11 no jobs
    upload_2018-7-26_21-25-53.png

    Edit its possibel somehow above screens are not valid and it was not built with gfx jobs and or vulkan enable for some reason, becasue now I cant get Vulkan + gfx to work
     
    Last edited: Jul 27, 2018
    Peter77 likes this.
  31. Ryiah

    Ryiah

    Joined:
    Oct 11, 2012
    Posts:
    21,190
    This. The PlayStation 4 models have eight cores. The Xbox One models have eight cores. Nintendo Switch has eight cores.

    There are at least 79 million PlayStation 4 consoles on the market.

    https://en.wikipedia.org/wiki/PlayStation_4

    There are at least 18 million Xbox One consoles on the market.

    https://en.wikipedia.org/wiki/Xbox_One#Sales

    There are at least 17 million Nintendo Switch consoles on the market.

    https://en.wikipedia.org/wiki/Nintendo_Switch

    Steam has 125 million users.

    https://store.steampowered.com/news/21534/

    With the hardware survey we know there are about 29.5 million on two cores and 90.75 million on four cores.

    https://store.steampowered.com/hwsurvey/cpus/

    Add up the Steam numbers and you get about 120 million and while that's huge it's not that many more than the number of console users. Add up the console numbers and you get about 114 million. Keep in mind that the numbers are old for both sets and that Microsoft is tight lipped with their numbers as well.
     
  32. AndersMalmgren

    AndersMalmgren

    Joined:
    Aug 31, 2014
    Posts:
    5,358
    I have a strange bug with 2018.2.1 that the game closes itself and reopens in a new process and window. The second window will not connect to the profiler, so cant profile. It might be related to Steamworks.
     
  33. hippocoder

    hippocoder

    Digital Ape

    Joined:
    Apr 11, 2010
    Posts:
    29,723
    You should post a bug report because that has nothing to do with this thread :p
     
    QFSW and Peter77 like this.
  34. AndersMalmgren

    AndersMalmgren

    Joined:
    Aug 31, 2014
    Posts:
    5,358
    Well it was more an explain why I cant supply profiler screenshots
     
  35. AndersMalmgren

    AndersMalmgren

    Joined:
    Aug 31, 2014
    Posts:
    5,358
  36. LightStriker

    LightStriker

    Joined:
    Aug 3, 2013
    Posts:
    2,717
    Currently Graphic Jobs simply freeze Unity, while keeping a full core busy.

    Tested on 2018.3.0f2, with both DX11 and Vulkan
     
  37. AndersMalmgren

    AndersMalmgren

    Joined:
    Aug 31, 2014
    Posts:
    5,358
    Its a pretty abandoned feature sadly. Which is really sad since 8 cores are now the norm and we will see mainstream 10,12 and 16 core with Zen 2 in just months

    edit: Its pretty crazy how unity pitch all these features and then just let them die
     
  38. AcidArrow

    AcidArrow

    Joined:
    May 20, 2010
    Posts:
    11,791
    No worries, it will be eventually replaced by another similar feature, which will be experimental for a few years and then will also be abandoned.

    It’s the typical Unity cycle after all.
     
  39. Peter77

    Peter77

    QA Jesus

    Joined:
    Jun 12, 2013
    Posts:
    6,618
    If you're able to reproduce this issue, could you please submit a bug-report, with an example/project to reproduce it, as described in the following document:
    https://unity3d.com/unity/qa/bug-reporting

    If there exists no bug-report for this issue in Unity Technologies database, then it's probably not on their radar, thus will never get fixed.

    After you submitted the bug-report, you receive a confirmation email with a bug-report Case number. You can post this Case number here (in this forum thread) for Unity staff to pick up, in case they see it.
     
  40. AndersMalmgren

    AndersMalmgren

    Joined:
    Aug 31, 2014
    Posts:
    5,358
    There are already a dozen reports on the matter, but sure, the more the merrier :D
    Unity really should prioritize this feature, soon 10 cores are norm
     
  41. Ryiah

    Ryiah

    Joined:
    Oct 11, 2012
    Posts:
    21,190
    Eight cores is only the "norm" because of the consoles. I wouldn't be surprised if the consoles kept their eight cores for at least one more generation though because just going from Jaguar to Matisse will provide more than enough performance.

    Plus there are far more important things to improve than core count. We need more memory (8 GB isn't that great when you consider the console itself is taking a portion of it) and we need SSDs instead of HDDs in the consoles.
     
    Last edited: Jan 9, 2019
  42. AndersMalmgren

    AndersMalmgren

    Joined:
    Aug 31, 2014
    Posts:
    5,358
    Who cares about consoles? I'm talking desktop here. With zen 2 we are pushing 16 cores in the mainstream segment.

    16 and 32 gigs are standard these days for gamers, but 8 works too.
     
  43. Ryiah

    Ryiah

    Joined:
    Oct 11, 2012
    Posts:
    21,190
    Okay, but in that case the norm is four cores with the second highest being two cores. Six and eight cores combined just barely push one-tenth of the market. It's only when you factor in the actual consoles that it becomes the norm.

    I'll concede on the 16 GB because it's practically neck and neck with 8 GB for standalone platforms, but greater than 16 GB is less than one-twentieth of the market. It's definitely not a standard.
     
    angrypenguin likes this.
  44. AndersMalmgren

    AndersMalmgren

    Joined:
    Aug 31, 2014
    Posts:
    5,358
    Not true, 6 and 8 are most common, I know because I have access to steam hardware survey. And zen 2 is around the corner with cheap 8, 10, 12 and 16 cores.
     
  45. Ryiah

    Ryiah

    Joined:
    Oct 11, 2012
    Posts:
    21,190
    angrypenguin and Peter77 like this.
  46. AndersMalmgren

    AndersMalmgren

    Joined:
    Aug 31, 2014
    Posts:
    5,358
    Yeah well, I talk about my games hardware survey which is VR. There are alot of crap on steam which is played on crap hardware. Even the poor ones on 4 cores will benefit from a working Vulkan/gfx jobs implementation though. And those that have 4 cores with hyper threading will gain even more. Good for everybody
     
    Last edited: Jan 9, 2019
    Ryiah likes this.
  47. Tautvydas-Zilys

    Tautvydas-Zilys

    Unity Technologies

    Joined:
    Jul 25, 2013
    Posts:
    10,680
    It's not abandoned. Where did you get this idea?

    Are you sure that specific issue is reported? Freezes/crashes in graphics jobs are usually exposed by particular content, and is not reproducible outside of it. That's why we ask for reports with projects attached: without them, we can't reliably reproduce and fix issues. And two issues that sound similar on paper ("graphics jobs crashes in the editor") can _easily_ be two different issues.
     
    Peter77, angrypenguin and hippocoder like this.
  48. Ryiah

    Ryiah

    Joined:
    Oct 11, 2012
    Posts:
    21,190
    Yes, I fully expected that to be the case. I just couldn't remember if you said it in this thread and I wanted to poke you until you fully clarified that point. Just keep in mind that while it may be the norm for people who have purchased your game, it won't necessarily be the norm for other audiences including other gamers into VR.

    I'm too lazy go searching too deeply for headset sales, but I'm fairly certain it's in the double digit millions between all of them and I can't imagine you've sold that many copies or you would have quit your day job a long time ago.
     
    angrypenguin likes this.
  49. AndersMalmgren

    AndersMalmgren

    Joined:
    Aug 31, 2014
    Posts:
    5,358
    Its been in preview for a very long time along with Vulkan and its never talked about from Unity. You can start by looking at this issue please

    https://issuetracker.unity3d.com/is...g-vulkan-and-openvr-and-graphics-jobs-enabled
     
  50. AndersMalmgren

    AndersMalmgren

    Joined:
    Aug 31, 2014
    Posts:
    5,358
    Well I can only speculate since I dont have data for other VR games. But a good guess is that similar none casual VR titles have about the same hardware demographic. I would also guess that triple AAA desktop games have about the same.
     
Thread Status:
Not open for further replies.