Fast and Accurate Microarchitectural Simulation of Thousand-Core Systems

Fast and Accurate Microarchitectural Simulation of Thousand-Core Systems

ZSim: Fast and Accurate Microarchitectural Simulation of Thousand-Core Systems The MIT Faculty has made this article openly available. Please share how this access benefits you. Your story matters. Citation Sanchez, Daniel, and Christos Kozyrakis. “ZSim: Fast and Accurate Microarchitectural Simulation of Thousand-Core Systems.” Proceedings of the 40th Annual International Symposium on Computer Architecture - ISCA ’13 (2013), Tel-Aviv, Israel, June 23-27, 2013, ACM, p.475-486. As Published http://dx.doi.org/10.1145/2485922.2485963 Publisher Association for Computing Machinery Version Author's final manuscript Citable link http://hdl.handle.net/1721.1/90820 Terms of Use Creative Commons Attribution-Noncommercial-Share Alike Detailed Terms http://creativecommons.org/licenses/by-nc-sa/4.0/ ZSim: Fast and Accurate Microarchitectural Simulation of Thousand-Core Systems Daniel Sanchez Christos Kozyrakis Massachusetts Institute of Technology Stanford University [email protected] [email protected] ABSTRACT slower. For example, gem5, Flexus, and MARSS [4, 29, 51] Architectural simulation is time-consuming, and the trend achieve simulation speeds of about 200 KIPS. At this speed, towards hundreds of cores is making sequential simulation it takes around eight hours to simulate one core for a second. even slower. Existing parallel simulation techniques either Simulating a thousand-core chip for one second would take scale poorly due to excessive synchronization, or sacrifice ac- almost a year. curacy by allowing event reordering and using simplistic con- Ideally, a simulator should satisfy four desirable proper- tention models. As a result, most researchers use sequential ties: it should be accurate, fast, execute a wide range of simulators and model small-scale systems with 16-32 cores. workloads, and be easy to use and modify. Sequential soft- With 100-core chips already available, developing simulators ware simulators are not fast enough for large-scale multi-core that scale to thousands of cores is crucial. chips. The two main alternatives, FPGA-based simulators We present three novel techniques that, together, make and parallel software simulators, make different trade-offs, thousand-core simulation practical. First, we speed up de- but none of them satisfies all four requirements. FPGA- tailed core models (including OOO cores) with instruction- based simulation frameworks are fast and accurate [12, 47], driven timing models that leverage dynamic binary trans- but they take significant effort to develop and use. Paral- lation. Second, we introduce bound-weave, a two-phase lel simulation seems a natural fit for highly parallel chips, parallelization technique that scales parallel simulation on but poses significant difficulties as well. Simulators based on multicore hosts efficiently with minimal loss of accuracy. parallel discrete event simulation (PDES) [10, 34] suffer from Third, we implement lightweight user-level virtualization poor scalability due to frequent synchronization. Other par- to support complex workloads, including multiprogrammed, allel simulators [8, 27] relax synchronization requirements client-server, and managed-runtime applications, without to achieve scalability. In doing so, they allow microarchitec- the need for full-system simulation, sidestepping the lack tural events to occur out of order, sacrificing accuracy and of scalable OSs and ISAs that support thousands of cores. making it difficult to model the actual behavior of contented We use these techniques to build zsim, a fast, scalable, resources such as shared caches and memory controllers. As and accurate simulator. On a 16-core host, zsim models a a result, most researchers still use sequential simulators and 1024-core chip at speeds of up to 1,500 MIPS using simple limit their studies to architectures with 16-32 cores. With cores and up to 300 MIPS using detailed OOO cores, 2-3 or- chips that feature hundreds of threads and cores already on ders of magnitude faster than existing parallel simulators. the market [45, 48], developing simulation techniques that Simulator performance scales well with both the number scale efficiently into the thousands of cores is critical. of modeled cores and the number of host cores. We vali- In this paper, we introduce three techniques that, to- date zsim against a real Westmere system on a wide variety gether, enable fast, accurate, and scalable simulation: of workloads, and find performance and microarchitectural 1. We speed up sequential simulation by 1-2 orders of magni- events to be within a narrow range of the real system. tude by developing instruction-driven timing models that leverage dynamic binary translation (DBT) to perform most of the work in a core’s timing model during program 1. INTRODUCTION instrumentation, reducing the overheads of conventional Computer architects rely extensively on simulation to ex- cycle-driven or event-driven core models. As a result, plore and evaluate future architectures. Unfortunately, ac- we can simulate a Westmere-class OOO core including curate microarchitectural simulation is time-consuming, and features such as branch prediction, limited fetch and is- the trend towards chip-multiprocessors with a large number sue widths, and µop fission, at 20 MIPS, 10-100× faster of cores is making conventional sequential simulators even than conventional simulators. We can also run a simpler IPC = 1 core model at up to 90 MIPS. 2. We introduce bound-weave, a two-phase parallelization al- gorithm that scales parallel simulation without significant Permission to make digital or hard copies of all or part of this work for overheads or loss of accuracy. We observe that, over small personal or classroom use is granted without fee provided that copies are not made or distributed for profit or commercial advantage and that copies intervals of a few hundreds to thousands of cycles, instruc- bear this notice and the full citation on the first page. To copy otherwise, to tions from different cores interact timing-wise on shared republish, to post on servers or to redistribute to lists, requires prior specific resources, but their interactions rarely affect the microar- permission and/or a fee. chitectural components accessed by each instruction (e.g., ISCA ’13 Tel-Aviv, Israel the caches accessed to serve a miss). We exploit this in- Copyright 2013 ACM 978-1-4503-2079-5/13/06 ...$15.00. 1 Simulator Engine Parallelization Detailed core Detailed uncore Full Multiprocess Managed system apps apps gem5/MARSS Emulation Sequential OOO Yes Yes Yes Yes CMPSim DBT Limited skew No MPKI only No Yes No Graphite DBT Limited skew No Approx contention No No No Sniper DBT Limited skew Approx OOO Approx contention No Trace-driven only No HORNET Emulation PDES (p) No Yes No Trace-driven only No SlackSim Emulation PDES (o+p) OOO Yes No No No ZSim DBT Bound-weave DBT-based OOO Yes No Yes Yes Table 1: Comparison of microarchitectural simulators: techniques, timing models, and supported workloads. sight by dividing parallel simulation in two phases. We Simulation techniques can be classified along many dimen- first simulate cores in parallel for an interval of a few thou- sions: user-level vs full-system; functional vs timing; trace- sand cycles, ignoring contention and using zero-load (i.e., driven vs execution-driven; cycle-driven vs event-driven [26]. minimum) latencies for all memory accesses, and record We focus on execution-driven, timing simulators, which are a trace of memory accesses (including caches accessed, the preeminent tool for evaluation of future designs [1]. With invalidations, etc.). In the second phase, we perform par- the goals of high sequential performance, scalability, accuracy allel, event-driven simulation of the interval to determine and usability in mind, we categorize simulation techniques the actual latencies. Since the possible interactions be- along the axes discussed in the following paragraphs. We tween memory accesses are known from the first phase, focus on techniques instead of simulators; each simulator this timing simulation incurs much lower synchronization implements a different mix or variation of these techniques. overheads than conventional PDES techniques, while still Table 1 compares the key characteristics and features of rep- being highly accurate. resentative, current simulators. 3. Due to the lack of scalable OS or ISA support beyond tens Emulation vs instrumentation: The choice between em- of cores, thousand-core simulations must be user-level ulation and instrumentation is a crucial factor for simulation for now. However, user-level simulators support a lim- performance. An emulation-based simulator decodes each ited range of workloads. We implement lightweight user- instruction and invokes both functional and timing models level virtualization, a technique that uses DBT to give with some coordination between the two [26]. Emulation is user processes a virtualized system view, enabling sup- the natural choice when the simulated ISA is different from port for multiprogrammed, managed-runtime, and client- the host’s, and many simulators choose it to be portable. server workloads that are beyond the realm of conven- gem5 [4, 5, 25], Flexus [51] and MARSS [29] are current tional user-level simulators. representative emulation-based systems. They can simulate We use these three techniques to build zsim, a parallel up to 200 KIPS with detailed core and memory models and multicore simulator designed from the ground up to lever- up to few MIPS with simpler timing models. age the capabilities

View Full Text

Details

  • File Type
    pdf
  • Upload Time
    -
  • Content Languages
    English
  • Upload User
    Anonymous/Not logged-in
  • File Pages
    13 Page
  • File Size
    -

Download

Channel Download Status
Express Download Enable

Copyright

We respect the copyrights and intellectual property rights of all users. All uploaded documents are either original works of the uploader or authorized works of the rightful owners.

  • Not to be reproduced or distributed without explicit permission.
  • Not used for commercial purposes outside of approved use cases.
  • Not used to infringe on the rights of the original creators.
  • If you believe any content infringes your copyright, please contact us immediately.

Support

For help with questions, suggestions, or problems, please contact us