1 / 53

Benchmark sparc vs. x86

Benchmark sparc vs. x86. von Axel Schmidt (94416) Raphael Schlameuß (100753). Agenda. Hardware (Sparc, X86) Prozessor-Features (Sparc, X86) Benchmark Probleme ?! Erwartete Ergebnisse Ergebnisse Zusammenfassung Fragen und Anregungen ?. ASUS P3B-F Mainboard Intel 440BX-Chipsatz

dutch
Download Presentation

Benchmark sparc vs. x86

An Image/Link below is provided (as is) to download presentation Download Policy: Content on the Website is provided to you AS IS for your information and personal use and may not be sold / licensed / shared on other websites without getting consent from its author. Content is provided to you AS IS for your information and personal use only. Download presentation by click this link. While downloading, if for some reason you are not able to download a presentation, the publisher may have deleted the file from their server. During download, if you can't get a presentation, the file might be deleted by the publisher.

E N D

Presentation Transcript


  1. Benchmarksparc vs. x86 von Axel Schmidt (94416) Raphael Schlameuß (100753)

  2. Agenda • Hardware (Sparc, X86) • Prozessor-Features (Sparc, X86) • Benchmark Probleme ?! • Erwartete Ergebnisse • Ergebnisse • Zusammenfassung • Fragen und Anregungen ?

  3. ASUS P3B-F Mainboard Intel 440BX-Chipsatz Pentium II („Deschutes“),350 MHz, 512 kB L2 2x 128 MB SDRAM,100 MHz Bustakt UDMA33-IDE-Controller,33 MB/s 40GB HDD, 7200 min-1,1719kB Cache ATI 3D Rage Pro AGP, 8MB NetzwerkkarteRealtek 8139 Benchmark - Hardware UltraSparc Pentium II • SIMBA/SABRE-Chipsatz • UltraSparc IIi, 360 MHz,256 kB L2 • 2x 128 MB EDO JEDEC DRAM, 75 MHz Bustakt • MDMA-IDE-Controller,16,7 MB/s • 40GB HDD, 7200 min-1,1863kB Cache • ATI 3D Rage Pro PCI, 4MB • NetzwerkkarteHAPPY MEAL

  4. UltraSparc IIi – Features • Highly Integrated Superscalar-Processor • SPARC-V9 64-Bit-RISC Architektur • VISTM Instruction Set • 1 UltraSparc IIi CPU mit 360 MHz Takt • externer Bus-Takt 90 MHz

  5. UltraSparc IIi – Features • Je 16 kB D- und I-Cache (L1) • 256 kB L2-Cache (extern, halber CPU-Takt) • 4 Integer-, 3 Gleitpunkt- und 1 Graphic-Units • Block-Load/Store-Unit • Registerfile mit 64 Bit Registern

  6. Architektur UltraSparc IIi

  7. Pentium II – Features Out-of-Order Superskalar Processor Core CISC mit Dynamic Execution Microarchitecture 1 Intel Pentium II CPU mit 350 MHz Takt externer Bus-Takt 100 MHz

  8. Pentium II – Features Je 16 kB D- und I-Cache (L1) 512 kB L2-Cache (extern, halber CPU-Takt) 2 Integer- und 2 MMX-Units 1 Gleitpunkt- und 1 Jump-Unit Load/Store-Unit

  9. Architektur Intel Pentium II

  10. Benchmark – Probleme ?! Unterschiedliche Hardware (Mainboard, Grafikkarte, Speicher, Prozessor) Betriebssystemwahl (Solaris, Debian, Gentoo, …) Softwareauswahl (BLAS, LAPACK, LINPACK, Cachebench, Whetstone, Dhrystone) Compileroptimierung ??? Benchmarkergebnisse vergleichbar ?

  11. Betriebssystem Sparc Gentoo Linux (Base 1.6.13) Stage 1 Installation (32-Bit) CFLAGS: -march=ultrasparc -O2 -m32 -mvis Bootstrapping (Installation des Basissystems [32-Bit]) Update auf stable-Packages (32-Bit) Kernel 2.6.13 (mit Gentoo-Patches [64-Bit]) Treiber und Konfigurationen Compiler: gcc-3.4.5

  12. Betriebssystem x86 Gentoo Linux (Base 1.6.13) Stage 1 Installation (32-Bit) CFLAGS: -march=pentium2 -O2 -m32 -mmmx Bootstrapping (Installation des Basissystems [32-Bit]) Update auf stable-Packages (32-Bit) Kernel 2.6.13 (mit Gentoo-Patches [32-Bit]) Treiber und Konfigurationen Compiler: gcc-3.4.5

  13. Vorüberlegung Benchmark Whetstone 1972 (Kombination aus Integer-, Gleitpunkt- und Array-Operationen, Ergebnis in MIPS) Dhrystone 1984 (Integer- und Array-Operationen, Ergebnis in Dhrystone-Loops / s) 1000s / 1000d (LINPACK) Benchmarken von CPU / Cache / Speicher durch Messen von Cache-Zugriffen Lösen Linearer Gleichungssysteme (xAXPY, xGEMV, xGEMM) Compileroptimierung durch CFLAGS

  14. Erwartete Ergebnisse • Cache-Zugriff: in etwa identisch (< 256 KByte) • Integer: x86 ≈ sparc • Single-Präzision: x86 ≈ sparc • Double-Präzision: sparc > x86, wegen 64-Bit Architektur, x86 nur wenige 64-Bit Register (MMX) • Compileroptimierung: x86 > sparc

  15. Software für Benchmark Whetstone (floating-point-Operationen) Dhrystone (integer-Operationen) LINPACK veraltet, deshalb LAPACK(für sparc nicht verfügbar,  LAPACK-ATLAS) LLCBench (Cachebench, Blasbench) BLAS (Basic Linear Algebra Subprograms)

  16. Whetstone 1972 • Array-Funktionen (Anteil: 28,91%) • Bedingte Sprünge (Anteil: 15,53%) • Integer-Arithmetik (Anteil: 13,65%) • Trigonometrische Funktion (Anteil: 1,44%) • Funktionsaufrufe (Anteil: 40,47%)

  17. Dhrystone 1984 • Array-Funktionen (Anteil: 12,62%) • Bedingte Sprünge (Anteil: 33,01%) • Integer-Arithmetik (Anteil: 37,86%) • Funktionsaufrufe (Anteil: 16,51%)

  18. Whetstone / Dhrystone

  19. Whetstone / Dhrystone • Whetstone (floating-point-Operationen) • ohne Optimierung: Beschleunigung x86  sparc: 1,94 • mit Optimierung: Beschleunigung x86  sparc: 1,37 • Dhrystone (integer-Operationen) • ohne Optimierung: Beschleunigung x86  sparc: 1,63 • mit Optimierung: Beschleunigung x86  sparc: 0,79

  20. Benchmark LAPACK-ATLAS • ATLAS stellt Schnittstellen für C und Fortran zur Nutzung von LAPACK und BLAS zur Verfügung • ATLAS - Automatically Tuned Linear Algebra Software • BLAS – Basic Linear Algebra Subprograms • LAPACK - Linear Algebra PACKage

  21. Routinen aus LAPACK I • Treiber- und Rechen-Routinen • Treiber-Routinen zum Lösen von Problemen wie • Lineare Gleichungssysteme • Eigenwerte von realen symmetrischen Matrizen • Rechen-Routinen für einzelne Aufgaben • werden von Treiber-Routinen genutzt

  22. Routinen aus LAPACK II • Beispiel einer Routine: • SGEMV und DGEMV • S Single precision (32-Bit Gleitpunkt) • D Double precision (64-Bit Gleitpunkt) • GE General • MV Matrix-Vektor-Operationen • berechnet die Lösungen zu einem realen System linearer Gleichungen der Form y=α*A*x+β*y, wobei α, β Skalare, A Matrix und x, y Vektoren sind.

  23. LINPACK - SGEFA Pseudocode SGEFADO k = 1, N find pivot DO j = k+1, N call SAXPY(N-k, -A[k,j], A[k+1,k], A[k+1,j], 1)N=1000 SAXPY – Multiplikation von Skalar und Vektor, Addition von VektorenDO i = m, N y[i] = a * x[i] + y[i]Skalar a, Vektor x, y

  24. LINPACK – Auswertung I Die Ergebnisse lassen sich folgendermaßen Interpretieren total: Ausführungszeit in Sekunden mflops: Millionen Gleitpunktoperationen pro SekundeGewichtung der Operationen:add, sub und mul 1 flopdiv und sqr 4 flopexp, sin, ... 8 flopif-Verzweigung 1 flopBerechnung der mflops durch Division von Anzahl flop durch Laufzeit

  25. 1000s / 1000d

  26. 1000s / 1000d • 1000s (single-precision) • ohne Optimierung: Beschleunigung x86  sparc: 1,52 • mit Optimierung: Beschleunigung x86  sparc: 0,90 • 1000d (double-precision) • ohne Optimierung: Beschleunigung x86  sparc: 1,51 • mit Optimierung: Beschleunigung x86  sparc: 1,28

  27. Software Suite LLCbenchLow Level Architectural Characterization Benchmark • Blasbench • xAXPY – Vektoraddition mit Skalar • xGEMV – Matrix-Vektor-Multiplikation mit Skalar • xGEMM – Matrix-Matrix-Multiplikation mit Skalar • Cachebench (Performance Cache) • Cache read / hand tuned read • Cache write / hand tuned write • Cache read/modify/write und hand tuned read/modify/write

  28. Blasbench • SAXPY / DAXPY – Vektoraddition mit Skalar y=A*x+y • SGEMV / DGEMV – Matrix-Vektor-Multiplikation mit Skalar y=α*A*x+β*y • SGEMM / DGEMM – Matrix-Matrix-Multiplikation mit Skalar C=α*op(A)*op(B)+β*C Matrix A, B, C op(A) = mk-Matrix Skalar α, β op(B) = kn-Matrix Vektor x, y C = mn-Matrix

  29. Blasbench – SAXPY

  30. Blasbench - SGEMV

  31. Blasbench – SGEMM

  32. Blasbench - DAXPY

  33. Blasbench - DGEMV

  34. Blasbench - DGEMM

  35. Software Cachebench • Funktion Cache read • Durchsatzmessung für verschiedene Vektorlängen • Pseudo Code: for all vector length timer start for iteration count for I = 0 to vector length register += memory[I] timer stop mit vector length = [256 Byte .. 1024 KByte]

  36. Software Cachebench • Funktion Cache write • Durchsatzmessung für verschiedene Vektorlängen • Pseudo Code: for all vector length timer start for iteration count for I = 0 to vector length memory[I] = register++ timer stop mit vector length = [256 Byte .. 1024 KByte]

  37. Software Cachebench • Funktion Cache read / modify / write • Durchsatzmessung für verschiedene Vektorlängen • Pseudo Code: for all vector length timer start for iteration count for I = 0 to vector length memory[I]++ timer stop mit vector length = [256 Byte .. 1024 KByte]

  38. Cachebench – read (single / double)

  39. Cachebench – write (single / double)

  40. Cachebench – read/modify/write(single / double)

  41. Software Cachebench • Funktionen HandCache read, HandCache read / modify / write und HandCache write • Handmodifizierter Code, um die Optimierung des Compilers zu testen • Jede Schleife referenziert 8 Memory-Elemente statt einem (Degree Eight Unrolling) • Jede Operation ist unabhängig von den vorherigen 7 Operationen (Dependency Analysis) • Register sind Speicherstellen zugewiesen und werden so oft wie möglich benutzt (Register Re-Use)

  42. Cachebench – hand read (single / double)

  43. Cachebench – hand write (single / double)

  44. Cachebench – hand read/modify/write(single / double)

  45. Whetstone / Dhrystone

  46. CompileroptimierungWhetstone / Dhrystone

  47. Compileroptimierung x86Whetstone / Dhrystone

  48. Compileroptimierung sparcWhetstone / Dhrystone

  49. CompileroptimierungWhetstone / Dhrystone (gcc-3.4.5 – gcc-4.0.2) Whetstone [MIPS], Dhrystone [1000 Dhrystones/s]

  50. Zusammenfassung

More Related