Why has everything become so slow ?! Choosing hardware for development on Unity

    Hello! I make games and assets on Unity. Novice developers sometimes ask me where to start and how powerful a computer they will need. Personally, my hardware is pretty old. And to speed up the development, I finally decided to upgrade my computer. Since the distant 2011, the heart of my PC is the Intel Core i5 2500K processor, but it’s time to retire it. But which is better - high clock speed or the presence of a large number of cores? Is it necessary to buy an expensive processor, or will it save? What kind of graphics card is needed for development? We will understand under the cut!



    “In short, which is better?”


    The most impatient can immediately skip to the end)

    When is Unity stupid?




    There are several operations that take a lot of time to work with Unity. Usually in such cases I go to tea or play with the cat. Sometimes I even manage to complete a couple of lessons at Duolingo.

    1. Processing project files. Unity calculates the hashes of all files in the project, creates meta files and builds its own library (Library folder). Unity takes especially long to process audio files. Nobody stores the library in the version control system, so if you have not synchronized the project for a long time, you will find a couple of minutes of waiting. In addition, if you change the platform, for example from Android to iOS, this process will have to be repeated.
    2. Roasting of light (baking). It all depends on the complexity of the lighting. I make mobile games, so I practically do not use baking.
    3. Assembly of the project. It largely depends on the chosen platform and the project itself. WebGL can generally be collected for ages (sometimes you can really grow old and even a beard grows). I mean getting the finished game, not compiling the source code (which happens almost instantly).

    A few words about my 2500K


    Intel Core i5 2500K was released in 2011 and belongs to the Sandy Bridge line (32 nanometer manufacturing process). Frequency 3.30 GHz (3.70 GHz with Turbo Boost), 4 cores and 4 threads, 6 Mb cache. Nothing special, if not for the adequate price tag and prefix K. On a good mobo (I have the p67 chipset) it drives like hell (all have Sandy Bridge solder under the lid). He worked for me for 7 years at a frequency of 4.7 Ghz. It's 2018, and this processor is still considered the best in the budget segment, at a flea market it costs about 5,000 rubles. In general, I don’t feel any particular inconvenience during the development, such a processor is enough. Why not i7? Yes, because it costs twice as much, but I don’t scoop a deny)

    Video card


    The video card does not matter for development directly. You will need it only for launching and testing projects. If you are making a PC game with a “cool grafon”, you should invest in a good graphics card. Since I make mobile games, I have no need to run to the store for the GTX 1080 (which the miners have probably already bought up). So I decided to leave my old GTX 460. However, I will conduct a test with two video cards.

    CPU choice


    With the release of Ryzen AMD returned to the processor market. Therefore, the choice will be between:

    • Intel Core i5
    • Intel Core i7
    • Ryzen 5
    • Ryzen 7
    • Xeon multi-core server processors of past generations (because they are inexpensive)

    Everything below i5, as well as old AMD processors, I will not consider (despite all the jokes about indie developers and doshiraki).

    The latest Core i5 is the logical replacement for my i5 2500K. Over these 7 years, Intel, having no competition and following its concept of "Tik-Tak-Tak", pumped its processors by an average of 50%. Therefore, even if, after buying a new processor, Unity will stupid one and a half times less, I will be satisfied.

    Core i7 - a stone for boyars, costs twice as much as i5. Do I need Hyper Threading for the money? According to various benchmarks, Hyper Threading provides a performance increase of up to 30%.

    Ryzen 5 and Ryzen 7 are the new 6-core and 8-core processors. More cores than Intel, but fewer frequencies.

    Xeon server processors of the 16XX and 26XX series have from 6 to 10 cores (E5 2680 V2). Decommissioned from Chinese servers, they are sold on AliExpress at a price of $ 100-150, so it's worth considering. Especially if you are on a budget. Of the minuses - you have to buy a Chinese motherboard for $ 100 and a powerful cooler. Of the benefits - cheap server DDR3 (register).

    After the release of Ryzen, Intel quickly adjusted its business plan and released six-core processors. If you need a processor for games, then you need to definitely choose Intel. In most gaming tests, even 4-core Intel processors, such as the i7 7700K, are better than Ryzen. In addition, they are chased up to 5 Ghz even with air cooling.

    But I have another case - I make games, not play them. Will my coffee break be half as long with 8 cores?

    Alas, I have no way to buy all these processors in order to conduct an experiment. But at hand there is an i5 2500K and a server Xeon E5 1660 with six cores (we will consider it an “analogue” of Ryzen 5, because by benchmarks they are very close). It is enough to determine what is best for development on Unity.

    So, we will test:

    • overclocked i5 2500K (4C / 4T) ~ 80 $
    • a little overclocked (you won’t especially accelerate on huanan) E5 1660 (6C / 12T) ~ 130 $

    I note that the maximum multiplier of 42/42/42/42/42/0/0 was put on the E5 1660. This means that when loading more than 4 cores, the frequency will decrease to the base value of 3600 Mhz (although it is driven up to 4800 on branded boards). The i5 2500K can operate at a maximum frequency of 4700 Mhz under any load.

    For comparison, the benchmark results of these processors and newer ones considered for purchase (all in overclocking):



    Thus, choosing a new processor, you can use this data to estimate the gain in speed.

    Test stand


    • Freshly installed Windows 10 (not cluttered with junk)
    • Cheapest Chinese SSD
    • GT 210 and GTX 460 Graphics Cards
    • Project Tap Tap Builder (mobile game for Android and iOS), the total size of assets is about 500 Mb

    Test method


    This technique can be called a stretch. We take a stopwatch and start the following operations:

    • loading Windows 10 (from the moment the unit is turned on until the desktop appears)
    • Re-creation of the deleted Library folder (from the moment the project is opened until the editor window appears)
    • Build the game for Android (from the moment you press the Build button until the APK appears)
    • In parallel, we will look at the CPU load in AIDA64.

    Download Windows 10


    • E5 1660 boots the system in 21 seconds
    • i5 2500K boots system in 26 seconds

    Since loading the OS is for the most part just copying files from the SSD to RAM, the system boots in both cases very quickly (it does not have time to brew tea). The difference in a few seconds can be attributed to the time the motherboard was turned on (different sockets, different BIOS).

    Re-creating the deleted Library folder


    A remote folder is not one that is far away. I just delete it so that Unity will re-import the project (we don’t trust the Reimport functions).

    The i5 2500K is the first to enter the battle:



    Result 5:43. The processor works almost all the time at a maximum frequency of 4700 Mhz, but it does not load 100%.

    Then turn E5 1660:



    Result 5:53. The processor works without straining, and the frequency only occasionally reaches a maximum of 4200 Mhz. The average processor load is about 12%.

    What are these results talking about? 5 minutes in both cases is quite a long time. The i5 2500K does not reset the maximum frequency, but is not 100% loaded. E5 1660 tries to use all the cores, and therefore reduces the frequency to 3600 Mhz (but the average load is very low).

    It remains to be assumed that the first is not enough threads, and the second frequency, so both processors show an equally bad result.

    Build a project for Android


    The i5 2500K starts again:



    The result is 2:50. It works at the maximum frequency, and at times the core load reaches 100%. If there were more of them, the result would have improved.

    Then E5 1600:



    Result 2:50, absolutely the same! The frequency is still the same - 3600 Mhz, but the core load never reaches 100%. Although the load is definitely higher than when importing the project.

    The conclusions can be made exactly the same as in the previous test. In addition, i5 rested on its ceiling.

    Change the graphics card


    So far, the GTX 460 has worked. In this test, I will replace it with the GT 210. Who does not know, this is the bottom of the video card. Worse than her can only be her absence.

    Import Project for E5 1660:



    Result 5:38. As expected, the speed of the operation has not changed (the difference is attributed to the error and external factors, for example, the operation of Windows).

    RAM


    I have 12 Gb RAM, and its use when working with Unity does not exceed 50%. Thus, 8 Gb RAM is enough for development on Unity. And in parallel, you can still run Photoshop and YouTube.

    findings


    1. For a comfortable development, you need both a high processor clock speed and a large number of threads. 4 threads for Intel i5 processors is clearly not enough. Based on the budget, you can consider the 4-core i7 7700K, which gamers really like or the 6-core i5 8600K, both cost around $ 250-300. If you have money, then you can take the 6-core i7 8700K, which costs $ 400. Ryzen 5 1600X and Ryzen 7 1800X can be an adequate alternative for less money, although they will lose Intel at the maximum frequency - 4 Ghz versus 5 Ghz from Intel (in overclocking, of course). Using legacy Sandy Bridge + platforms, whether i5, i7 or server-side Xeon 16XX and 26XX, makes sense only with a limited budget.

    2. You do not necessarily need the coolest graphics card. Especially if you make mobile games. So leave the top video cards to the miners. To replace my GTX 460, I chose a GTX 1050 for $ 130 so that Dark Souls 2 will go through one more time.

    3. In addition, I recommend using SSD, because Unity is actively working with files. If you are limited on a budget, you can even take the cheapest SSD with 8 or 16 Gb to store the project on it, as well as install Unity and all the necessary SDKs there.

    Also popular now: