Presentation is loading. Please wait.

Presentation is loading. Please wait.

1 现代计算机体系结构 主讲教师:张钢 教授 天津大学计算机学院 通信邮箱: 提交作业邮箱: 2015 年.

Similar presentations


Presentation on theme: "1 现代计算机体系结构 主讲教师:张钢 教授 天津大学计算机学院 通信邮箱: 提交作业邮箱: 2015 年."— Presentation transcript:

1 1 现代计算机体系结构 主讲教师:张钢 教授 天津大学计算机学院 通信邮箱: gzhang@tju.edu.cn 提交作业邮箱: tju_arch@163.com 2015 年

2 2 The Main Contents 课程主要内容 Chapter 1. Fundamentals of Quantitative Design and Analysis Chapter 2. Memory Hierarchy Design Chapter 3. Instruction-Level Parallelism and Its Exploitation Chapter 4. Data-Level Parallelism in Vector, SIMD, and GPU Architectures Chapter 5. Thread-Level Parallelism Chapter 6. Warehouse-Scale Computers to Exploit Request-Level and Data-Level Parallelism Appendix C. Pipelining: Basic and Intermediate Concepts

3 3 Copyright © 2012, Elsevier Inc. All rights reserved.

4 4

5 5

6 6

7 7

8 8

9 9

10 10 Copyright © 2012, Elsevier Inc. All rights reserved.

11 11 Copyright © 2012, Elsevier Inc. All rights reserved.

12 12 Copyright © 2012, Elsevier Inc. All rights reserved.

13 13 Copyright © 2012, Elsevier Inc. All rights reserved. Introduction Warehouse-scale computer (WSC) Provides Internet services Search, social networking, online maps, video sharing, online shopping, email, cloud computing, etc. Differences with HPC “clusters”: Clusters have higher performance processors and network Clusters emphasize thread-level parallelism, WSCs emphasize request-level parallelism Differences with datacenters: Datacenters consolidate different machines and software into one location Datacenters emphasize virtual machines and hardware heterogeneity in order to serve varied customers Introduction

14 14 Copyright © 2012, Elsevier Inc. All rights reserved. Introduction Important design factors for WSC: Cost-performance Small savings add up Energy efficiency Affects power distribution and cooling Work per joule Dependability via redundancy Network I/O Interactive and batch processing workloads Ample computational parallelism is not important Most jobs are totally independent “Request-level parallelism” Operational costs count Power consumption is a primary, not secondary, constraint when designing system Scale and its opportunities and problems Can afford to build customized systems since WSC require volume purchase Flipside: failures Introduction

15 15 Copyright © 2012, Elsevier Inc. All rights reserved. Prgrm’g Models and Workloads Batch processing framework: MapReduce Map: applies a programmer-supplied function to each logical input record Runs on thousands of computers Provides new set of key-value pairs as intermediate values Reduce: collapses values using another programmer-supplied function Programming Models and Workloads for WSCs

16 16 Copyright © 2012, Elsevier Inc. All rights reserved. Prgrm’g Models and Workloads Example: map (String key, String value): // key: document name // value: document contents for each word w in value EmitIntermediate(w,”1”); // Produce list of all words reduce (String key, Iterator values): // key: a word // value: a list of counts int result = 0; for each v in values: result += ParseInt(v); // get integer from key-value pair Emit(AsString(result)); Programming Models and Workloads for WSCs

17 17 Copyright © 2012, Elsevier Inc. All rights reserved. Prgrm’g Models and Workloads MapReduce runtime environment schedules map and reduce task to WSC nodes Availability: Use replicas of data across different servers Use relaxed consistency: No need for all replicas to always agree Workload demands Often vary considerably Programming Models and Workloads for WSCs

18 18 Copyright © 2012, Elsevier Inc. All rights reserved. Computer Architecture of WSC WSC often use a hierarchy of networks for interconnection Each 19” rack holds 48 1U servers connected to a rack switch Rack switches are uplinked to switch higher in hierarchy Uplink has 48 / n times lower bandwidth, where n = # of uplink ports “Oversubscription” Goal is to maximize locality of communication relative to the rack Computer Architecture of WSC

19 19 Computer Architecture of WSC Copyright © 2012, Elsevier Inc. All rights reserved.

20 20 Copyright © 2012, Elsevier Inc. All rights reserved. Storage Storage options: Use disks inside the servers, or Network attached storage through Infiniband WSCs generally rely on local disks Google File System (GFS) uses local disks and maintains at least three replicas Computer Architecture of WSC

21 21 Copyright © 2012, Elsevier Inc. All rights reserved. Array Switch Switch that connects an array of racks Array switch should have 10 X the bisection bandwidth ⌘ of rack switch Cost of n-port switch grows as n 2 Often utilize content addressable memory chips and FPGAs ⌘ worst-case internal bandwidth Computer Architecture of WSC

22 22 Copyright © 2012, Elsevier Inc. All rights reserved. WSC Memory Hierarchy Servers can access DRAM and disks on other servers using a NUMA-style interface Computer Architecture of WSC

23 23 WSC Memory Hierarchy 注:书中的图标注有问题 Copyright © 2012, Elsevier Inc. All rights reserved.

24 24 WSC Memory Hierarchy – Example I What is the average latency assuming that 90% of accesses are local to the server, 9% are outside the server but local to the rack, and 1% are outside the rack but within the array? (90%x0.1)+(9%100)+(1%x300)=12.09 msec Copyright © 2012, Elsevier Inc. All rights reserved.

25 25 WSC Memory Hierarchy – Example II How long does it take to transfer 1000MB between disks within the server, between servers in the rack, and between servers in different racks of an array? Within server: 1000/200=5 sec Within rack: 1000/100=10 sec Within array: 1000/10= 100 sec Copyright © 2012, Elsevier Inc. All rights reserved.

26 26 Copyright © 2012, Elsevier Inc. All rights reserved. Infrastructure and Costs of WSC Location of WSC Proximity to Internet backbones, electricity cost, property tax rates, low risk from earthquakes, floods, and hurricanes Power distribution Physcical Infrastrcuture and Costs of WSC

27 27 Copyright © 2012, Elsevier Inc. All rights reserved. Infrastructure and Costs of WSC Cooling Air conditioning used to cool server room 64F-71F (18C-22C) Keep temperature higher (closer to 71 F) Cooling towers can also be used Minimum temperature is “wet bulb temperature” Physcical Infrastrcuture and Costs of WSC

28 28 Copyright © 2012, Elsevier Inc. All rights reserved. Infrastructure and Costs of WSC Cooling system also uses water (evaporation and spills) E.g. 70,000 to 200,000 gallons per day for an 8 MW facility Power cost breakdown: Chillers: 30-50% of the power used by the IT equipment Air conditioning: 10-20% of the IT power, mostly due to fans How many servers can a WSC support? Each server: “Nameplate power rating” gives maximum power consumption To get actual, measure power under actual workloads Oversubscribe cumulative server power by 40%, but monitor power closely Physcical Infrastrcuture and Costs of WSC

29 29 Copyright © 2012, Elsevier Inc. All rights reserved. Measuring Efficiency of a WSC Power Utilization Effectiveness (PUE) = Total facility power / IT equipment power Median PUE on 2006 study was 1.69 Performance Latency is important metric because it is seen by users Bing study: users will use search less as response time increases Service Level Objectives (SLOs)/Service Level Agreements (SLAs) E.g. 99% of requests be below 100 ms Physcical Infrastrcuture and Costs of WSC

30 30 Measuring Efficiency of a WSC Negative impact of delays at Bing search server on user behavior Copyright © 2012, Elsevier Inc. All rights reserved.

31 31 Copyright © 2012, Elsevier Inc. All rights reserved. Cost of a WSC Capital expenditures (CAPEX) Cost to build a WSC Example: 8 MW facility 46,000 servers $88 M for facility $67M for servers $13M for networking equipment PUE: 1.45 Operational expenditures (OPEX) Cost to operate a WSC Physcical Infrastrcuture and Costs of WSC

32 32 Copyright © 2012, Elsevier Inc. All rights reserved. Cloud Computing WSCs offer economies of scale that cannot be achieved with a datacenter: 5.7 times reduction in storage costs 7.1 times reduction in administrative costs 7.3 times reduction in networking costs This has given rise to cloud services such as Amazon Web Services “Utility Computing” Based on using open source virtual machine and operating system software Cloud Computing

33 33 What is Cloud Computing? A modality of computing characterized by on demand availability of resources in a dynamic and scalable fashion. resource = infrastructure, platforms, software, services, or storage. The cloud provider is responsible to make the resources available on demand to the cloud users. the cloud provider must manage its resources in an efficient way so that the user needs can be met when needed at the desired QoS level. Copyright © 2012, Elsevier Inc. All rights reserved.

34 34 Advantages of Cloud Computing Pay as you go. No need to provision for peak loads. Time to market. Consistent performance and availability. Copyright © 2012, Elsevier Inc. All rights reserved.

35 35 Potential Drawbacks of Cloud Computing Privacy and security. External dependency for mission critical applications. Disaster recovery. Monitoring and Enforcement of SLAs. Service Level Agreements Copyright © 2012, Elsevier Inc. All rights reserved.

36 36 Amazon Web Services Virtual Machines x-86 commodity computers Linux OS Xen virtual machine Very low cost $0.10 per hour per instance in 2006 An instance = one Virtual Machine Allocated two instances per core on a multicore server 1.0-1.2GHz AMD Opteron / Intel Xeon Reliance on open source software No guarantee of service No contract required Copyright © 2012, Elsevier Inc. All rights reserved.

37 37 Amazon Web Services Price and characteristics Copyright © 2012, Elsevier Inc. All rights reserved.

38 38 Containers Google customizes a standard 1AAA container: 40 x 8 x 9.5 feet (12.2 x 2.4 x 2.9 meters). Copyright © 2012, Elsevier Inc. All rights reserved.

39 39 Containers Airflow within the container Server for Google WSC Copyright © 2012, Elsevier Inc. All rights reserved.

40 40 Containers Copyright © 2012, Elsevier Inc. All rights reserved.

41 41 Copyright © 2012, Elsevier Inc. All rights reserved.

42 42 Copyright © 2012, Elsevier Inc. All rights reserved.

43 43 作业 10: 1. pp 477, 6.1 Copyright © 2012, Elsevier Inc. All rights reserved.

44 44 Copyright © 2012, Elsevier Inc. All rights reserved.

45 45 3. pp 485, 6.22 Copyright © 2012, Elsevier Inc. All rights reserved.

46 46 3. 阅读 : Appendix C Copyright © 2012, Elsevier Inc. All rights reserved.


Download ppt "1 现代计算机体系结构 主讲教师:张钢 教授 天津大学计算机学院 通信邮箱: 提交作业邮箱: 2015 年."

Similar presentations


Ads by Google