1 / 35

Accelerating Applications using HPC Server 2008

SVR01. Accelerating Applications using HPC Server 2008. Ming Xu Principal Program Manager Microsoft Corporation. Serial vs. Scale-out Execution 3 minutes vs. 7 seconds. video. Session Objectives and Take- aways. Objectives Categorize HPC Application Patterns & Solutions

malini
Download Presentation

Accelerating Applications using HPC Server 2008

An Image/Link below is provided (as is) to download presentation Download Policy: Content on the Website is provided to you AS IS for your information and personal use and may not be sold / licensed / shared on other websites without getting consent from its author. Content is provided to you AS IS for your information and personal use only. Download presentation by click this link. While downloading, if for some reason you are not able to download a presentation, the publisher may have deleted the file from their server. During download, if you can't get a presentation, the file might be deleted by the publisher.

E N D

Presentation Transcript


  1. SVR01 Accelerating Applications using HPC Server 2008 Ming Xu Principal Program Manager Microsoft Corporation

  2. Serial vs. Scale-out Execution3 minutes vs. 7 seconds video

  3. Session Objectives and Take-aways • Objectives • Categorize HPC Application Patterns & Solutions • Introduce HPC SOA Programming Model • Leverage HPC Server 2008 to scale-out workstation applications • Take-aways • HPC Server reduces time-to-solution • Application performance model and fine-tune skills

  4. Asian Option Price Spreadsheet 10 rows 10 columns // From Simon Benninga’s Book // “Financial Modeling” for (col = 0; col < 10; col++) for (row = 0; row < 10; row++) { Cell[row, col] = PriceAsianOption(…); Calculate average/stddev } No Inter-loop dependency PriceAsianOptions(…) contains 1,000,000 * 20 calculations

  5. Asian Option Pricing algorithm Stock price • Using Monte-carlo simulation • to generate sample paths for a • stock S, P is the probability for • the stock to go down • rand var>P:S up • rand var<= P: S down • 2. Calculate payoff • up:payoff += S * u • down:payoff -= S* d 3. Repeat 1 and 2 1M times and calculate the average payoff • Use risk-neutral rate to discount • the Asian Option payoff: • price = payoff / Rn

  6. Code: Monte Carlo Pricing // Randomly generate 1000,000 paths for (int index = 0; index < 1000000; index++){ double sumPricePath = initial; //generate a path of 20 periods for (inti = 1; i <= 20; i++){ pricePath[0] = initial; double rn = rand.NextDouble(); if (rn > pidown){ pricePath[i] = pricePath[i - 1] * up; }else{ pricePath[i] = pricePath[i - 1] * down; } sumPricePath += pricePath[i]; } priceAverage = sumPricePath / (periods + 1); callPayOff = Math.Max(priceAverage-exercise, 0); temp += callPayOff; } temp /= runs;//average payoff return temp / Math.Pow(interest, periods);

  7. Monte Carlo Serial App demo Ming Xu Principal Program Manager HPC

  8. Windows HPC Server 2008 • Complete and integrated platform for computational clustering • Built on top of the proven Windows Server 2008 platform • Integrated development environment, Visual Studio • Available from http://www.microsoft.com/hpc

  9. Parallel Programming Concepts Relationship among Processing Elements Program Structure • Tightly Coupled • Loosely-coupled • Compute-driven/loop parallel for (i = 0; i< 1000, i++) { … } • Data-driven/data-parallel var results = from baby in babies where baby.Name == queryName && baby.State == queryState && baby.Year >= yearStart && baby.Year <= yearEnd orderbybaby.Year ascending select baby;

  10. HPC Application Patterns Focus of this session Weather Program Structure Seismic Solutions TPL (Multi-core) HPC SOA (Scale-out) Parametric Sweep jobs(Scale-out) Solutions OpenMP (Multi-core) MPI (Scale-out) Real-time Risk Compute-driven Loop-parallel Structure Analysis VaR Actuarial processing DCC Rendering Crash Sim Genetic algorithms Excel UDF Derivative Product pricing Gene Sequencing Data-driven data-parallel Solutions PLINQ (Multi-core) Dryad-LINQ (Scale-out) Search Data-mining Relationship Among Processing Elements Loosely-coupled Tightly-coupled

  11. Excel Calculation Scale-out Visual Studio Tools for Office Parallel invocations HPC SOA API

  12. FAQs • Which distributed computing framework to use? • How to host the calculation logic on the compute nodes? • How do I invoke the calculation remotely? • How do I debug my services on the compute nodes, printf()? • Remote invocations incur high overhead, do you have any performance tips? • When I move to the cloud, do I have to use a new API?

  13. C C C B B B A A A Windows Communication Foundation Client Service Message Address Binding Contract (Where) (How) (What)

  14. Scenario: build to run Administrators Users Developers Package Build Run Deploy Client Install Visual Studio Service DLLs Copy Service DLLs Register Service Dev / Test environment Production environment Service Deployment

  15. Options for Service Deployment 文件服务器 File server File server service DLLs service DLLs service DLLs service DLLs service DLLs service DLLs service DLLs service DLLs service DLLs service DLLs

  16. A Hello-world example demo Ming Xu Principal Program Manager HPC

  17. Coding SummaryIt’s Easy • Established SOA Platform – WCF & tools support • Add service reference makes service data types & methods available to an application with just a few clicks • Streamlined debugging • Yes, I don’t have to worry about where these services run or how to talk to them individually

  18. Architecture Overview Head Node 2. Launch Services Job Scheduler Create Session Compute Node Compute Node Compute Node Node Mgr Node Mgr Node Mgr 2. Launch Broker Client Service Instance Service Instance Service Instance Service Instance Service Instance Service Instance Broker Node . . . Broker 3. Service Calls Future: Service instances in the cloud

  19. Scale-out Asian Option Pricing Application demo Ming Xu Principal Program Manager HPC

  20. How can the solution span code developed in different languages and frameworks? HpcServiceHost Broker NetTcp WCF Wrappper Service Native DLL HTTP Custom Service Custom

  21. A Performance Problem Discussion Customer: how come my HPC SOA application doesn’t perform? The machines’ utilization is less than 80% Solution Specialist: what’s the message size per service call, what’s the measured throughput? Customer: about 16k & 700 msgs/sec Solution Specialist: What’s the service call duration? Customer: 2 seconds Solution Specialist: how many cores are you requesting? Customer: 2000 Solution Specialist: let me do the math…oh, you’ve exceeded your sustainable service instances (SSI) Customer: what’s S.S.I?

  22. Round-trip latency

  23. Service Call Profiling Number of Service Instances The Nth service instance: Start processing 1st call End processing 1st call Start processing 2nd call End processing 2nd call N The slope represents the throughput (# msgs / sec) Determined by Client/Broker node capability Message size 4 3 2 1 time Call Duration )

  24. Sustainable Service Instances Number of Service Instances (N) Sustainable Service Instances ( S ) S = throughput * call_duration time N <= S High Node Utilization Call Duration N > S Low Node Utilization

  25. How to explain the customer’s problem? The measured throughput for 16k messages on customer’s broker machine: Throughput = 700 msgs / second Call duration = 2 seconds Sustainable Service Instances = 700 * 2 = 1,400 The session requests 2,000 cores The session uses (1400 / 2000 = 0.7) 70% of the allocated cores Buying a faster broker node can be a solution but are there any other options?

  26. Scalability Tips • Increase call granularity • Reduce message size • Call-by-reference • Only send pointers to the data NOT the data itself • Let services (with bigger pipes) load the data • Avoid sending common, shared data per service call • Use Data Cache Servers to store forward large data

  27. An Example Architecture

  28. What’s new in HPC Server 2008 R2 • In Beta 1 now! http://connect.microsoft.com • New fire-and-recollect programming model • Service finalization hooks • Improved Java interoperability • Automatic restart and failover of broker nodes • Improved management, monitoring, diagnostics and debugging

  29. File & Recollect // Service Application [ServiceContract] public interface IService1 { [OperationContract] string Echo(string); } class Service1 : IService { public string Echo (string input) { return Environment.MachineName + ":" + input; } } request HPC Svr 2008 Interactive Connected applications Request & reply response request Client Process (Send requests) R2 Client Process (Get responses) Fire & Recollect response Come to our booth and we’ll show you a demo

  30. Summary • Which Distributed Computing Framework to use? • WCF – the framework and tools support • How do I host service on compute nodes • HPC Service deployment (compute-node, central and hybrid modes) • How to invoke remove methods? • Async method invocation or SendRequests()/GetResponses() – new in R2 • How to debug services on the compute nodes • Using VS HPC SOA debugger add-in • Remote invocation is higher, do you have any performance tips • Use SSI to measure your performance goal • Right granularity, reduce message sizes • Do I have to use a new API when moving to the cloud? • No, we preserve your investment in HPC Server

  31. Parallel Computing and PDC09 • Overview • FT07:The State of Parallel Programming • WKSP08: Patterns of Parallel Programming • Managed code in Visual Studio 2010 • FT03:Manycore and .NET 4: A Match Made in Visual Studio 2010 • FT21:PLINQ: LINQ, but Faster! • FT20:F# for Parallel and Asynchronous Programming • Native code in Visual Studio 2010 • SVR18: Developing Applications for Scale-Up Servers Running Windows Server 2008 R2 • SVR10: Lighting up Windows Server 2008 R2 Using the ConcRT on UMS • FT19:C++ Forever: Interactive Applications in the Age of Manycore • HPC Server • SVR01:Accelerating Applications Using Windows HPC Server 2008 • Research and Incubation • VTL02:Axum: A .NET Language for Safe and Scalable Concurrency • VTL32:Concurrency Fuzzing & Data Races • SVR17:Data-Intensive Computing on Windows HPC Server with DryadLINQ • VTL04:Rx: Reactive Extensions for .NET • FT36:Future of Garbage Collection

  32. Track Resources • This session on Video • http://channel9.msdn.com/shows/The+HPC+Show/ Look for “Windows HPC WCF Integration Part 1-4 • Microsoft HPC 2008 R2 Web site – download Today! • http://connect.microsoft.com • Windows HPC Community site • http://www.windowshpc.net • Windows Server x64 information • http://www.microsoft.com/x64/ • Windows Server System information • http://www.microsoft.com/windowsserver • Get the Facts Web site • http://www.microsoft.com/getthefacts

  33. YOUR FEEDBACK IS IMPORTANT TO US! Please fill out session evaluation forms online at MicrosoftPDC.com

  34. Learn More On Channel 9 • Expand your PDC experience through Channel 9 • Explore videos, hands-on labs, sample code and demos through the new Channel 9 training courses channel9.msdn.com/learn Built by Developers for Developers….

More Related