Does Android Studio Performance Scale Well With Number Of CPU Cores

15,880

Solution 1

I have had this question for a long time, and have just taken the jump from Intel i5-3570K @ 3.4 GHz (4-core) to AMD Ryzen 7 2700 @ 3.2 GHz(8-core). Let me share my test results.

+--------------------------------+--------------------------+---------------------------+
|                                | Intel i5-3570K @ 3.4GHz  | AMD Ryzen 7 2700 @ 3.2GHz |
|                                | (4-core) 32GB DDR3 RAM   | (8-core) 32GB DDR4 RAM    |
+--------------------------------+--------------------------+---------------------------+
| Rebuild the debug version of   | 2m 15s                   | 1m 3s                     |
| an app after cleaning it.      |                          |                           |
+--------------------------------+--------------------------+---------------------------+
| Build, copy and FTP a release  | 5m 5s                    | 4m 5s                     |
| package after the above task   |                          |                           |
+--------------------------------+--------------------------+---------------------------+

The second test is largely consumed by Proguard's minifying and obfuscation. I did all the tests within 24 hours immediately before and after upgrading the PC with new motherboard, CPU and RAM. The two drives (an SSD and an HD) stayed.

Thanks to Microsoft, Android emulators can run on AMD CPU-based PCs now. The emulators on this Ryzen 7 machine are unbelievably fast. It takes only 14 seconds to cold-boot a Marshmallow 6.0 - API 23 emulator. Starting any app is instant. I seriously doubt any physical Android devices can outperform the emulators.

I have been hoping to see a benchmark test designed for software development. Almost all benchmark tests seem to target gaming.

The two configurations: enter image description here enter image description here

Solution 2

I believe that it depends on the structure of your project, especially when it comes to compiling. Gradle's option to enable parallel builds only effects the compile time of multi-module projects. If you only have a monolithic module for your entire app, gradle will only make limited use of multiple cores, if at all.

See https://docs.gradle.org/current/userguide/multi_project_builds.html for more information on multi-project builds.

Another thing to consider when building or buying a machine for Android development: Intel chips allow you to virtualize an Intel-based image in the emulator. This produces a significant increase in speed while testing your app compared to emulating an ARM-based image or running the emulator on an AMD chip.

Solution 3

In my opinion as someone who recently built a development PC and works quite frequently and heavily on Android Studio and Intellij (which is basically Android Studio) your CPU is rarely your choke point. Rather I would say it is your amount of memory and the read/write time of your drive. Open up task manager or some other hardware monitoring gadget and run a build, you will often see CPU at 40-60%, drive read/write maxed out at 100% and that Android Studio, the emulator (if you use it) and all the Java runtime stuff eating away at your memory.

So I would say it is down to personal preference. I am confident either one will work well.

Solution 4

enter image description here

Well, that was my CPU usage after I started building the project. So I would say it does use all cores - just not all the time.

But I also feel like this is my Android Studio being weird. Not really sure.

Solution 5

Maybe a little old thread, but here is my experience with I7 4710HQ (4 cores/8 threads) and Ryzen 1600 AF @3.9 GHz: With I7 CPU load while compiling a project is at 100% most of the time and is slower than Ryzen, which loads also at 100% during compilation. So android studio and mostly gradle compiler do use all available CPU cores and threads during compilation.

Share:
15,880

Related videos on Youtube

Kamal Mrock
Author by

Kamal Mrock

Updated on June 06, 2022

Comments

  • Kamal Mrock
    Kamal Mrock almost 2 years

    for example AMD Ryzen 5 1600 has 6 (2 logical cores per physical) cores with Clockspeed: 3.2 GHz Turbo Speed: 3.6 GHz .

    In contrast, Intel Core i5-7600 has 4 cores with Clockspeed: 3.5 GHz Turbo Speed: 4.1 GHz.

    My exprience, Ryzen 1600 perform litle bit better than i5 7600 I have seen many games benchmarks where both processor are neck to neck and performace of Ryzen only imperasive in case of video rendring, encoding, file Zipping etc otherwise no where I found major difference.Even majorly I found i5 7600 performing better.

    All in all,Here are my questions....

    • Does the number of cores really matter for Android studio?
    • Does higher clock speed matter for Android studio?
    • rupps
      rupps almost 7 years
      I'd only worry about this after you have at least 64gb / 128Gb of RAM and everything on SSD. Android studio eats your memory for breakfast!
  • Mohsin Falak
    Mohsin Falak over 4 years
    How will Android Studio perform on ARM based CPUs... There are rumours that Apple will shift all their Macbooks to Apple's own SoC in 2020, I currently planning to purchase the new Macbook 16 inch. I might wait for the 2020 models if there is any chance the performance will be better... P.S. Android Studio sucks on MacOS in comparison with Linux based OS.
  • Hong
    Hong over 4 years
    @MohsinFalak I use a MacBook only for testing iOS apps, so I know nothing on that front.