tape a transactional application profiling environment
play

TAPE: a Transactional Application Profiling Environment Hassan Chafi - PowerPoint PPT Presentation

TAPE: a Transactional Application Profiling Environment Hassan Chafi , Chi Cao Minh, Austen McDonald, Brian D. Carlstrom, JaeWoong Chung, Lance Hammond, Christos Kozyrakis, and Kunle Olukotun Computer Systems Laboratory Stanford University


  1. TAPE: a Transactional Application Profiling Environment Hassan Chafi , Chi Cao Minh, Austen McDonald, Brian D. Carlstrom, JaeWoong Chung, Lance Hammond, Christos Kozyrakis, and Kunle Olukotun Computer Systems Laboratory Stanford University http://tcc.stanford.edu TAPE: A Transactional Application Profiling Environment ICS 2005

  2. Optimizing Parallel Performance • CMPs are here but parallel programming is still difficult � Need correct and fast parallel executables • Transactional memory simplifies correct parallel programming � No locks � Speculative parallelization • The Issue is now performance tuning • TAPE: a system for performance profiling of transactional applications � Expressive: tracks all performance bottlenecks � Accurate: identifies bottleneck location in source code � Easy to use: leads to optimal performance in few tuning steps � Low overhead: negligible area & performance cost • TAPE allows for continuous profiling, even on production runs TAPE: A Transactional Application Profiling Environment ICS 2005

  3. TCC Architecture for Transactional Execution Transactions Start Transaction Request Control Bits Commit Read, Modified, etc Write Token Buffer Commit Commit TAPE Control HW Commit Transaction Timeline TAPE: A Transactional Application Profiling Environment ICS 2005

  4. Out-of-the-box TCC Performance Initial Benchmark runtime for 8 processor CMP 100 N orm alized Execution Tim e 87.5 75 62.5 Ideal Time 50 37.5 25 12.5 0 art equake lufact moldyn mp3d quicksort radix swim tomcatv • Initial parallelization is quick and easy • Performance tuning is critical TAPE: A Transactional Application Profiling Environment ICS 2005

  5. Performance Bottlenecks • Dependency violations � Due to speculative nature of execution • Buffer overflows � Transaction’s state does not fit in cache • Workload imbalance � Transactions are assigned disproportionate amount of work • Transactional API overhead � Overhead of starting, committing, and aborting transactions TAPE: A Transactional Application Profiling Environment ICS 2005

  6. Dependency Violations Time Commit CPU 1 Write X Restarts Transaction Read X CPU 2 Useful Arbitrate + commit Idle Violations TAPE: A Transactional Application Profiling Environment ICS 2005

  7. Buffer Overflows Time Commit Overflow Overflow CPU 1 CPU 2 Commit Useful Arbitration + Commit TAPE: A Transactional Application Profiling Environment ICS 2005

  8. Initial Performance Results - 8 processors Useful Idle Arbitration + Commit Violations Initial Benchmark runtime Normalized Execution Time 100 87.5 75 62.5 50 Ideal Time 37.5 25 12.5 0 t v t n t x e d m c r r t y i a k 3 a o a d i d w a p s f a c u l u m k o r s m l q c m o i e u t q TAPE: A Transactional Application Profiling Environment ICS 2005

  9. Outline • Motivation • TAPE system overview • Example: Violation Profiling � Information gathering and filtering � Using profile information for optimizations • Evaluation • Conclusions TAPE: A Transactional Application Profiling Environment ICS 2005

  10. Key Insights 1. Leverage hardware for transactional execution � Already monitoring everything � TAPE operations can be amortized at commit time 2. Repeatability of bottlenecks � Critical performance bottlenecks occur repeatedly � Data aggregation saves space without losing accuracy � TAPE automatically filters out infrequent bottlenecks TAPE: A Transactional Application Profiling Environment ICS 2005

  11. TAPE System Overview � � • Online – Hardware ���������� � Each CPU gathers profile data in � ��� ���� private buffers �������� �������� � Bottlenecks aggregated over ������ ��� multiple occurrences �������� ����� � Infrequent bottlenecks filtered out "!#������ ����� � Data periodically flushed to pre- ���������� allocated memory regions ������� ������� • Offline – Software ��� � Combine information from all ��� �!��� CPUs � Rank bottleneck by cost � Format profiling output & relate data to source code TAPE: A Transactional Application Profiling Environment ICS 2005

  12. Profiling Violations CPU 1 CPU 2 • CPU-1 writes address X • CPU-2 read address X Write X Core TVB • CPU-1 commits first Read X • CPU-2 detects violation on X PVB � Inserts entry in Transaction CPU 2 Violation Buffer • CPU 2 restarts transaction L1 Cache � Re-reads address X � Sends read PC 2 to TVB Violation Violation Detection • CPU 2 commits Read x � Most costly violations flushed to Period Violation buffer Network Commit � Others may get evicted Wasted Read PC TPC Object addr Work • PVB can be flushed periodically PC t 500 X PC 2 TAPE: A Transactional Application Profiling Environment ICS 2005

  13. Example of Interaction with TAPE 1: int* data = load_data(); /* input * 2: int i, buckets[101], sum = 0; 3: 4: t_for_n (i = 0; i < 10000; i++; 500 ) { 4: t_for_n (i = 0; i < 10000; i++; 50 ) { 5: 5: pSum[TCC_getMyID()] += data[i]; sum += data[i]; 6: buckets[data[i]]++; 7: } Violations 8: 8: for i = 0 to num_procs: sum += pSum[i]; 9: print_buckets(buckets); /* output */ TAPE: A Transactional Application Profiling Environment ICS 2005

  14. Evaluation Methodology • 8-core CMP processor � Bus interconnected to shared L2 cache � Transactional buffering in private L1 caches (32 Kbytes) � Execution driven simulation with accurate contention modeling • Applications: SPEC2K FP and SPLASH-2 benchmarks � See ASPLOS’04 for transactional programming details • Questions � Ease of performance tuning with TAPE? � TAPE buffer size requirements � TAPE performance overhead TAPE: A Transactional Application Profiling Environment ICS 2005

  15. Performance Improvements for 8 Processors Useful Idle Arbitration + Commit Violations 100 Normalized Execution Time 87.5 75 62.5 Ideal 50 Line 37.5 25 12.5 0 Rechunk Rechunk Rechunk Rechunk Rechunk Rechunk Initial Privatize Initial Privatize Initial Privatize Initial Privatize Initial Privatize Initial Privatize Initial Initial Unordered Initial Split art equake moldyn radix swim tomcatv mp3d quicksort lufact • A maximum of two steps were required to fully optimize applications • The programmer is directed to the source of the bottlenecks in the actual code TAPE: A Transactional Application Profiling Environment ICS 2005

  16. The Cost of TAPE • Low Chip area cost � Proposed design point requires less than 5K SRAM bits, and 244 CAM bits per core � Less than 1% of overall chip area • Low performance impact � Maximum slowdown of only 1.84% (Average was 0.28%) � Allows for continuous profiling, even on production runs � Maximum BW usage was 0.11% • Memory Usage � On average only 1MB/hr of data generated TAPE: A Transactional Application Profiling Environment ICS 2005

  17. Conclusions • TAPE: a profiling system for transactional applications � Support easy performance tuning � Complement correctness benefits of transactions • Key features � Expressive: tracks all performance bottlenecks � Accurate: identifies bottleneck location in source code � Easy to use: leads to optimal performance in few tuning steps � Low overhead: negligible area & performance cost � Allows for continuous profiling, even on production runs TAPE: A Transactional Application Profiling Environment ICS 2005

  18. Thanks For listening http://tcc.stanford.edu TAPE: A Transactional Application Profiling Environment ICS 2005

Recommend


More recommend