Search Unity

  1. Check out the Unite LA keynote for updates on the Visual Effect Editor, the FPS Sample, ECS, Unity for Film and more! Watch it now!
    Dismiss Notice
  2. The Unity Pro & Visual Studio Professional Bundle gives you the tools you need to develop faster & collaborate more efficiently. Learn more.
    Dismiss Notice
  3. Improved Prefab workflow (includes Nested Prefabs!), 2D isometric Tilemap and more! Get the 2018.3 Beta now.
    Dismiss Notice
  4. Improve your Unity skills with a certified instructor in a private, interactive classroom. Watch the overview now.
    Dismiss Notice
  5. Want to see the most recent patch releases? Take a peek at the patch release page.
    Dismiss Notice

Build Optimization

Discussion in 'General Discussion' started by elex17, Nov 2, 2018.

  1. elex17

    elex17

    Joined:
    Oct 8, 2018
    Posts:
    7
    Hey,

    I'm discovering Unity and I just had a problem!
    I created a scene composed of a terrain, a WindForce and vegetation (Tree and grass).

    upload_2018-11-2_18-33-1.png
    upload_2018-11-2_18-33-54.png

    When I start the game in the editor, my gpu goes up to 60-70°C. (Instead of 50-60 usually in non-play mode).
    upload_2018-11-2_18-37-41.png

    But when I launch the build, my GPU gets very hot like 85-95°C even with "Very Low Graphics Quality".
    upload_2018-11-2_18-45-2.png

    I have already tried to reduce the display distance of the grass, the quality of the mesh of trees etc.....
    Is there a way to optimize this build?

    Thanks in advance !
     
  2. Joe-Censored

    Joe-Censored

    Joined:
    Mar 26, 2013
    Posts:
    3,817
    Your GPU overheating isn't a problem with Unity, it is a hardware problem with your computer.

    When running your Unity game, by default it will run at whatever frame rate your computer hardware will allow. If that causes your GPU to overheat then you likely have a problem with the fan(s) on your video card. Making your scene more simple will just result in a higher frame rate, so may not actually result in less work for your GPU. You could try working around your issue for now by forcing a lower frame rate, see the below link.

    https://docs.unity3d.com/ScriptReference/Application-targetFrameRate.html
     
    elex17 likes this.
  3. elex17

    elex17

    Joined:
    Oct 8, 2018
    Posts:
    7
    Thanks Joe-Censored for your answer,

    Damn it, I made a mistake, it's my CPU that's heating up (my GPU is at a constant temperature arround 40°C).
    I'm on a new laptop, two months old so I think there is no problem with my fan ^^.

    I am going to study your link which seems interesting

    But why does my PC heat up more on build than in the editor ?
     
  4. dadude123

    dadude123

    Joined:
    Feb 26, 2014
    Posts:
    691
    Maybe your settings specify that the build game has no fps restriction, while the Editor waits for VSync or has an fps limit.
     
    angrypenguin and elex17 like this.
  5. elex17

    elex17

    Joined:
    Oct 8, 2018
    Posts:
    7
    So it's a fps-VSync problem ...
    I will set up that settings on my build and see what going on, thanks ;)
     
  6. Ryiah

    Ryiah

    Joined:
    Oct 11, 2012
    Posts:
    12,427
    Who is the manufacturer and what's the model number? While it's definitely a hot temperature it's worth noting that modern hardware will throttle in the event that the temperatures become too high. If it's running for extended periods of time at that temp it's entirely possible it's a normal temp for that laptop under heavy load.
     
    Joe-Censored likes this.
  7. Joe-Censored

    Joe-Censored

    Joined:
    Mar 26, 2013
    Posts:
    3,817
    Everything I mentioned would apply to an overheating CPU the same as an overheating GPU, since each frame creates work for both.

    Absolutely correct. Depending on the CPU, this may be a completely normal temperature under high load. With a modern laptop you should expect the fan to kick up to maximum under high temp, and throttling of the CPU to a slower speed as the thermal controls determine necessary. (well, unless you've disabled that, which is often possible through a BIOS setting or a setting in the control panel)
     
  8. LurkingNinjaDev

    LurkingNinjaDev

    Joined:
    Jan 20, 2015
    Posts:
    1,172
    86 Celsius in a 3D application generally in a laptop is on the cold side. Come back when you reached the 100. ;)
     
  9. Murgilod

    Murgilod

    Joined:
    Nov 12, 2013
    Posts:
    3,934
    I've had CPUs that would shut off if they ever went above 85c.
     
  10. LurkingNinjaDev

    LurkingNinjaDev

    Joined:
    Jan 20, 2015
    Posts:
    1,172
    Pentium 4? :D In exchange the AMDs in those times were just baked themselves into the motherboard...
     
  11. Murgilod

    Murgilod

    Joined:
    Nov 12, 2013
    Posts:
    3,934
    Q6600. Case ventilation was so bad I had to take the side off and open a window if I wanted to get things done.
     
    Ryiah and LurkingNinjaDev like this.
  12. Joe-Censored

    Joe-Censored

    Joined:
    Mar 26, 2013
    Posts:
    3,817
    Yeah it all depends on the CPU. I used to work in QA on the platform team of a network appliance company. One of the fun tests I would have to perform was testing our software overheat detection, and hardware's auto shutoff functionality. A lot of fun with maxing the CPU with a repetitive task while disabling fans and blasting the CPU heat sink with a heat gun, while monitoring for our various software warnings, CPU temperature, how many degrees away from max temperature the CPU said it was (PECI temp value), and what would happen when I pushed it above that.

    I found it very interesting that not only did different CPU models from the same manufacturer often have very different temperature tolerances, but even different revisions of the same CPU model could have a 10+ degree C difference in what temp it could handle.
     
  13. Antypodish

    Antypodish

    Joined:
    Apr 29, 2014
    Posts:
    1,940
    86 become dangerous for silicon based hardware. Should be avoided.

    Hence this is typical the case.
    Probably similar for GPU, if run too long, close to range.
     
  14. Antypodish

    Antypodish

    Joined:
    Apr 29, 2014
    Posts:
    1,940
    @elex17, are you keeping your laptop by any chance on flat surface, bed, or laps?
    Chances are, you are blocking vents.

    Also, do you run build, while Unity is open?
     
  15. Ryiah

    Ryiah

    Joined:
    Oct 11, 2012
    Posts:
    12,427
    Antypodish likes this.
  16. Antypodish

    Antypodish

    Joined:
    Apr 29, 2014
    Posts:
    1,940
    Interesting article with conducted comparison exercises.
    I do wonder however, how i9-9900K would be affected, by long exposure to hitting (85+ deg) / cooling (20deg).
    Customers with deep pocket, would perhaps care less. But I like personally long living hardware.
     
  17. elex17

    elex17

    Joined:
    Oct 8, 2018
    Posts:
    7
    I have a 2month old Acer Predator Helios 300 : i5-8300H
     
  18. GoesTo11

    GoesTo11

    Joined:
    Jul 22, 2014
    Posts:
    513
    According to Dell/Alienware running in the 90s is perfectly fine.
     
    elex17 likes this.
  19. Murgilod

    Murgilod

    Joined:
    Nov 12, 2013
    Posts:
    3,934
    I mean, they're not wrong.

     
  20. Antypodish

    Antypodish

    Joined:
    Apr 29, 2014
    Posts:
    1,940
    Please provide link to such statement.
    While some cpu / gpus can operate safely at 90, this is not true for every device.

    For example you probably will not find Intel official CPU temperature ranges.
    You are likely need dig in toms hardware benchmarking pages, or similar.

    Found just some older example comparison. But don't take me for a word. Don't know how accurate these are.
    http://www.buildcomputers.net/cpu-temperature.html

    Either way, continuous and over long time rapid cooling and hitting up, leads to micro cracking in metallic structures of chips. May be leading eventually to breaking connections and causing data errors. While chips are quite robust in general, and can deal with high range of errors, there is definite some limit. Also, chips performance is changing with temperature change.

    While you may be completely ok today with 90 deg C playing, not necessary may be true in 6, or 12 months time, if continue of abusing device.
     
  21. Ryiah

    Ryiah

    Joined:
    Oct 11, 2012
    Posts:
    12,427
    https://www.intel.com/content/www/us/en/support/articles/000005597/processors.html
    I always thought Tjunction Max was the temperature the processor failed at, but Intel is saying it's the temperature where they start throttling which implies to me that the processor can go a bit higher than that. I'm guessing 5 to 10 C at least which would make 90 C much more reasonable as a safe temp.

    While I wouldn't want to run the chip at that temperature I'm doubtful it's "abusing" the processor and I wouldn't expect it to suddenly perform far worse a year from now. I simply can't imagine Intel would design a chip with that problem and then provide the warranty that they do.

    Edit: Plus we need to remember that they expect their shoddy low grade HSF to be sufficient cooling for their processors at stock speeds. Just about every budget HSF (eg Hyper 212 EVO) on the market completely stomps it. If high temps were truly a massive problem we wouldn't be given a junk cooler.
     
    Last edited: Nov 11, 2018 at 9:19 AM
    Antypodish likes this.
  22. Antypodish

    Antypodish

    Joined:
    Apr 29, 2014
    Posts:
    1,940
    So lets have a quick look.

    I picked up much random (some will argue about random ;) ) 3 proc, of 3 generations.
    All have same Tjunction 100°C (Junction Temperature is the maximum temperature allowed at the processor die.)
    But that not specifies typical operational range.
    In any case, 90 deg C oven will be pretty much very close to the throttle limit. Which I still think, for some processors this limit may be even lower.

    And following same Intel link from @Ryiah
    9th gen
    Intel® Core™ i9-9900K Processor
    https://ark.intel.com/products/186605/Intel-Core-i9-9900K-Processor-16M-Cache-up-to-5-00-GHz-
    TJUNCTION 100°C (Junction Temperature is the maximum temperature allowed at the processor die.)

    8th gen
    Intel® Core™ i7-8700T Processor
    https://ark.intel.com/products/129948/Intel-Core-i7-8700T-Processor-12M-Cache-up-to-4-00-GHz-
    TJUNCTION max 100°C (Junction Temperature is the maximum temperature allowed at the processor die.)

    7th gen
    Intel® Core™ i5-7600 Processor
    https://ark.intel.com/products/97150/Intel-Core-i5-7600-Processor-6M-Cache-up-to-4-10-GHz-
    TJUNCTION max 100°C (Junction Temperature is the maximum temperature allowed at the processor die.)
     
  23. Ryiah

    Ryiah

    Joined:
    Oct 11, 2012
    Posts:
    12,427
    Yes, the maximum temperature "allowed". It's important to pay attention to that word because it completely changes the meaning of that sentence. If something is "allowed" it means permission has been given.

    Intel's processors, at least the ones you've provided examples of, are permitted to go up to 100 C. At that point throttling will start happening and slowly reduce processor performance (and voltage) to prevent it from going any higher.

    Like I mentioned I can't imagine Intel would design a chip with a high thermal throttle limit and then tell you that you're not allowed to go near it. No, I think the actual limit (and it likely varies by batch with 100 C being the highest guaranteed for all chips in that model and family) is a bit higher than that and this is just the safety limit.
     
    Last edited: Nov 11, 2018 at 9:37 AM
  24. Antypodish

    Antypodish

    Joined:
    Apr 29, 2014
    Posts:
    1,940
    That is true.
    Is not that chips will fall apart at 100 or 120 or even 150.

    But lets look at typical solder iron based connections. If solder iron start melts near 180 deg Celsius, that getting any close to that range, means potentially softening connections. Which is obviously no good. But 100 threshold to 180 deg is still quite a far apart.
     
  25. LurkingNinjaDev

    LurkingNinjaDev

    Joined:
    Jan 20, 2015
    Posts:
    1,172
    Yes, and if the TJunction temperature is 100 C, at the connections it's more likely considerably lower. So I don't see the problem here.
    Intel typically shuts down around (a little bit above 100C). The 90-ies are working conditions.

    It's important to note that above 80C, the CPU's lifespan will degrade over time, so you don't want to use your CPU above 90 for an extended period, unless you're planning to replace it after a couple of years.

    Oh wait, you typically do, so whatever. As I said in my first post: in (especially in high performance) laptops the 86 Celsius is not uncommon under load.
     
    Ryiah likes this.
  26. GoesTo11

    GoesTo11

    Joined:
    Jul 22, 2014
    Posts:
    513
    I don't have a link besides what Ryiah posted. It was from personal communication with Dell/Alienware support when a 15R3 laptop I bought was running at 99 degrees with stress testing. I didn't keep the laptop.
     
  27. Antypodish

    Antypodish

    Joined:
    Apr 29, 2014
    Posts:
    1,940
    Thats fine. I think we have concluded anyway.
    As for with Dell conversation, for me is nothing more than them trying sell / marketing.
    Providing that wasn't a gaming laptop good you get rid off these 99's. ;)
     
  28. NSdesignGames

    NSdesignGames

    Joined:
    Dec 29, 2010
    Posts:
    488
    @elex17 Can you post the stats table from the play mode?
    It look like this:
    Make sure the Camera is pointed directly at the level (not at the sky) when taking a screenshot