laitimes

Cheap pit the poor, do you want to buy a small host? Let's talk about it from the root

author:iN in

When I said J1900 yesterday, someone replied like this:

Cheap pit the poor, do you want to buy a small host? Let's talk about it from the root

"It's only 10W! And it's got four cores."

This is quite a typical result of being brainwashed by advertising. In the CPU core war, both Intel and AMD will instill a concept in users, that is, the CPU with more cores is very powerful. So much so that when many people buy a CPU, they take the number of cores as a major consideration when choosing a CPU.

In fact, this judgment must have a premise - under the premise of the same core, the more cores, the better the performance.

But what is the "core", this matter is rarely really talked to everyone.

When the CPU processes data, it actually uses gate circuits to do the simplest binary arithmetic calculations. If you don't understand this matter, we can go to see "The Three-Body Problem", Da Liu is still very clear about the operation principle of the gate circuit.

Cheap pit the poor, do you want to buy a small host? Let's talk about it from the root

The binary state of the input of the gate determines the binary state of the output depending on the type of gate circuit. The most basic operation starts with the gate circuit.

Cheap pit the poor, do you want to buy a small host? Let's talk about it from the root

This is a gate circuit of an adder, it can calculate binary addition, the schematic diagram is like this, but the schematic diagram is just the principle, the real realization of the calculation function also needs to implement this schematic into a real circuit in the circuit of the CPU.

This adder basically looks like this if you rub it by hand:

Cheap pit the poor, do you want to buy a small host? Let's talk about it from the root

By toggling the red A and B switches to set the binary number, the result of the 4-digit binary addition can be displayed on the 5 blue LEDs in the middle with on/off.

Four layers of circuit boards are stacked on top of each other, and each layer completes the function of a gate. Of course, this is an all-transistor implementation, and now, with integrated circuits, the device's four-layer board can be replaced with a Texas Instruments SN7483A quad front gate circuit. It's what it looks like below.

Cheap pit the poor, do you want to buy a small host? Let's talk about it from the root

This circuit is actually needed in the CPU circuit, such as the following ancient 8086 CPU:

Cheap pit the poor, do you want to buy a small host? Let's talk about it from the root

In the upper left corner of the picture is an Adder circuit, which occupies almost 1/20 of the area of this 8086.

CPU processing data is nothing more than two ways, the first is to use the circuit, for example, we want to calculate the result of 0101+0001, we can achieve the final output of 1010 through the adder;the other is through the algorithm, for example, we need to calculate 0010*0011, now this computer does not have a multiplication circuit, in fact, when calculating multiplication, it is to do addition, multiply as many times, so the above formula becomes (0010+0010)+0010=0110, of course, this algorithm is stupid, in fact, it can use binary shift operation 0011<<0010 = 0110, that is, one left shift.

We can see that the CPU can use a simple algorithm to achieve functions that it does not have, but the amount of computation is much larger when calculating multiplication than when simply calculating addition. If we consider the circuit design and the cost of the CPU, we can do without multiplication circuits, but if there are a lot of multiplications, then relying only on the adder to calculate the multiplication will undoubtedly slow down the performance of the CPU.

Now the question is, "Is there a multiplier?", and the answer is yes!

Cheap pit the poor, do you want to buy a small host? Let's talk about it from the root

This is a logic diagram of a 4-bit binary multiplier, which translates to a circuit diagram and looks like this:

Cheap pit the poor, do you want to buy a small host? Let's talk about it from the root

It is also a large area engraved on the back of the CPU's circuitry. When this circuit is laid into the CPU, the multiplication, which can only be calculated in n clock cycles, will be completed directly in one clock cycle like addition.

Now CPU manufacturers will face a problem - should they increase the cost to sell the CPU more expensive, so that the user can get the multiplication result in one clock cycle, or will the plutonium increase the multiplication circuit, sell it cheaper, and let the user multiply the time to calculate?

It's a dilemma, right? But the adult world doesn't make a choice, it does both, and the more expensive CPUs add multiplication circuits, which are more computationally efficient at the same frequency, and the cheaper CPUs don't do multiplication circuits, and are less efficient at the same frequency.

Seeing this, we should understand that the performance of different designs of CPUs is different, and the fundamental reason is whether there are circuits with corresponding functions. But let's be clear - a number of functions are packaged together to be called "CPU cores".

At this time, let's look at an example, CPU core A has a four-bit multiplication circuit, CPU core B only has an additive accumulation circuit.

So there is only one core A in a CPU, but there are 4 cores B in the other CPU, if you ignore the clock and transmission loss, the efficiency of the two CPUs can be regarded as the same when calculating 2*4, and if you calculate 2X8, although the latter has 4 cores, the computing efficiency is only half of the former, and then 2X16? The latter is only 1/4 of the former. In fact, the multiplicative calculation of the CPU does not have the function of parallel calculation, so the latter is actually only 1/16 of the efficiency of the former.

This example is a bit extreme, but the size and function of the circuitry within the CPU core determine the computational efficiency of the CPU itself. If you just look at a 10W 4-core CPU like J1900, these two indicators seem to be very good, but its 4-core real efficiency is actually far lower than that of a Core CPU with a more complete circuit.

To give an example:

Cheap pit the poor, do you want to buy a small host? Let's talk about it from the root

A comparison of official data was taken, the same two Intel CPUs that were launched at the end of 2013, the i5-4300 and the aforementioned J1900.

You'll find that most of the features supported by the i5 are not supported on the J1900. For example, AES – Advanced Encryption Standard. AES is also a circuit:

Cheap pit the poor, do you want to buy a small host? Let's talk about it from the root

If it is not supported, it is not, and there is no AES circuit laid on the J1900 at all. For operations such as SHA256 on a data string, the core calculation can be completed in one clock cycle on the i5, while a large number of time cycles are required on the J1900.

What does AES do? The encryption operation of a large amount of network data during transmission, and the signature operation to verify a large number of disk reads and writes actually rely on the AES function to accelerate.

CPUs are cheap and have their own reasons for low power consumption. Removing some of the circuitry is itself a way to reduce CPU power consumption and cost. This method has been tried and tested by CPU manufacturers when designing CPUs. It is precisely because of the existence of this method that there are cheap CPUs on the market such as Celeron and J1900.

However, this kind of CPU itself is used in the market segment, similar to J1900, and the main objects are industrial computers and embedded systems. Naturally weaker performance and lower power consumption are determined by the target market of this type of CPU.

On the other hand, the J1900 is not a CPU designed for complete general-purpose computing, and even if the system can be installed in it, the real performance is very stretched.

So whether to buy a small host with this kind of CPU or not? iN's advice is not to. The truth is the truth above. In fact, the temptation of 10W 4 cores does not exist, this 10W is TDP thermal design power consumption, and the real energy efficiency ratio is two different things, more complex CPUs can do 100 things on 1W power consumption, and this CPU can only do 8 things on 1W power consumption, which leads to the stage will not be more power-efficient. Low price but lower efficiency – the so-called cheap eats the poor......

However, iN itself is a lover of small hosts, and many small hosts are running at the same time. However, these small hosts are only responsible for the daily operation of some small programs, such as monitoring the network and controlling the smart home...... This operation is actually what the J1900 itself was designed for. And blindly valuing this kind of thing, cheap and low power consumption, and using them where they shouldn't be used is actually an illusion.