30
gitpush
7y

I don't know which should make me worry:
1. the fact a gradle build for a new project is taking 90% of CPU
2. The fact CPU Freq isn't going higher than 2.18 when it can go up to 3.1?
3. The fact gradle is always taking 5 minutes to build when it used to take 1 minute for a medium project?

Comments
  • 5
    @dfox +1 for keeping "Comment" box content on website, wanted to post a rant but couldn't due to time limit, turned off laptop went home, when wanted to post the same rant just found the content waiting for me :D
  • 7
    4. The fact that you're on Windows :trollface:

    But seriously, which version of gradle are you building with?
  • 0
    @CtrlAltElite I'm seriously thinking of moving development to my Ubuntu VM, already do React & DotNet Core (lol, dotnet core on linux but not windows)

    I'm using latest android studio 2.3.3 with its shipped gradle. The thing is it usually takes all my CPU but for one minute, but this time I was just writing unit tests and I test each function with five asserts, and if I edit a single line of code it will take 5 mins to rebuild
  • 10
    Maybe check your cooling ? That's usually the reason for a CPU to underclock at load. Good luck with it
  • 1
    Variable clock rate for a CPU? Is that a thing??
  • 1
    @gitpush do you know which task takes a long time? Because building a project will take roughly the same amount of time even if you change one line of code.
    I know Gradle 4 can work with parallel tasks. So depending on your needs, might be worth checking.
  • 1
    Is it the unit testing task that's taking the most time? We have a project at work that has ~1200 unit tests, and with maxParallelThreads set to half the number of processors, it pretty much runs every core at 100% for ~5 minutes.
  • 1
    Your maximum speed is 2.20Ghz. I dont think so they have been overclocked yet.
    Time to visit your BIOS
  • 3
    @devios1 it's quite common. When a CPU or GPU overheats, it will either keep going till it burns, or will (usually the case with above 100$ hardware) reduce clockspeed to try to stop the overheating. That's called thermal throttling.

    Also, some CPUs will do the opposite, and increase clockspeed when demand is high and temperatures allow it. It basically overclocks dynamically. That's what intel's turbo boost is, and why most of the core series show 2 frequencies.

    In this case, this is a laptop CPU (m naming, and 2.2GHz is a common baseline clock for laptops), these can usually boost up to 3.xGHz, but windows will display its baseline to clock in the settings. The fact that it doesn't go above 2.2 is suspicious.

    @gitpush Try using some specialized software to check temperatures and clockspeeds. A temperature stuck at 85-95ish would be suspicious of it's still only at 2.2. These tools are pretty easy to find, some free. Let me know if you find something out. Btw what laptop is this ?
  • 2
    For single core use your cpu will boost the core to 3ghz, however when you use all of them 2.2 will be the max.
  • 0
    @CptFox I'm suspecting it is heat issue, I went home and tried again and I can see freq reaching 2.9GHz. Better check cooling system for maintenance, its a three years old laptop and I only cleaned fan once, guess time to make some cleaning

    @devios1 I meant turbo boost and not me overclocking, if that's what you meant?

    @CtrlAltElite I honestly don't but maybe cache? Or the fact my system was heating up so frequency stuck at 2.2 so it made build time takes more than 1 minute?

    @bjenning04 I was just checking for data returned from the server to see if valid or not, I'll double check my code but doubt it is the problem

    @coldfire It has a turboboost, and in bios I don't have the option to set clock speed :\
  • 1
    @gitpush If the laptop is older than a year, I'd certainly open it up and remove dust.
  • 1
    It probably wouldn't be thermals @90% load of non-boost.

    Have you seen gradle do 100% before? It is using all 4 cores + hyperthreading. It is difficult to get the hyperthreaded cores to 100. Maybe look at the performance tab with logical breakdown for more info.

    Your 3.2GHz is with boost on 1 core or 4 cores?

    I just checked Ark and the boost you speak of is single core only. It is 2.9ghz max for 4 cores if not in power saving mode (base only).
  • 0
    @xsacha If my memory serves me well, I know that turboboost of Intel boosts only one core until the system decides it needs to use another core then freq will go down since work is divided to all active cores.
    If all four cores are working freq remains on base. so to answer your question I think Gradle is using all four cores and if heat was not the issue here, then this is the normal behavior for it though when I was back home that was not the case, it boosted as it should
  • 0
    @xsacha also to note the CPU I have in my laptop is optimized to run on min power possible, that can also be a reason why freq didn't go up (or doesn't always go up)
Add Comment