SYMP02: Architecting Scalable and Responsive Applications

homelybrrrInternet and Web Development

Dec 4, 2013 (3 years and 10 months ago)

98 views


John
Feo


Architect


Microsoft
Corporation

SYMP02

Bad sequential code will run faster on a faster processor

Bad parallel code
WILL NOT
run faster on more cores

0
0.5
1
1.5
2
2.5
3
1
2
4
8
16
32
Speedup

Speedup
Just using parallel code is not enough






(throughput)




(capability)









Memory

CPU

Memory

CPU

Memory

CPU

Memory

CPU














Optimize for critical resource


too much
parallelism may
increase
communication/
synchronization
costs

watch out
for resources
consumed
by waiting
tasks

over
decompose

to improve
load
balance

rely on MS
runtime to
schedule
and manage
threads

decompose to
scale with
problem size and
processor count


Audio

Video

UI

Network

Avatars

Weapons

Vehicles















































































































G(V, E)
s
t
s
t

s
t








3

1

6

4

8

s

2

s

1 3 5

2 4 6 8

7 9 t

5

9

A

D

B

C

E

t

7





























3

1

6

4

8

s

2

s

5

9

A

D

B

C

E

t

7

1

3

5

2

4

6

8

9

7

t



























Bad sequential code will run faster on a faster processor

Bad parallel code
WILL NOT

run faster on more cores

MSDN.com/concurrency

And download Parallel Extensions to the
.NET Framework!



Jerry Bautista, PhD


Director, Microprocessor
Technology Management

Intel Corporation




SOCIAL

NETWORKING

USER
-

GENERATED

CONTENT

VISUAL

COMPUTING

BROADBAND

CONNECTIVITY

MOBILE

COMPUTING

Look real

Act real

Feel real
Applications that use every available FLOP
Bringing VC to connected usage models

3D Digital Entertainment

Virtual Worlds

Creating new

digital worlds

Multiplayer Games

Internet
Data
People
Everywhere
The Actual
World
CONNECTED
CONNECTED
CONNECTED
Rich
Visual
Interfaces
LIMITED

RICH

Better content quality, social
interaction


a better user experience

Static

Web

Web 2.0

CVC

Real
-
world data

visualization

Enhancing the

actual world

Earth Mapping

Augmented Reality

Social networking, collaboration, online gaming, online retail, and more.

All company and/or product names may be trade names, trademarks and/or registered trademarks of
the respective owners with which they are associated.

Virtual

Worlds

Multiplayer Online
Games


3D Cinema


Realistic, representative visuals both
professional and user
-
generated


Socialization, education,
entertainment, collaboration

West Nile Virus

Visualization

Visualizing Real

World Information

--

Dust storm in Morocco

Virtual Colonoscopy

Sharing data and representing data
in richer, more intuitive ways.

OpenSim

N
-
body Simulation

All company and/or product names may be trade names, trademarks and/or registered trademarks of
the respective owners with which they are associated.

Virtual team rooms

Enterprise
-
class environments to allow virtual
teams to have
realistic, natural
interactions

Virtual information environments

Information space for documents,

app
-
sharing, and visualizations

Combines real world info with data
overlays
Virtual Instruction

Mobile

Augmented Reality (MAR) particularly compelling

Text

Overlays


2D/3D Visual

Overlays


Visual

Search


Map

Hybrids


Today

2010

2012

2014

Location Information

Identification &

Hyperlinking

Translation

Platform

Optimization


Server, client demands


Network performance


Energy
-
efficiency

Distributed Computing


Scaling


Client diversity


Programmability

Visual Content


Interoperability


User creation

Mobile Experience


Better connectivity, BW


Sensor integration







richness

complexity

interaction

complexity

SERVERS:
10x More Work

75%+ Time = Compute Intensive Work

TYPE

SOFTWARE

MAX CLIENTS

PER

SERVER

MMORPGS

VWs

Second Life

160

WoW

2500

CLIENTS:
3x CPU, 20x GPU

65
%+ Time = Compute Intensive Work

Second Life

70

35
-
75

NETWORK:
100x Bandwidth

Maximum Bandwidth Limited by

Server to Client


0
50
10
0
25
50
75
100
125
150
Time (In Seconds)
Bandwidth
(In KB/s))
Cached
Uncached
Sources:
WoW

data (source www.warcraftrealms.com), Second Life data (source Intel Linden Labs CTO
-
CTO meeting and
www.secondlife.com), and Intel measurements.

APPLICATION

% CPU

UTILIZATION

% GPU

UTILIZATION

2D Websites

20

0
-
1

Google Earth

50

10
-
15

0
16
32
48
64
0
16
32
48
64
Cores
Parallel Speedup
Production Fluid
Production Face
Production Cloth
Game Fluid
Game Rigid Body
Game Cloth
Marching Cubes
Sports Video Analysis
Video Cast Indexing
Home Video Editing
Text Indexing
Ray Tracing
Foreground Estimation
Human Body Tracker
Portifolio Management
Geometric Mean
Graphics Rendering


Physical Simulation
--

Vision


Data Mining
--

Analytics


Intel
® Thread Checker

Intel® Threading Building
Blocks

Intel thread checker is an analysis tool that
pinpoints hard
-
to
-
find threading errors like data
races and deadlocks in 32
-
bit and 64
-
bit
applications.


Intel
® Thread Building Blocks

Intel threading building blocks (Intel TBB) is a C++
runtime library that abstracts the low
-
level
threading details necessary for optimal
multicore

performance. implementation work.

Smoke

A game framework to maximize core utilization




*Other names and brands may be claimed as the property of others.

The Framework

How is the Smoke highly threaded?


Engine

Managers

Framework

Scheduler

Parser

Environment

Service

Platform

Task

Scene CC

Object CC

UScene

UObject

UObject




Systems


Definition
Files



Interfaces

System

1.
Scheduler

manages
system
jobs


2.
Change
Control
(CC)
Manager
minimizes thread
synchronization


3.
Data
structured to support
independent processing


4.
System
modularity

(
through
interfaces
)


5.
Systems

are specific to the
demo (e.g. AI, physics, etc)

A throughput programming model

TVEC<F32> a(src1), b(src2);

TVEC<F32> c = a + b;

c.copyOut(dest);

1

1

0

0

0

1

0

1

0

1

0

0

0

0

1

1

1

1

0

0

0

1

0

1

0

1

0

0

0

0

1

1

+

Thread 4

0

0

1

1

0

0

1

1

+


Thread 3

0

1

0

0

0

1

0

0

+

Thread 2

0

0

0

1

0

0

0

1

+

Thread 1

1

1

0

1

1

1

0

1

+

Ct JIT Compiler:

Auto
-
vectorization,
SSE, AVX, Larrabee




Core 1

SIMD
Unit




Core 2

SIMD
Unit




Core 3

SIMD
Unit




Core 4

SIMD
Unit

Programmer Thinks Serially; Ct Exploits Parallelism

Ct Parallel Runtime:

Auto
-
Scale to Increasing
Cores

User Writes

Core Independent C++ Code

USERS

ACT

WORLD

REACTS

DISPLAYS

REFRESH

CVC

Processing

Loop

DATA PIPES:

Potential Bottlenecks


Light”

Clients

Rendering
& Reasoning

Services
Cloud

Sensors

Other CVC

Environments

Visual Computing Clients

CVC Environment

H/W Platforms
(Server/Client)


S/W Platforms
(Engines)

Service Providers

Device Manufacturers

Sales

OEMs

GPU Vendors

CPU Vendors

Content Tools

Development Tools

S/W Infrastructure

Game Engines

O/S

World Operators

Infrastructure

Marketing
-

Ad, Promotion…

Digital Asset Marketplace

Enterprise Integration

A broad effort is required to fully enable CVC

Proprietary

Proprietary

Proprietary

1993
-
1995

Browser

HTML

Server

HTTP

Walled Gardens

Open Standards

*Other names and brands may be claimed as the property of others.

CVC Future Architecture

Common Building Blocks

Presentation

Rendering

Services

A/V Effects

Services

User

Feedback

Behavior

User

Input/Control

Scripted

Behavior

Game

Physics

Support Services

Asset &

Inventory

Transactions

Identity

WORLD SIMULATOR

Communication

Sensors/

Context

User Input & Control


Rendering


Audio/Visual Effects

VIEW (CLIENT)

Simulation,
Synchronization

Transactions

Communication

Identities & Assets

WORLD (SERVER)

Support
Services

Behavioral

functions

Presentation

Tomorrow:


More horizontal, open,
building blocks

Today:

Vertical

proprietary,

CVC apps

CVC Future Architecture

From Monolithic to Building Blocks
















Parameterized Content Research

Full

Narrow

FULLNESS

Flat

Round

FLATNESS

Square

Triangle

SHAPE

Sharp

Round

CHIN

3D Face

Database

Create a

Face Model

Simple Control

Parameters

Customized

Faces

Expression Modeling


Workload Characterization


Understanding platform demands


Optimizations for future platforms


Scalable system, app architectures


Dynamic repartitioning of workloads


Execution on diverse clients

CHALLENGE

RESEARCH

Platform Optimization

Distributed Computation

Mobile Experience

Visual Content


Data
-
enhanced real world interaction


Mirror
-
world creation and navigation


Parameterized Content


Easy User
-
generated 3D Content


Standards enabling content reuse









www.microsoftpdc.com

©
2008 Microsoft
Corporation. All rights reserved. Microsoft, Windows, Windows Vista and other product names are or may be registered trademar
ks
and/or trademarks in the U.S. and/or other countries.

The information herein is for informational purposes only and represents the current view of Microsoft Corporation as of the
dat
e 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 accu
rac
y 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.

Observations:



Significant client/server compute every cycle


Many aspects best computed on client


Extensive use of MIPS, FLOPS, threads


Partitioning depends on client capability, connectivity


Client (moving to TS)

Tera
-
scale Server or Compute
Cloud

User Inputs


Rendering


Audio/Visual Effects


Animation


Spatial Audio


Smoke, Crowds, Fluids


Send Requested Update


World Simulation


Collision Physics


NPC


Script Execution


Simulation

Get Input

Display Updates

User Takes Action on the
“World”

Collects Changes

From All Users

Resolves All Object
Behaviors and
Interactions

Generates A New

Per
-
User Model

More

Server

Compute

More

Client

Compute

Always

Connected

Processing Will Span Client/Server



Combining location data, a
camera, online satellite maps
and social networking



Provides an enhanced view
of the real world

At the center of interoperability innovation

Identity

Inventory

Assets

Presence

World Map

Voice

CORE INFRASTRUCTURE

DECENTRALIZED SIMULATORS

S

S

S

S

S

S

S

S

S

S

S

S

S

S

S

S

S

S

WORLD MAP

Simulator

Collision

Detection

Script

Engine

Object

Model

Game

Engine

“Connected” Visual Computing

Users Collaborate & Play

Scenario Play

Virtual Teamroom

Users Create

World of Warcraft Avatar

Eiffel Tower in

Google Earth

Users Explore and Learn

Qwaq

Treefort

Virtual Room

Machinima Interactive Movies

Users Enhance the Actual World

West Nile Virus

Visualization

Visualizing Real

World Information

--

Dust storm in Morocco

CVC apps will transform the Internet from 2D to
3D

…but
require LOTS of compute horsepower