Single-core vs Multi-core Performance and Efficiency

Video Statistics and Information

Video
Captions Word Cloud
Reddit Comments

he is talking about ARM based cpu's mostly in this video, but the notion is the same - a single core running at 5GHz is no better than multiple cores running at 3.5GHz because this one core will be choked, and a good programmer these days will take advantage of multiple core CPU's, userbenchmark doesnt seem to think so

👍︎︎ 7 👤︎︎ u/wolfcr0wn 📅︎︎ Jan 13 2020 🗫︎ replies

Is there similar material more oriented to gaming?

👍︎︎ 1 👤︎︎ u/Rhosta 📅︎︎ Jan 14 2020 🗫︎ replies
Captions
hello my name's Gary Sims and this is Gary explained that the question before today is is would you rather have a processor with one core running at 3 gigahertz or a processor with 2 calls but only running at 1.5 gigahertz which want to find out more please let me explain ok before we dive into this subject a bit of background information I have a video on multitasking multi threading and multi processing which really is key that you watch that to understand some of the things I'm going to mention in this video and I'll link to it up here and in the description below and I also have a video on instructions per clock per clock cycle which will is good background information for this whole subject so again link up here and in the description below ok so let's get started by going back to the very beginning well not the very beginning but the beginning of the century so Turner said I love saying that Topher said you 20 years ago we had the race to the first one gigahertz PC I remember getting my 1 gigahertz AMD and it was a single core processor running at 1 gigahertz and this really was a great barrier a real milestone that we were all so keen to reach and it was for the day a very very fast PC now we move forward a few years and then we start to get dual-core processors so we had kind of like the dual core AMD there was a dual core Intel Pentium DS and they went out right we've now got about 2 2.4 gigahertz that kind of thing what's happening so we see now this switch from single core to dual core even though we'd gone up from one gigahertz now to two 2.4 gigahertz we've got this idea of dual core and that's because there is a limit to how fast we can run process in terms of frequency mainly because of you know all the electronic stuff and quantum tunneling and always kind of stuff and because of the power requirements we're talking about power requirements in a moment a MIDI fast-forward to morning it to 2010 so 10 years ago and we start to see the first dual-core smartphones that have got dual cores and there we're dealing around 1 gigahertz 1.2 gigahertz but in a dual set up and of course if you forward to you know 2018 1920 like that we're now into octa-core processors and they are pretty much the norm on Android now I said I would mention power now power consumption is phenomenally important for mobile but it is also important for desktops and for servers because it relates to also to the amount of heat produced and to the cooling required now there is an equation we won't go too much into it but basically the power is relative to the capacitance the voltage squared and the frequency that you're running at and when you do the math we don't need to go into it now when you do the math it actually turns out that if you have one core running at let's say three gigahertz but then you have two cores running at 1.5 gigahertz the two core variant and this is the important thing the two core variant uses much less power in fact it uses 60% less power so going from one core to to cause and then lowering the frequency not just half the amount of power actually drops it by 60% so when we started to get to 2 gigahertz and you know we've touched 3 and 4 gigahertz actually their power requirements for those starts to rock it up because it's voltage squared that's an important part of it multiplied by the frequency but when you bring down the frequency you bring down the voltage because you are using multiple cores you actually get a lot lower power requirement now one thing we have to understand is that each microprocessor has different performance characteristics not because of the frequency not because of the voltage but because of its design so if you take a cortex let's say a 75 and you run it at a certain frequency with a certain voltage and then you take this say Aquatics a 77 running at the same frequency at the same voltage the a 77 will be faster and that's because the internals of the chip is designed differently and it's the same in the PC market each AMD generation that comes out you know the the Rison and the Zen architectures always go and until the same the i-5 the i7 the tenth generation the ninth generation it's all these different generation they're actually better because the internals the designers have found new ways of making a CPU work all that fetching from memory executing and all that stuff that we've talked about in many other videos they found ways of making that more performant so my question would refer a single core at three gigahertz versus a dual core at one point five meters I'm going to assume it went the same design of CPU so when we're talking about the Apple a 13 versus a Snapdragon XY we've already got a problem here because they are very different core designs each core runs at a very different frequency and has different performance characteristics because of the microarchitecture that means of the design on the inside but if we just talking now in general we've already looked at that a process of the same designer pros are the same microarchitecture running at 3 gigahertz uses more power than one running at 1.5 gigahertz so you can see that when you use multiple cores this is why we have eight core processors exactly a bit more complicating that because we have big clusters and little clusters we'll talk more about that in a moment but when you have multiple calls you actually need less power of course on a smart phone that's what you want less power because you want the battery to last longer so on the Apple a 13 you've got two high-performance cores and for energy efficient course what do we mean by that I mentioned at the moment it go basically when there is lots of heavy work to be done you're playing a game for example then those high-performance cores will kick in they use more battery power they're more sophisticated the microarchitecture is more complicated it's able to offer more performance at a certain megahertz but actually it also uses more energy but of course you don't play games all the time you might then switch the phone off put it in your pocket you might have just emails coming you're looking at Twitter or whatever and in those situations the energy efficient cause kick in and they use much less power but they don't offer the same performance now on the newest iPhones all six cores can run simultaneously did work then actually it can fire up always its cause the two big calls will work the hardest they can and for little cause will work as hard as they can when you get something like the ass not doing eight six five the eight five five eight four five and going back it was all the same you have eight calls for power efficiency cause and for high performance cause exactly the same idea when you've got a lot of work to done the big course power up they use more energy but actually they get the work done faster littler cause much more power efficient but they get things done slower and again on the snapdragon all eight cores can run simultaneously so we've already seen that having eight cores versus six cores it's actually better in terms of overall power efficiency however what about performance because of course it's this balance with smartphones all the time between performance and power efficiency well look at the performance thing what I've done is I took a Raspberry Pi and I've run a program of my own making which is called the thread test tool it's available on my github repository and basically it finds prime numbers in multiple threads now the great thing about the raspberry PI's you can disable some of the calls so what i've done is i ran the program normally with all the calls active i then ran the program with some of the COS deactivated but still the same clock frequency and then I've tried it with some of the calls deactivated at a lower crop frequency so we can see the kind of combinations of results okay so the tests that I ran use two threads because I wanted to test the idea of two core versus one because it's raining two threads and when it's running with all-cause enabled 1.5 gigahertz that's the speed of the raspberry pi for the test completes in 12 seconds so that's our benchmark number 12 seconds now when I then deactivate all the calls except for one and run the same test remember it's a dual core test so it was running two threads simultaneously what happens well actually is what we expect it goes from 12 seconds to 24 seconds so 24 seconds is that an out-of-time it takes to run that same test but now on just one core and that's because I've disabled the other calls so it has to run it all on the same core and it takes and then what I did was I actually activated again two calls but I reduced the clock speed down to seven hundred and fifty megahertz Oh half the speed so now we've got a two cores running but at half the speed I ran the test again and what was a number well it was 24 seconds so this is the important thing that we can understand here that one core rally at a high frequency achieves exactly the same thing as two cores running at half the frequency and that's really important to understand it isn't that one core is better or two causes better it's the fact that actually offers the same overall system performance depending on the program that you're running so there is a little caveat to that and that is that there was some slight difference it was like twenty four point one and twenty four point two you know second so I did a much longer test that took three minutes to run and over a three minute test run you actually find that two cores is faster by 1.5 seconds so three minutes 1.5 seconds and a very small difference very very tiny but there is a difference so that actually multiple cores is better for a much longer of course when we're using our mobile phones that's not going to make zero difference to our actual real day expectations but it is interesting to know - cause it's better than one core over a much longer test run so what does that tell us that tells us that if you've got six cores like in the a thirteen but they are better at single threaded performance at each core is able to do more and we've expressed it in this term of gigahertz three gigahertz versus 1.5 1.5 versus 750 megahertz as in Robbery PI then you're actually gonna get the same throughput as you do on more calls at a lower frequency or a lower throughput per core that's why when you're measuring the overall system performance of a smartphone it's not ideal to just look at the single core performance because single core performance tells you one part of the story but how the other cores perform together tell the other part of the story now I can see some of you already screaming about multi-programming of multi-standard I've got a whole video about multitasking and multi-threading and multi processing that you really should go and watch but I will say one thing Android in its very nature is multi tasking and multi-threaded and the biggest thing about that is there is a process called the surface flinger that actually runs as a separate process so that when your program when your app wants to display something on the screen it doesn't happen inside your app it happens inside of a separate process the information is shipped out and said okay go and put that on the screen and then this thing called the surface flinger comes into life and it deals with it so very much by nature the fact that you're running something that needs to update the display frequently means that you're already running on multiple cores and you didn't even do anything to to achieve that and of course a good programmer a good app writer will actually take into consideration there are multiple cores available and write some of their code in a way that things can happen in the background on other calls using multi-threaded and multitasking that I cover in that other video so what have we learned in summary two cores at a lower frequency offers the same performance as one core at a higher frequency but actually it half the power in fact 60% less power so multiple cores is more power efficient how also learn that there are differences between the core design so you can't directly compare a two gigahertz apple core with a two gigahertz Qualcomm core because they're going to be different in terms of their performance per clock cycle as I said I've got another video about that so when you combine it all together the best way of testing a smartphone processor is in the context of the whole system how do those calls perform when you're doing actual real workloads and that's why I use speed test G the tests I wrote myself because it tests the overall system performance a whole Channel about speed test G and testing phones side-by-side running my test suite it's not just enough to look at the single core performance and of course we haven't even talked about GPU performance and the interface between the CPU and the GPU that's even a whole nother subject another video maybe so what is the answer to our question would you like three gigahertz at one core single core or 1.5 gigahertz at a multiple core well I think for me I would say I would like the multiple cores at 1.5 gigahertz it's more power efficient and if you program it right and if you're using things like Android which have already got things up the surface flinging in it you can actually get the same or similar performance than you would out of the single core okay maybe you disagree with me I'm sure you'll be very vocal in the comments below but that's it my name is Gary Sims this is Garrick Spain I really hope you enjoyed this video if you did please do give it a thumbs up if you like this kind of content and stick around hit that subscribe button ok that's it I'll see in the next one [Music]
Info
Channel: Gary Explains
Views: 56,105
Rating: 4.8924546 out of 5
Keywords: Gary Explains, Tech, Explanation, Tutorial, Singlecore, Single-core, Multi-core, Multicore, Performance, Efficiency, Multi-threading, Multi-processing, Multi-tasking, single core performance, single-core performance, multicore performance, multi-core performance, Android, Qualcomm, Apple, Raspberry Pi, Arm, Clock frequency, IPC, Instructions per clock, Instructions per cycle
Id: Q5-3MMoA_A0
Channel Id: undefined
Length: 14min 26sec (866 seconds)
Published: Mon Jan 13 2020
Related Videos
Note
Please note that this website is currently a work in progress! Lots of interesting data and statistics to come.