windows server 2008 r2 dev session 02

Post on 09-May-2015

1.228 Views

Category:

Technology

1 Downloads

Preview:

Click to see full reader

DESCRIPTION

Windows Server 2008 R2 for Developers Session 2 from the New Efficiency launch tour.

TRANSCRIPT

CLINT EDMONSONARCHITECT EVANGELIST

CLINTED@MICROSOFT.COM

Windows® Server 2008 R2: Develop With New Parallel Computing Technologies

Agenda

Why parallel computing?

The Shift!

The Platform!

The Process!

The Tools!

Moore’s LawOur Old Friend Gordon Moore

From http://www.intel.com/technology/mooreslaw/ “The number of transistors on a chip will double

about every 2 years” Typically manifested as clock-speed increases We mistakenly associate Moore’s Law with CPU

speed

Why Can’t We Continue to Scale Up?Heat! Increased clock speed == increases power usage Increased power usage == increased heat output

Image courtesy of http://www.phys.ncku.edu.tw/~htsu/humor/fry_egg.html

Multi-core Two or more independent cores (or CPUs) Homogenous architecture May be integrated onto a single integrated circuit die May be integrated onto multiple dies in a single chip

package

Many-core Number of processors exceeds traditional multi-processor

techniques Heterogeneous architecture All cores share resource and services like memory and disk

access

Solution: Scale OutMulti-core / Many-core

The Free Lunch is Over

Platform must manage resources effectively Programs must be written differently

More than just managing threads Applications must scale up or down

How to Program for Parallel ComputingThe “Many-core Shift”

Agenda

Parallel computing platform

The Platform!

The Process!

The Tools!

The Shift!

Windows Server 2008 R2Platform Hardware Trends

Virtualization

Power Efficiency

64-bitMulticore & NUMA

Helpful Terminology

Logical processor (a.k.a. thread execution engine)

Core A processing unit With hyper-threading, it can consists of 2 or 4 logical

processors

Socket (a.k.a. processor, package, CPU) Physical processor Consists of one or more cores

NUMA node Set of logical processors and cache that are close to one

another

Group 1 or more NUMA nodes Set of up to 64 processors

Group

NUMA Node

NUMA Node

Socket Socket

Windows Organizes Many-Cores via GroupNew with Windows 7 and Windows Server 2008 R2

Core Core

Core Core

LP LP

LP LP

NUMA = Non-Uniform Memory Access

LP = Logical Processor

Processor GroupsGroups, 4 Nodes, 8 Sockets, 32 Cores, 4 LPs/Core = 128 LPs

Group

NUMA Node

Socket SocketCore Core

Core Core

Core Core

Core Core

LP LP

LP LP

LP LP

LP LP

LP LP

LP LP

LP LP

LP LP

LP LP

LP LP

LP LP

LP LP

LP LP

LP LP

LP LP

LP LP

NUMA Node

Socket SocketCore Core

Core Core

Core Core

Core Core

LP LP

LP LP

LP LP

LP LP

LP LP

LP LP

LP LP

LP LP

LP LP

LP LP

LP LP

LP LP

LP LP

LP LP

LP LP

LP LP

Group

NUMA Node

Socket SocketCore Core

Core Core

Core Core

Core Core

LP LP

LP LP

LP LP

LP LP

LP LP

LP LP

LP LP

LP LP

LP LP

LP LP

LP LP

LP LP

LP LP

LP LP

LP LP

LP LP

NUMA Node

Socket SocketCore Core

Core Core

Core Core

Core Core

LP LP

LP LP

LP LP

LP LP

LP LP

LP LP

LP LP

LP LP

LP LP

LP LP

LP LP

LP LP

LP LP

LP LP

LP LP

LP LP

Windows on 256 ProcessorsA SQL Server Transaction Processing

Workload

video

Agenda

Introducing parallelism into your applications

The Process!

The Tools!

The Shift!

The Platform!

Visual Studio 2010 (.NET Developer)Tools, Programming Models, RuntimesTools Programming Models

.NET Parallel Extensions

.NET Runtime

Parallel LINQ(PLINQ)

Resource Manager

Task Scheduler

Managed Library

Threads Pools

Data

Str

uct

ure

s

Tools

ParallelDebugger

Tool Windows

ParallelProfilerAnalysis

Task ParallelLibrary

Demystifying Parallel ProgrammingParallel Extensions Make It Easy

demo

3 Ways to Express Parallelism in Your Apps Imperative Task Parallelism (fine grained) Imperative Data Parallelism (structured) Declarative Data Parallelism (PLINQ)

Imperative Task Parallelism

Fine-grained parallelism Express potential parallelism via expressions and

statements that take the form of lightweight tasks

You have fine-grained control Semantic is similar to how threads and the

threadpool work today

Imperative Data Parallelism

Structured parallelism Mechanisms used to express common imperative

data-oriented operations For loops For each loop Invoke

Think in terms of blocks of code Parallelize loops

Declarative Data Parallelism

PLINQ Implementation of LINQ-to-objects that

execute queries in parallel Express what you want to accomplish, rather

than how you want to accomplish it Minimal impact to existing queries

Agenda

Visual Studio 2010

The Tools!

The Shift!

The Platform!

The Process!

Two new debugger tool windows: “Parallel Tasks” “Parallel Stacks”

Debugging Parallel ApplicationsNew in Visual Studio® 2010

Demystifying Parallel ProgrammingDebugging A Parallel Application

demo

Parallel Performance AnalyzerCore Utilization View Profiling tools support multi-core/parallel

execution Identify parallelism opportunities Enable performance tuning for parallel apps

Improving the productivity of parallel development and performance tuning Integrated with the IDE Providing better visualizations Showing temporal relationships Illustrating Interactions with OS, libraries and

I/O Exposing causes of inefficiency Providing actionable data by linking behavior to

source code whenever possible

Analysis Views Core utilization and concurrency Thread blocking Cross-core thread migration

Platforms Windows Vista ®, Server 2008,

and Windows 7 32 and 64-bit Native and managed

environments

Number of cores

Your process

Idle time

Other processes

Core Utilization / Concurrency

View

Parallel Performance AnalyzerThread Blocking View

Thread execution breakdown

Detailed thread analysis

(one channel per thread)

Legend

Hide uninteresting

threads

Measure time for interesting segments

Zoom in and out

Parallel Performance AnalyzerCore Execution / Thread Migration View

Each core in a swim lane One color per

thread

Red indicates cross-core migrations

This thread migrates across

all four cores

Start learning to think in parallel Consider how your solution will scale on

multi-core systems Utilize the parallel programming platform

and tools to maximize your application scalability

SummaryCall-to-Action

Learn More About Windows Server 2008 R2

Resources

Microsoft.com http://www.microsoft.com/windowsserver2008/en/us/

R2.aspx

MSDN Concurrency Developer Center http://msdn.microsoft.com/concurrency

Developer Team Blogs http://blogs.msdn.com/nativeconcurrency http://blogs.msdn.com/pfxteam http://blogs.technet.com/winserverperformance http://www.danielmoth.com/Blog/labels/

ParallelComputing.html

Visual Studio 2010 with MSDNand The Ultimate Offer

Presenter Name Jerry FlynnPresenter Title Developer Solution Specialist

Microsoft Corporation

presenter Email jerryfl@microsoft.com

© 2009 Microsoft Corporation. All rights reserved. The information herein is for informational purposes only and represents the current view of Microsoft Corporation as of the date of this presentation. Because Microsoft must respond to changing market conditions, it should not be interpreted to be a commitment on the part of Microsoft, and Microsoft cannot guarantee the accuracy of any information provided after the

date of this presentation. MICROSOFT MAKES NO WARRANTIES, EXPRESS, IMPLIED OR STATUTORY, AS TO THE INFORMATION IN THIS PRESENTATION.

top related