[Solved] Are multi-core processors really faster?
[Solved] Are multi-core processors really faster?
Ok. I just had my mind blown. Here's how it all started...
I was looking up Pixar animations and saw a 1984 animation by them. I looked into it further and saw that Seymour Cray made super computers which Pixar used to render their animations. All pretty cool stuff to read about. One thing confused me though was that Cray swore by single core processors. This is all sometime before his death in 1996. So I figured I would do a test of my own.
I use Anime Studio Pro 10 for the test. Which is able to use multiple cores when rendering. Using the same file to render on three different computers.
Time = Hours:Minutes:Seconds
AMD 4000+ (2.4 Ghz) on Windows XP. Render time: 00:02:11.
Core 2 Duo (1.6 GHz) on OS X Mavericks. Render time: 00:04:30.
AMD Quad core (2.0-2.4 GHz) on Windows 10. Render time: 00:02:34.
What it looks like to me, is that multi-cores just split the processing power of a single core into virtual cores. So to speak. Not really faster but better at multi-tasking. Anyways... I always thought that a multi-core was 2.0 GHz on each core. Not a 2 GHz processor split into 500 Mhz cores. For a quad core example.
Anyone else notice this or have done test?
EDIT: I just realized I have Cool & Quiet enabled on my XP machine. I will have to disable it and run another test.
I was looking up Pixar animations and saw a 1984 animation by them. I looked into it further and saw that Seymour Cray made super computers which Pixar used to render their animations. All pretty cool stuff to read about. One thing confused me though was that Cray swore by single core processors. This is all sometime before his death in 1996. So I figured I would do a test of my own.
I use Anime Studio Pro 10 for the test. Which is able to use multiple cores when rendering. Using the same file to render on three different computers.
Time = Hours:Minutes:Seconds
AMD 4000+ (2.4 Ghz) on Windows XP. Render time: 00:02:11.
Core 2 Duo (1.6 GHz) on OS X Mavericks. Render time: 00:04:30.
AMD Quad core (2.0-2.4 GHz) on Windows 10. Render time: 00:02:34.
What it looks like to me, is that multi-cores just split the processing power of a single core into virtual cores. So to speak. Not really faster but better at multi-tasking. Anyways... I always thought that a multi-core was 2.0 GHz on each core. Not a 2 GHz processor split into 500 Mhz cores. For a quad core example.
Anyone else notice this or have done test?
EDIT: I just realized I have Cool & Quiet enabled on my XP machine. I will have to disable it and run another test.
Last edited by J. Baker on Wed Oct 17, 2018 11:36 pm, edited 1 time in total.
www.posemotion.com
PureBasic Tools for OS X: PureMonitor, plist Tool, Data Maker & App Chef
Mac: 10.13.6 / 1.4GHz Core 2 Duo / 2GB DDR3 / Nvidia 320M
PC: Win 7 / AMD 64 4000+ / 3GB DDR / Nvidia 720GT
Even the vine knows it surroundings but the man with eyes does not.
PureBasic Tools for OS X: PureMonitor, plist Tool, Data Maker & App Chef
Mac: 10.13.6 / 1.4GHz Core 2 Duo / 2GB DDR3 / Nvidia 320M
PC: Win 7 / AMD 64 4000+ / 3GB DDR / Nvidia 720GT
Even the vine knows it surroundings but the man with eyes does not.
Re: Are multi-core processors really faster?
I doubt...
Before testing complete softwares which use GPU too, just test additions on PureBasic.
Test threads to share many operations executing on the same time. Normally, 2.4 GHz quad core, it is near 9 GHz.
The reason of multi-core is twice :
1) The logical gates (the most simple physical unit in processors) have technical limits : actually 2.4 GHz is a limit. Maximum frequency gate is near 1000 GHz but it is very expensive and exclusive. Two 1000 GHz gates blend their informations and give same informations. 2.4 GHz is the limit where a gate starts to receive microwaves digits better than electric digits.
2) More there are similar process units to produce, more this is cheap. A quad-core 2.4 GHz is far less expensive than a 9 GHz equivalent.
Before testing complete softwares which use GPU too, just test additions on PureBasic.
Test threads to share many operations executing on the same time. Normally, 2.4 GHz quad core, it is near 9 GHz.
The reason of multi-core is twice :
1) The logical gates (the most simple physical unit in processors) have technical limits : actually 2.4 GHz is a limit. Maximum frequency gate is near 1000 GHz but it is very expensive and exclusive. Two 1000 GHz gates blend their informations and give same informations. 2.4 GHz is the limit where a gate starts to receive microwaves digits better than electric digits.
2) More there are similar process units to produce, more this is cheap. A quad-core 2.4 GHz is far less expensive than a 9 GHz equivalent.
Re: Are multi-core processors really faster?
It is very hard to really utilize parallell system and you will basically always start throttle back due to bottlenecks.
Memory bandwidth, general I/O caches, access to libraries etc. all have common parts shared with all processes.
Wikipedia has a nice article, https://en.wikipedia.org/wiki/Amdahl%27s_law.
I often find it hard to get much better speed-up in my things after 2-4 threads, after that it is normally better to start think about the bottlenecks.
Memory bandwidth, general I/O caches, access to libraries etc. all have common parts shared with all processes.
Wikipedia has a nice article, https://en.wikipedia.org/wiki/Amdahl%27s_law.
I often find it hard to get much better speed-up in my things after 2-4 threads, after that it is normally better to start think about the bottlenecks.
The best preparation for tomorrow is doing your best today.
-
- Addict
- Posts: 2218
- Joined: Mon Jun 02, 2003 9:16 am
- Location: Germany
- Contact:
Re: Are multi-core processors really faster?
Also depends highly on what you've rendered and with which rendering technique (radiosity, forward raytracing, backwards raytracing, ...).
bye,
Daniel
Daniel
Re: Are multi-core processors really faster?
Just to clear up something. Anime Studio Pro only uses GPU while editing. It uses the CPU to render the final animation. It's a 2D/cartoon animation app. So no GPU rendering what so ever. On top of that. The Windows 10 computer has a newer graphics card than in the XP computer and more memory too.
www.posemotion.com
PureBasic Tools for OS X: PureMonitor, plist Tool, Data Maker & App Chef
Mac: 10.13.6 / 1.4GHz Core 2 Duo / 2GB DDR3 / Nvidia 320M
PC: Win 7 / AMD 64 4000+ / 3GB DDR / Nvidia 720GT
Even the vine knows it surroundings but the man with eyes does not.
PureBasic Tools for OS X: PureMonitor, plist Tool, Data Maker & App Chef
Mac: 10.13.6 / 1.4GHz Core 2 Duo / 2GB DDR3 / Nvidia 320M
PC: Win 7 / AMD 64 4000+ / 3GB DDR / Nvidia 720GT
Even the vine knows it surroundings but the man with eyes does not.
Re: Are multi-core processors really faster?
Did you check the cpu load of the cores to see if the software really uses all 4 cores ?
Are the same settings used for rendering on all computers ?
Are the same settings used for rendering on all computers ?
Windows (x64)
Raspberry Pi OS (Arm64)
Raspberry Pi OS (Arm64)
Re: Are multi-core processors really faster?
I'm pretty sure but I can double check tomorrow. I beta tested the software for 10+ years. Will do some more test too.
www.posemotion.com
PureBasic Tools for OS X: PureMonitor, plist Tool, Data Maker & App Chef
Mac: 10.13.6 / 1.4GHz Core 2 Duo / 2GB DDR3 / Nvidia 320M
PC: Win 7 / AMD 64 4000+ / 3GB DDR / Nvidia 720GT
Even the vine knows it surroundings but the man with eyes does not.
PureBasic Tools for OS X: PureMonitor, plist Tool, Data Maker & App Chef
Mac: 10.13.6 / 1.4GHz Core 2 Duo / 2GB DDR3 / Nvidia 320M
PC: Win 7 / AMD 64 4000+ / 3GB DDR / Nvidia 720GT
Even the vine knows it surroundings but the man with eyes does not.
Re: Are multi-core processors really faster?
I apologize and I am surprised by this info : I thank GPU was used to render. GPU or anything like hardware streaming excluding CPU.J. Baker wrote:Just to clear up something. Anime Studio Pro only uses GPU while editing. It uses the CPU to render the final animation.
Certainly I am wrong if you have software manual.
What you can check actually is through RDTSC ASM statement.
Code: Select all
Procedure.Q TickCount()
! RDTSC
ProcedureReturn
EndProcedure
Code: Select all
Value0.Q = TickCount()
Value1.Q = TickCount()
MessageRequester("Initial test CPU cycle count", StrQ(Value1 - Value0) )
You can replace procedure with a macro.
Normally, you reach a minimum of near 20 cycles.
With a macro and without debugger, you get the shortest cycle period.
Then you can begin single and parallel tests : all must be between the 2 measuring lines.
To test parallel op, see the Thread lib.
- NicTheQuick
- Addict
- Posts: 1224
- Joined: Sun Jun 22, 2003 7:43 pm
- Location: Germany, Saarbrücken
- Contact:
Re: Are multi-core processors really faster?
The Core 2 Duo is not a great processor. It has a L1 cache for each processor with very little size and a common L2 cache for both processor together up to 4 MiB. With this design the two cores are slowed down. Also the L3 cache is completely missing.
The L1 cache of the AMD 4000+ is double the size of the Core 2 Duo, but the L2 cache is only 1/4 to 1/2 of the size of the Core 2 Duo. However L1 is very important and it brings a good performance boost with a bigger size. Of course the higher processor clock will help also but you can not compare it directly with other processors this way.
I tried to find processors of the same type you mentioned in the database of cpuboss. Interestingly the AMD 4000+ and Core 2 Duo got the same score of 4.1 out of 10: http://cpuboss.com/cpus/Intel-Core2-Duo ... thlon-4000
I don't know which processor you mean with "AMD Quad Core" because there are more than just one of them. But if it needs the same time to render as the AMD 4000+ the rendering engine is definitely not good at parallel computing. It should at least render 3x times as fast or even more than the AMD 4000+.
If you write a good parallelizable algorithm you can multiply the speed of your algorithm nearly with the number of available processing cores.
The L1 cache of the AMD 4000+ is double the size of the Core 2 Duo, but the L2 cache is only 1/4 to 1/2 of the size of the Core 2 Duo. However L1 is very important and it brings a good performance boost with a bigger size. Of course the higher processor clock will help also but you can not compare it directly with other processors this way.
I tried to find processors of the same type you mentioned in the database of cpuboss. Interestingly the AMD 4000+ and Core 2 Duo got the same score of 4.1 out of 10: http://cpuboss.com/cpus/Intel-Core2-Duo ... thlon-4000
I don't know which processor you mean with "AMD Quad Core" because there are more than just one of them. But if it needs the same time to render as the AMD 4000+ the rendering engine is definitely not good at parallel computing. It should at least render 3x times as fast or even more than the AMD 4000+.
That's a ridiculous assumption. There are things like Hyper-Threading which sounds a little bit like splitting a real core into two virtual ones but in fact this is not the case. And you can read more about that in Wikipedia: https://en.wikipedia.org/wiki/Hyper-threadingJ. Baker wrote:What it looks like to me, is that multi-cores just split the processing power of a single core into virtual cores. So to speak. Not really faster but better at multi-tasking. Anyways... I always thought that a multi-core was 2.0 GHz on each core. Not a 2 GHz processor split into 500 Mhz cores. For a quad core example.
If you write a good parallelizable algorithm you can multiply the speed of your algorithm nearly with the number of available processing cores.
The english grammar is freeware, you can use it freely - But it's not Open Source, i.e. you can not change it or publish it in altered way.
Re: Are multi-core processors really faster?
I did the TickCount on XP and OS X. I will do a test on the Windows 10 pc in a bit.
XP = 51 ticks
OS X = 42 ticks
XP = 51 ticks
OS X = 42 ticks
www.posemotion.com
PureBasic Tools for OS X: PureMonitor, plist Tool, Data Maker & App Chef
Mac: 10.13.6 / 1.4GHz Core 2 Duo / 2GB DDR3 / Nvidia 320M
PC: Win 7 / AMD 64 4000+ / 3GB DDR / Nvidia 720GT
Even the vine knows it surroundings but the man with eyes does not.
PureBasic Tools for OS X: PureMonitor, plist Tool, Data Maker & App Chef
Mac: 10.13.6 / 1.4GHz Core 2 Duo / 2GB DDR3 / Nvidia 320M
PC: Win 7 / AMD 64 4000+ / 3GB DDR / Nvidia 720GT
Even the vine knows it surroundings but the man with eyes does not.
Re: Are multi-core processors really faster?
Ok... These values give us the ticks count required to... get the tick count. Hu... I understand if you doubt a little bit !
Below, you can measure the ticks count required to execute "X + 1".
Here you test a one-thread-single-operation : X + 1.
Below, you can measure the ticks count required to execute "X + 1".
Code: Select all
Init0.Q = TickCount()
Init1.Q = TickCount()
Basis.Q = Init1 - Init0
Value0.Q = TickCount()
X + 1 ; increasing op example
Value1.Q = TickCount()
MessageRequester("Info", "Increasing op ticks count : "+StrQ(Value1-Value0-Basis) )
- NicTheQuick
- Addict
- Posts: 1224
- Joined: Sun Jun 22, 2003 7:43 pm
- Location: Germany, Saarbrücken
- Contact:
Re: Are multi-core processors really faster?
With your code I am getting values all over the place: -15, -9, 189, -46, -18
So the X + 1 instruction needs less time than no instruction at all.
So the X + 1 instruction needs less time than no instruction at all.
The english grammar is freeware, you can use it freely - But it's not Open Source, i.e. you can not change it or publish it in altered way.
Re: Are multi-core processors really faster?
Problem solved!
So I downloaded Blender 2.76b (last version to support XP) on both the XP and Windows 10 computers. There's also a BMW render test that can be either set for CPU or GPU rendering. I did the CPU render on both computers and it didn't take me long to see the quad core on Windows 10 smoking my single core pc. So that's good news.
So now I'm shocked that Anime Studio (now called Moho again) is not using the multiple cores properly while rendering. The creator of Moho has been programming since the 90's and is good at what he has done and created but there's obviously an issue. I'll have to report that to him. I also did some test on Anime Studio Pro and noticed version 9.5 renders twice as fast than version 10, 11, or 12.
Which now leaves me wondering... How many other apps or games are out there and possibly not using multiple cores properly? I have seen some games that my kids play and have wondered why it had such high requirements. These are games that do not look very graphic intensive and make you wonder, yeah I could optimize that better.
Thanks for the feedback and help.
So I downloaded Blender 2.76b (last version to support XP) on both the XP and Windows 10 computers. There's also a BMW render test that can be either set for CPU or GPU rendering. I did the CPU render on both computers and it didn't take me long to see the quad core on Windows 10 smoking my single core pc. So that's good news.
So now I'm shocked that Anime Studio (now called Moho again) is not using the multiple cores properly while rendering. The creator of Moho has been programming since the 90's and is good at what he has done and created but there's obviously an issue. I'll have to report that to him. I also did some test on Anime Studio Pro and noticed version 9.5 renders twice as fast than version 10, 11, or 12.
Which now leaves me wondering... How many other apps or games are out there and possibly not using multiple cores properly? I have seen some games that my kids play and have wondered why it had such high requirements. These are games that do not look very graphic intensive and make you wonder, yeah I could optimize that better.
Thanks for the feedback and help.
www.posemotion.com
PureBasic Tools for OS X: PureMonitor, plist Tool, Data Maker & App Chef
Mac: 10.13.6 / 1.4GHz Core 2 Duo / 2GB DDR3 / Nvidia 320M
PC: Win 7 / AMD 64 4000+ / 3GB DDR / Nvidia 720GT
Even the vine knows it surroundings but the man with eyes does not.
PureBasic Tools for OS X: PureMonitor, plist Tool, Data Maker & App Chef
Mac: 10.13.6 / 1.4GHz Core 2 Duo / 2GB DDR3 / Nvidia 320M
PC: Win 7 / AMD 64 4000+ / 3GB DDR / Nvidia 720GT
Even the vine knows it surroundings but the man with eyes does not.
Re: [Solved] Are multi-core processors really faster?
I have not had the time to press "power on" computer buttpn that you did all that... Also good new J.Baker.
@NicTheKick
Add a Delay(4000) to prevent the initial basis value from being set during harddisk cache synchronizing. Normally, count values should a little bit... realistic.
If not, I ll make in few days.
@NicTheKick
Add a Delay(4000) to prevent the initial basis value from being set during harddisk cache synchronizing. Normally, count values should a little bit... realistic.
If not, I ll make in few days.
-
- Addict
- Posts: 2218
- Joined: Mon Jun 02, 2003 9:16 am
- Location: Germany
- Contact:
Re: Are multi-core processors really faster?
This is not what I meant. Examples:J. Baker wrote:Just to clear up something. Anime Studio Pro only uses GPU while editing. It uses the CPU to render the final animation. It's a 2D/cartoon animation app. So no GPU rendering what so ever. On top of that. The Windows 10 computer has a newer graphics card than in the XP computer and more memory too.
For backward ray tracing a ray is sent from the point of view into the scene for every pixel of your final image. This ray is then bouncing off the surfaces to compute the final color of that pixel. Now a multi threaded variant could cut the area of the final image into blocks. If you render a scene which is not evenly distributed over the final image, it could be possible that only one block contains all the scene and the remaining blocks contain nothing. Thus, only one thread renders everything. However, for evenly distributed scene information over the final image, it would be the best method.
Optimizations are often dependent on the input.
See my signature in the German forum:NicTheQuick wrote:With your code I am getting values all over the place: -15, -9, 189, -46, -18
So the X + 1 instruction needs less time than no instruction at all.
Assuming there is a algorithm with complex run time O(i * n), then O((i * n)^2) = O(-1 * n^2). That means if you nest that algorithm it is finished before it started!
bye,
Daniel
Daniel