📜 ⬆️ ⬇️

Why was everything so slow ?! We select iron for development on Unity

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



"In short, which is better?"


The most impatient can immediately squander to the end)

When is Unity tupit?



')
There are several operations that take a long time to complete when working with Unity. Usually in such cases I go to tea or play with a cat. Sometimes you even manage to pass a couple of lessons in Duolingo.

  1. Processing project files. Unity counts the hashes of all files in a project, creates meta-files and builds its own library (Library folder). Especially long Unity processes sound files. Nobody stores the library in the version control system, so if you have not synchronized a project for a long time, you will have 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. Baking the light (baking). It all depends on the complexity of the lighting. I make mobile games, so I almost never use baking.
  3. Build the project. It depends on the chosen platform and the project itself. WebGL can even gather for ages (sometimes you can really grow old and you can grow a beard). 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 process technology). The frequency is 3.30 GHz (3.70 GHz with Turbo Boost), 4 cores and 4 streams, 6 Mb cache. Nothing special if it were not for the adequate price tag and the prefix K. On a good mobo (I have a p67 chipset) it chases like a devil (all Sandy Bridge have solder on the cover). He has worked for me for 7 years at a frequency of 4.7 Ghz. In the yard in 2018, and this processor is still considered the best in the budget segment, it costs about 5,000 rubles at the flea market. In general, I do not feel any particular inconvenience in the development, such a processor is enough. Why not i7? Yes, because it costs twice as much, and I don’t disregard it)

Video card


The video card itself does not matter for development. You will need it only for running and testing projects. If you are making a game for a PC with a “cool grafon”, it is worth spending money on a good video card. Since I am making mobile games, I have no need to run to the store for the GTX 1080 (which the miners probably already bought). So I decided to leave my old GTX 460. Nevertheless, I will test with two video cards.

CPU selection


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


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

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

Core i7 is a stone for boyars, twice the size of i5. Do I need hyper threading for that kind of money? According to various benchmarks, Hyper Threading provides performance gains up to 30%.

Ryzen 5 and Ryzen 7 are new 6-core and 8-core processors. The cores are larger than those of Intel, but the frequencies are smaller.

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

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

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

Alas, I do not have the opportunity to buy all these processors to conduct an experiment. But at hand there is an i5 2500K and a server-side Xeon E5 1660 with six cores (we will consider it as an “analog” of the Ryzen 5, since they are very close in benchmarks). It is quite enough to determine what is best for developing on Unity.

So, we will test:


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

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



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

Test stand



Test method


Methodology can be called a stretch. Take a stopwatch and run the following operations:


Download Windows 10



Since the OS boot is for the most part just copying files from the SSD into RAM, the system loads in both cases very quickly (tea does not have time to brew). The difference of a few seconds can be written off at the time of switching on the motherboards (different sockets, different BIOS).

Recreating a Remote Library Folder


Remote folder is not the one that is far away. I simply delete it so that Unity performs a re-import of the project (we don’t trust the Reimport functions).

The first to fight is i5 2500K:



The result is 5:43. The processor works almost all the time at a maximum frequency of 4700 Mhz, but it does not load at 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 do these results indicate? 5 minutes in both cases is quite long. i5 2500K does not reset the maximum frequency, but it is not loaded at 100%. 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 assume that the first is not enough threads, and the second frequency, so both processors show the same bad result.

Building a project for Android


I5 2500K again starts:



The result is 2:50. It works at the maximum frequency, and the loading of cores at times reaches 100%. If there were more, the result would be improved.

Then the E5 1600:



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

Conclusions can be made absolutely the same as in the previous test. In addition, i5 rested against its ceiling.

We will change the video card


Until now, the GTX 460 worked. In this test, I will replace it with the GT 210. Who does not know, this is the bottom among the video cards. Worse it can only be her absence.

Import project for E5 1660:



The result is 5:38. As expected, the speed of the operation has not changed (we will write off the difference by inaccuracy and third-party factors, for example, the operation of Windows).

RAM


I have 12 Gb of 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 comfortable development, you need a high processor clock frequency and a large number of threads. 4 threads on Intel i5 processors are not enough. Based on the budget, you can consider the 4-core i7 7700K, which gamers like very much or the 6-core i5 8600K, both cost around $ 250-300. If you have money, then you can take a 6-core i7 8700K, which costs under $ 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 vs. 5 Ghz for Intel (overclocking, of course). The use of outdated Sandy Bridge + platforms, be it i5, i7 or server-side Xeon 16XX and 26XX, makes sense only with a limited budget.

2. You do not necessarily need the coolest video card. Especially if you make mobile games. So leave the top video card miners. I have chosen to replace my GTX 460 GTX 1050 for $ 130, so that Dark Souls 2 will pass once more.

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

Source: https://habr.com/ru/post/347082/


All Articles