No more mysteries: Apple's G5 versus x86, Mac OS X versus Linux
by Johan De Gelas on June 3, 2005 7:48 AM EST- Posted in
- Mac
Summary: the cores compared
Below, you find a comparison of the Intel Xeon/Pentium 4, the Opteron/Athlon 4, the G5 and the previous CPU in the Apple Power: the G4 of Motorola.CPU feature |
Motorola G4+ |
G5 (IBM PowerPC 970) |
Intel Xeon P4 Irwindale |
AMD Opteron Troy |
Process technology |
0.18 µ CU SOI |
0.09 µ CU SOI |
0.09 µ CU |
0.09 µ CU SOI |
GP Register Width (bit) |
32 |
64 |
64 |
64 |
Number of transistors (Million) |
33 |
58 |
169 |
106 |
Die Size (mm²) |
106 |
66 |
+/-130 (112 for 1 MB L2) |
115 |
Maximum Clockspeed (MHz) |
1400 |
2700 (liquid cooled) |
3800 |
2600 |
Pipeline Stages ( fp) |
7 |
16 (21) |
31 - 39* |
12 (17) |
issue rate (Instruction per clockcycle) |
3 + 1 Branch |
4 + 1 branch |
4 ports, max. 6 (3 sustained) |
6 (3 sustained) |
Integer issue rate (IPC) |
3 + 1 Branch |
2 |
4 (3 sustained) |
3 |
Floating point issue rate (IPC) |
1 |
2 |
1 |
3 |
Vector issue rate (IPC) |
2-4 ( Altivec) |
2-4 ( Altivec, velocity) |
4 Single(SSE-2/3) |
4 Single(SSE-2/3) |
2 Double (SSE-2/3) |
2 Double (SSE-2/3) |
|||
Load & Store units |
1 |
2 |
2 |
2 |
"instructions in flight" (OOO Window) |
16 |
215 (100) |
126 |
72 |
Branch History Table size (entries) |
2048 |
16384 |
4096 |
16384 |
L1-cache (Instruction/Data) |
32 KB/32 KB |
64 KB/32 KB |
12k µops (+/- 8-16 KB)/16 KB |
64 KB/64KB |
L2-cache |
256 KB |
512 KB |
2048 KB |
1024 KB |
L3-cache |
2 MB DDR SRAM 64 bit at 1/4 th of core clock |
none |
None |
none |
Front Side Bus (MHz) |
166 |
1350 (675 DDR) |
800 (200 Quad) |
N/A |
Front Side Bus (GB/s) |
1.3 Half Duplex |
10,8 Full Duplex |
6.4 Half Duplex |
N/A |
Memory Bandwidth (GB/s) |
2.7 |
6.4 |
6.4 |
6.4 |
Core Voltage |
1.6V |
1,1V ? |
1.38V |
1.4V |
Power Dissipation |
30W at 1 GHz |
+/- 59 (Typical) -80 Watt (max) |
110 W (Typical) |
92,6W (Max) |
*31 is branch misprediction pipeline length, 39 is the length of the total pipeline including decoding stages before the trace cache.
Let us summarize: in theory, the PowerPc 970FX is a very wide, deeply pipelined superscalar monster chip, with excellent Branch prediction and fantastic features for streaming applications. And let us not forget the two parallel FPUs and the SIMD Altivec unit, which can process up to 4 calculations per clock cycle.
The disadvantages are the rather coarse way that the 970FX handles the instruction flow and the high latency to the RAM.
Enough theory. Let us see how the G5 2.5 GHz and 2.7 GHz compares to the 3.6 GHz Xeon Irwindale and Opteron 250 (2.4 GHz). The Opteron 852 arrived just a day before my deadline, but I think that you will know how the 252 performs compared to the 250. Before we tackle performance, here are a few quick notes about power dissipation.
Power to the PowerPC
How power thirsty is this PowerPC 970FX? His predecessor, the 0.13µ SOI PowerPC 970 was a pretty cool chip. It consumed about 42W at 1.8 GHz (1.3v). The newer 0.09µ SOI PowerPC 970FX CPU is reported to dissipate about 55-59W at 2.5 GHz. However, a few annotations must be made.First of all, IBM and Apple tend to increase the core voltage when running at higher clock speed. This makes the needed power increase more than linearly. For example, the 1.8 GHz PowerPC 970 consumed 42 Watt, but the 2 GHz version (both 0.13µ CPUs) needed 66 Watt.
Secondly, the TDP IBM talks about is typical , not maximum like AMD's.
Let us clarify this by checking IBM's and Apple's numbers. For the 90 nm, IBM's own documents tell us that the PowerPC 970FX only consumes 24.5 Watt at 2 GHz (1V). However, the same 0.09µ SOI PowerPC970FX is reported to consume about 55W at 2.3 GHz (1.1V?) in the Xserve, according to Apple's own website. Typically, you would expect the G5 to consume about 28 Watt (24.5 * 2.3 / 2) at 2.3 GHz, when using the 24.5 Watt at 2 GHz as a reference. Apple talks about "at most" (maximum), and IBM about "typical".
Still, that is a huge gap between "typical" and "maximum" power dissipation. The 55 Watt number seems to indicate that the core voltage must have been increased significantly at 2.3 GHz. The maximum power dissipation of the 2.5/2.7 GHz G5 inside the liquid-cooled PowerMacs might thus be quite a bit higher than in the 1U Xserve, probably around 80 Watt for the 2.7 GHz. That is a lot of power for a 66 mm² CPU, and it probably explains why Apple introduced liquid cooling. The liquid cooling system inside our PowerMac wouldn't get warm and wouldn't be necessary at all if the two 2.5 GHz CPUs were only dissipating a 59 Watt maximum.
116 Comments
View All Comments
Joepublic2 - Monday, June 6, 2005 - link
Wow, pixelglow, that's an awesome way to advertise your product. No marketing BS, just numbers!pixelglow - Sunday, June 5, 2005 - link
I've done a direct comparison of G5 vs. Pentium 4 here. The benchmark is cache-bound, minimal branching, maximal floating point and designed to minimize use of the underlying operating system. It is also single-threaded so there's no significant advantage to dual procs. More importantly it uses Altivec on G5 and SSE/SSE2 on the Pentium 4, and also compares against different compilers including the autovectorizing Intel ICC.http://www.pixelglow.com/stories/macstl-intel-auto...
http://www.pixelglow.com/stories/pentium-vs-g5/
Let the results speak for themselves.
webflits - Sunday, June 5, 2005 - link
"From the numbers, it seems like gcc was only capable of using Altivec in one test,"Nonsense!
The Altivec SIMD only supports single (32-bit) precision floating point and the benchmark uses double precision floating point.
webflits - Sunday, June 5, 2005 - link
Here are the resuls on a dual 2.0Ghz G5 running 10.4.1 using the stock Apple gcc 4.0 compiler.[Session started at 2005-06-05 22:47:52 +0200.]
FLOPS C Program (Double Precision), V2.0 18 Dec 1992
Module Error RunTime MFLOPS
(usec)
1 4.0146e-13 0.0163 859.4752
2 -1.4166e-13 0.0156 450.0935
3 4.7184e-14 0.0075 2264.2656
4 -1.2546e-13 0.0130 1152.8620
5 -1.3800e-13 0.0276 1051.5730
6 3.2374e-13 0.0180 1609.4871
7 -8.4583e-11 0.0296 405.4409
8 3.4855e-13 0.0200 1498.4641
Iterations = 512000000
NullTime (usec) = 0.0015
MFLOPS(1) = 609.8307
MFLOPS(2) = 756.9962
MFLOPS(3) = 1105.8774
MFLOPS(4) = 1554.0224
frfr - Sunday, June 5, 2005 - link
If you test a database you have to disable the write cache on the disk on almost any OS unless you don't care about your data. I've read that OS X is an exception because it allows the database software control over it, and that mySql indeed does use this. This would invalidate al your mySql results except for OS X.Besides all serious database's run on controllers with write cache with batteries (and with the write cache on the disks disabled).
nicksay - Sunday, June 5, 2005 - link
It is pretty clear that there are a lot of people who want Linux PPC benchmarks. I agree. I also think that if this is to be a "where should I position the G5/Mac OS X combination compared to x86/Linux/Windows" article, you should at least use the default OS X compiler. I got flops.c from http://home.iae.nl/users/mhx/flops.c to do my own test. I have a stock 10.4.1 install on a single 1.6 GHz G5.In the terminal, I ran:
gcc -DUNIX -fast flops.c -o flops
My results:
FLOPS C Program (Double Precision), V2.0 18 Dec 1992
Module Error RunTime MFLOPS
(usec)
1 4.0146e-13 0.0228 614.4905
2 -1.4166e-13 0.0124 565.3013
3 4.7184e-14 0.0087 1952.5703
4 -1.2546e-13 0.0135 1109.5877
5 -1.3800e-13 0.0383 757.4925
6 3.2374e-13 0.0220 1320.3769
7 -8.4583e-11 0.0393 305.1391
8 3.4855e-13 0.0238 1258.5012
Iterations = 512000000
NullTime (usec) = 0.0002
MFLOPS(1) = 736.3316
MFLOPS(2) = 578.9129
MFLOPS(3) = 866.8806
MFLOPS(4) = 1337.7177
A quick add-n-divide gives my system an average result of 985.43243.
985. On a single 1.6 G5.
So, the oldest, slowest PowerMac G5 ever made almost matches a top-of-the-line dual 2.7 G5 system?
To quote, "Something is rotten in the state of Denmark." Or should I say the state of the benchmark?
Eug - Saturday, June 4, 2005 - link
BTW, about the link I posted above:http://lists.apple.com/archives/darwin-dev/2005/Fe...
The guy who wrote that is the creator of the BeOS file system (and who now works for Apple).
It will be interesting to see if this is truly part of the cause of the performance issues.
Also, there is this related thread from a few weeks back on Slashdot:
http://hardware.slashdot.org/article.pl?sid=05/05/...
profchaos - Saturday, June 4, 2005 - link
The statement about Linux kernel modules is incorrect. It is a popular misconception that kernel modules make the Linux kernel something other than purely monolithic. The module loader links module code in kernelspace, not in userspace, the advantage being dynamic control of kernel memory footprint. Although some previously kernelspace subsystems, such as devfs, have been recently rewritten as userspace daemons, such as udev, the Linux kernel is for the most part a fully monolithic design. The theories that fueled the monolithic vs. microkernel flame wars of the mid-90s were nullified by the rapid ramping of single-thread performance relative to memory subsystems. From the perspective of the CPU, it take years for a context switch to occur since modifying kernel data structures in main memory is so slow relative to anything else. Userspace context switching is based on IPC in microkernel designs, and may require several context switches in practice. As you can see from the results, Linux 2.6 wipes the floor with Darwin just the same as it does with several of the BSDs (especially OpenBSD and FreeBSD4.x) and its older cousin Linux 2.4. It's also anyone's guess whether the Linux 2.6 systems were using pthreads (from NPTL) or linuxthreads in glibc. It takes a heavyweight UNIX server system, which today means IBM AIX on POWER, HP-UX on Itanium, or to a lesser degree Solaris on SPARC, to best Linux 2.6 under most server workloads.Eug - Saturday, June 4, 2005 - link
Responses/Musings from an Apple developer.http://ridiculousfish.com/blog/?p=17
http://lists.apple.com/archives/darwin-dev/2005/Fe...
Also:
They claim that making a new thread is called "forking". No, it’s not. Calling fork() is forking, and fork() makes processes, not threads.
They claim that Mac OS X is slower at making threads by benchmarking fork() and exec(). I don’t follow this train of thought at all. Making a new process is substantially different from making a new thread, less so on Linux, but very much so on OS X. And, as you can see from their screenshot, there is one mySQL process with 60 threads; neither fork() nor exec() is being called here.
They claim that OS X does not use kernel threads to implement user threads. But of course it does - see for yourself.
/* Create the Mach thread for this thread */
PTHREAD_MACH_CALL(thread_create(mach_task_self(), &kernel_thread), kern_res);
They claim that OS X has to go through "extra layers" and "several threading wrappers" to create a thread. But anyone can see in that source file that a pthread maps pretty directly to a Mach thread, so I’m clueless as to what "extra layers" they’re talking about.
They guess a lot about the important performance factors, but they never actually profile mySQL. Why not?
orenb - Saturday, June 4, 2005 - link
Thank you for a very interesting article. A follow up on desktop and workstation performance will be very appreciated... :-)Good job!