top of page
aaa.jpg

Computer Architecture Performance Evaluation

 Overview 

In this project, I assessed how effectively a C++ backpack benchmark performed on two distinct computer architectures: an x86 system and a POWER8 system. Examining the effects of CPU performance, compiler optimization, and processor architecture on program execution was the goal. I used hardware performance counters to verify analytical CPU performance calculations, measured execution times, compared generated file sizes, and ran the identical software on both platforms.My knowledge of computer architecture, compiler optimizations, benchmarking methods, Linux development tools, and performance analysis has all improved as a result of this effort. Additionally, it provided me with hands-on experience gathering and analyzing actual performance data from various hardware platforms.

Tools and Technologies Used

  • C++

  • Linux

  • GCC Compiler

  • x86 Architecture

  • POWER8 Architecture

  • Performance Benchmarking

  • Compiler Optimization (-O0 / -O3)

  • Linux time Command

  • Linux perf Tool

  • CPU Performance Analysis

Key Steps 


1. Designed the ArrayList Class

I began by learning as much as I could about the two systems that were employed for the task. Processor architecture, clock speeds, operating systems, compiler versions, and hardware combinations were all compared. Knowing these distinctions made it easier to understand why each system behaved differently in subsequent tests.

2. Compile the Program and Compare Code Size

I created the assembly file, object file, and executable for the knapsack program using GCC after recording the hardware. I examined why the source file remained the smallest while the assembly file was the largest by comparing the sizes of each created file on the two systems. The findings demonstrated that, despite the two architectures' disparate processing designs, GCC produced output sizes that were almost equal.

3. Measure Program Execution Time

X64 RAW DATA

After the software was compiled, I ran it six times on both the x86 and POWER8 platforms to benchmark the executable. Before determining the average values for each platform, I noted the actual, user, and system execution times. The x86 system completed the benchmark far faster than the POWER8 system, demonstrating how processor architecture and single-core performance affect execution time.

POWER8 RAW DATA

 4. Evaluate Compiler Optimization

x86 Results

I recompiled the benchmark using both the -O0 and -O3 optimization options after measuring the default execution times. I subsequently carried out the benchmarking procedure once more and contrasted the outcomes. On both systems, enabling compiler optimizations drastically decreased execution times, showing how optimization strategies like instruction scheduling, function inlining, and loop optimization can greatly enhance application performance.

POWER8 Results

5. Displayed Stored Data

Finally, I used the Linux perf tool to collect the total CPU cycle count for the POWER8 system. Using the CPU execution time equation, I calculated the expected execution time and compared it with the measured execution times collected using both perf and the Linux time command. The calculated CPU time closely matched the measured results, confirming the accuracy of the analytical performance model taught in class and demonstrating how theoretical CPU performance equations relate to real system measurements.

Analysis and Conclusion

This project effectively illustrated how hardware features, compiler optimization, and processor design affect software performance. Enabling -O3 optimization greatly reduced execution time on both systems, even though the x86 system routinely finished the benchmark faster than the POWER8 system under default compiler settings. The CPU performance model used throughout the course was validated since the analytical CPU time derived from hardware performance counters closely matched the execution times measured experimentally.I learned how to benchmark software, compare processor architectures, use Linux performance analysis tools, and analyze experimental performance data through this research. Additionally, I improved my comprehension of compiler optimizations and how theoretical ideas in computer architecture result in quantifiable gains in practical implementations.

bottom of page