DEV315 Best Practices for running IIS 6.0 and ASP.NET

Slides:



Advertisements
Similar presentations
Case Study: Photo.net March 20, What is photo.net? An online learning community for amateur and professional photographers 90,000 registered users.
Advertisements

XIr2 Recommended Performance Tuning Andy Erthal BI Practice Manager.
Module 13: Performance Tuning. Overview Performance tuning methodologies Instance level Database level Application level Overview of tools and techniques.
Mitchel Sellers, CEO IowaComputerGurus Inc.. Active in the DotNetNuke eco system for about 6 years Author of Professional DotNetNuke Module Programming.
SSRS 2008 Architecture Improvements Scale-out SSRS 2008 Report Engine Scalability Improvements.
WSUS Presented by: Nada Abdullah Ahmed.
DEV392: Extending SharePoint Products And Technologies Through Web Parts And ASP.NET Clint Covington, Program Manager Data And Developer Services - Office.
Chapter 14 Chapter 14: Server Monitoring and Optimization.
Microsoft ® Application Virtualization 4.5 Infrastructure Planning and Design Series.
Chapter 9 Overview  Reasons to monitor SQL Server  Performance Monitoring and Tuning  Tools for Monitoring SQL Server  Common Monitoring and Tuning.
Module 8: Monitoring SQL Server for Performance. Overview Why to Monitor SQL Server Performance Monitoring and Tuning Tools for Monitoring SQL Server.
Managing and Monitoring SQL Server 2005 Shankar Pal Program Manager SQL Server, Redmond.
Presented by Jacob Wilson SharePoint Practice Lead Bross Group 1.
Building Scalable and Reliable Web Applications Vineet Gupta Technology Evangelist Microsoft Corporation
Enterprise Reporting with Reporting Services SQL Server 2005 Donald Farmer Group Program Manager Microsoft Corporation.
WEB329 ASP.NET: A Lap Around the New Enhancements for Web Developers in Microsoft Visual Studio 2005 Omar Khan Lead Program Manager Web Platform and Tools.
DNN Performance & Scalability Planning, Evaluating & Improving : Part 2.
OFC 200 Microsoft Solution Accelerator for Intranets Scott Fynn Microsoft Consulting Services National Practices.
5 Chapter Five Web Servers. 5 Chapter Objectives Learn about the Microsoft Personal Web Server Software Learn how to improve Web site performance Learn.
ASP.NET Web Application and Development Digital Media Department Unit Credit Value : 4 Essential Learning time : 120 hours Digital.
Designing and Deploying a Scalable EPM Solution Ken Toole Platform Test Manager MS Project Microsoft.
Block1 Wrapping Your Nugget Around Distributed Processing.
Designing a Scalable Enterprise Project Management Architecture Ken Toole Platform Test Manager MS Project Microsoft Corporation.
© 2008 Quest Software, Inc. ALL RIGHTS RESERVED. Perfmon and Profiler 101.
Module 3 Planning and Deploying Mailbox Services.
Windows Forms in Visual Studio 2005 Mike Pelton Systems Engineer Microsoft Ltd
“Load Testing Early and Often” By Donald Doane Presentation to the Rockville MDCFUG.
Building High Performance, Robust Server Applications with Internet Information Server 5.0 Van Van IIS - Program Manager Microsoft Corporation.
1 Chapter Overview Planning to Install SQL Server 2000 Deciding SQL Server 2000 Setup Configuration Options Running the SQL Server 2000 Setup Program Using.
April-June 2006 Windows Hosting Seminar Series Technical Labs.
Presented by Vishy Grandhi.  Lesson 1: AX Overview  Lesson 2: Role based security  Lesson 3: Monitoring  Troubleshooting.
Aniruddha Deswandikar & Govind Kanshi Microsoft Technology Center, Bangalore SESSION CODE: ##### Building performant Web applications.
DEV414 Black-belt ASP.NET Tips And Tricks For Your ASP.NET Applications Rob Howard Program Manager Web Platform and Tools Team.
Internet Information Server 6.0 & new management features.
1 BCS 4 th Semester. Step 1: Download SQL Server 2005 Express Edition Version Feature SQL Server 2005 Express Edition SP1 SQL Server 2005 Express Edition.
Get the Most out of SQL Server Standard Edition Or How to be a SQL Miser.
Kentico CMS Performance Optimization Implementation at Newsmax - Ayush Chaturvedi.
Configuring SQL Server for a successful SharePoint Server Deployment Haaron Gonzalez Solution Architect & Consultant Microsoft MVP SharePoint Server
9/24/2017 7:27 AM © Microsoft Corporation. All rights reserved. MICROSOFT MAKES NO WARRANTIES, EXPRESS, IMPLIED OR STATUTORY, AS TO THE INFORMATION IN.
Top 10 Entity Framework Features Every Developer Should Know
Monitoring Windows Server 2012
Understanding and Improving Server Performance
Get the Most out of SQL Server Standard Edition
Netscape Application Server
Introduction to ASP.NET 2.0
SharePoint Solutions Architect, Protiviti
Query Performance Tuning: Start to Finish
W3 Status Analyzer.
Hitting the SQL Server “Go Faster” Button
MCTS Guide to Microsoft Windows 7
SQL Server Monitoring Overview
Installation and database instance essentials
Web Caching? Web Caching:.
Developing an app for SharePoint autohosted in Azure
Software Architecture in Practice
Migration Strategies – Business Desktop Deployment (BDD) Overview
Microsoft Build /8/2018 5:15 AM © 2016 Microsoft Corporation. All rights reserved. MICROSOFT MAKES NO WARRANTIES, EXPRESS, IMPLIED OR STATUTORY,
Hitting the SQL Server “Go Faster” Button
The Application Lifecycle
Web Development Using ASP .NET
Outline Virtualization Cloud Computing Microsoft Azure Platform
Moodle Scalability What is Scalability?
Lecture Topics: 11/1 General Operating System Concepts Processes
DAT381 Team Development with SQL Server 2005
Sayed Ibrahim Hashimi Program Manager Microsoft Corporation
Designing IIS Security (IIS – Internet Information Service)
Introduction to ASP.NET Parts 1 & 2
Mark Quirk Head of Technology Developer & Platform Group
IIS and .NET Security Application Pools Pamella Smith June 18, 2009.
SharePoint 2013 Best Practices
Presentation transcript:

DEV315 Best Practices for running IIS 6.0 and ASP.NET 7/29/2019 7:45 AM DEV315 Best Practices for running IIS 6.0 and ASP.NET Rob Howard Program Manager Web Platform & Tools Team © 2004 Microsoft Corporation. All rights reserved. This presentation is for informational purposes only. Microsoft makes no warranties, express or implied, in this summary.

ASP.NET Community Contact: ASP.NET Resources rhoward@devadvice.com http://weblogs.asp.net/rhoward ASP.NET Resources http://www.asp.net/forums http://www.asp.net/whidbey http://www.asp.net/roadshow

Agenda www.asp.net Vital Statistics Hardware & Infrastructure Recommendations & Resources

7/29/2019 7:45 AM Live Site © 2004 Microsoft Corporation. All rights reserved. This presentation is for informational purposes only. Microsoft makes no warranties, express or implied, in this summary.

www.asp.net – Vital Stats General statistics (hosted by OrcsWeb) Over 4,000 files 23% ASP.NET Page files (.aspx) 46% Code-behind / BLL / DAL 31% Resource files: images, etc. Server cluster hosts many applications www.asp.net (plus online starter kits) weblogs.asp.net / blogs.msdn.com forums.asp.net / www.dotnetnuke.com

www.asp.net Year-Year May 2003 May 2004 ~485GB bandwidth usage 2mm Unique visitors 42K downloads of .NET Framework 23K Forum Posts May 2004 ~1.5TB bandwidth usage* 2.9mm Unique visitors 62K downloads of .NET Framework 28K Forum Posts * With HTTP Compression / traffic due to blogs

Hardware & Infrastructure

Network Hardware Web 2 Web 1 SQL Load Balancer Web servers 7/29/2019 7:45 AM Load Balancer Network Hardware Web servers Web 1 Web 2 Internet Information Server 6.0 ASP.NET 1.1 Business Logic Tier Data Access Tier Process Boundary Database server SQL SQL Server 2000 Data Tier – Stored Procedures © 2004 Microsoft Corporation. All rights reserved. This presentation is for informational purposes only. Microsoft makes no warranties, express or implied, in this summary.

Original Hardware Specs. 7/29/2019 7:45 AM Original Hardware Specs. 2 Web Servers Windows Server 2000 Dual-750 MHZ Processors 500 MB RAM 1 Database Server Single 750 MHZ Processor 1 GB RAM © 2004 Microsoft Corporation. All rights reserved. This presentation is for informational purposes only. Microsoft makes no warranties, express or implied, in this summary.

Original Hardware Site was highly Database bound 7/29/2019 7:45 AM Original Hardware Site was highly Database bound CPU ~95% utilization on database server File IO bound on Database Highly transactional / dynamic site Lots of database updates from Forums Lots of TempDB usage This was our own fault Database & logs on single disk OS on single disk © 2004 Microsoft Corporation. All rights reserved. This presentation is for informational purposes only. Microsoft makes no warranties, express or implied, in this summary.

Web Server Upgrade Replaced Web Servers Windows Server 2003 Notable 7/29/2019 7:45 AM Web Server Upgrade Replaced Web Servers Upgraded to Windows Server 2003 2 dual-processor 2.2 GHZ + 1 GB RAM Windows Server 2003 More secure & easier to isolate Better performance & scale capability Fault tolerance & configuration Notable Performance improved with no code changes A year later … still under-utilized © 2004 Microsoft Corporation. All rights reserved. This presentation is for informational purposes only. Microsoft makes no warranties, express or implied, in this summary.

IIS 5 Request Processing 7/29/2019 7:45 AM IIS 5 Request Processing X INETINFO.exe DLLHOST.exe X X Metabase X DLLHOST.exe Kernel mode User mode TCP/IP Request Response © 2004 Microsoft Corporation. All rights reserved. This presentation is for informational purposes only. Microsoft makes no warranties, express or implied, in this summary.

IIS 6.0 Request Processing 7/29/2019 7:45 AM IIS 6.0 Request Processing Inetinfo Administration & Monitoring WWW Service Application Pools XML Metabase X … Kernel mode User mode HTTP Cache Queue Request Response © 2004 Microsoft Corporation. All rights reserved. This presentation is for informational purposes only. Microsoft makes no warranties, express or implied, in this summary.

Database Design Changes 7/29/2019 7:45 AM Database Design Changes ASP.NET Forums was biggest culprit Highly transactional tables Lots of updates (read, last visit, …) Posts table Stores a list of all messages Clustered index on PostID Denormalized data Tracked top-level posts Clustered index on ForumID © 2004 Microsoft Corporation. All rights reserved. This presentation is for informational purposes only. Microsoft makes no warranties, express or implied, in this summary.

Database Hardware Upgrade 7/29/2019 7:45 AM Database Hardware Upgrade Single Database Server Windows Server 2000 2 dual-processor 2.8 GHZ (Hyper-threaded) 2 GB Memory Performance changes Faster disks, more CPU, more memory RAID-0 disk arrays Separate controllers for OS, database, logs © 2004 Microsoft Corporation. All rights reserved. This presentation is for informational purposes only. Microsoft makes no warranties, express or implied, in this summary.

Database Hardware Upgrade 7/29/2019 7:45 AM Database Hardware Upgrade Database no longer impacting performance CPU utilization ~6% / avg (2003) CPU utilization ~18% / avg (2004) SQL is a memory hog ~1.5 GB Memory is inexpensive, buy lots for SQL © 2004 Microsoft Corporation. All rights reserved. This presentation is for informational purposes only. Microsoft makes no warranties, express or implied, in this summary.

Site Performance 7/29/2019 7:45 AM © 2004 Microsoft Corporation. All rights reserved. This presentation is for informational purposes only. Microsoft makes no warranties, express or implied, in this summary.

HTTP Compression Reduces bandwidth usage Not like IIS 5 compression Not enabled by default Uses gzip compression Not like IIS 5 compression Compression was built-in, but… …most people purchased Steps to enable: Good write-up at: http://dotnetguy.techieswithcats.com/archives/003475.shtml

HTTP Compression IIS Web Service extensions Add required file Add new Web Service extension Http Compression (name doesn’t matter) Add required file \Windows\System32\inetsrv\gzip.dll Set extension status to ‘allowed’ Edit the metabase Requires IIS shut-down \Windows\System32\inetsrv\MetaBase.xml Find IIsCompressionScheme (add aspx)

Disable Process Recycle 7/29/2019 7:45 AM Disable Process Recycle Too aggressive …unless leaks …or desired © 2004 Microsoft Corporation. All rights reserved. This presentation is for informational purposes only. Microsoft makes no warranties, express or implied, in this summary.

Tune Maximum Memory Set this value Recommended settings 7/29/2019 7:45 AM Tune Maximum Memory Set this value Risk paging to disk Recommended settings No more than 60% Physical Using 2GB address space No higher than 800MB If 3GB+ address space No higher than 1800MB © 2004 Microsoft Corporation. All rights reserved. This presentation is for informational purposes only. Microsoft makes no warranties, express or implied, in this summary.

Data Abstraction Layer Controlling Access to the Database 7/29/2019 7:45 AM Data Abstraction Layer Controlling Access to the Database © 2004 Microsoft Corporation. All rights reserved. This presentation is for informational purposes only. Microsoft makes no warranties, express or implied, in this summary.

Data Access Layer Class to entity relationship Data exchange 7/29/2019 7:45 AM Data Access Layer Class to entity relationship [Area]DB ControlGalleryDB Data exchange No DataReaders passed Populated class instances returned Connection string Stored within configuration No embedded connection strings in the app. © 2004 Microsoft Corporation. All rights reserved. This presentation is for informational purposes only. Microsoft makes no warranties, express or implied, in this summary.

Business Logic Layer 7/29/2019 7:45 AM © 2004 Microsoft Corporation. All rights reserved. This presentation is for informational purposes only. Microsoft makes no warranties, express or implied, in this summary.

Everything is a Module HTML Module HTML Module Article Module Survey HTML Rotator Article Module © 2004 Microsoft Corporation. All rights reserved. This presentation is for informational purposes only. Microsoft makes no warranties, express or implied, in this summary.

Evolution of IBuySpy Portal 7/29/2019 7:45 AM Evolution of IBuySpy Portal Originally code named ‘Calypso’ Based off original IBuySpy portal Dynamic user control loading into page Minor architecture changes Configuration read from file Updated Starter Kit reflects this change © 2004 Microsoft Corporation. All rights reserved. This presentation is for informational purposes only. Microsoft makes no warranties, express or implied, in this summary.

BLL Code Location All code is inline Extensive user of User Controls 7/29/2019 7:45 AM BLL Code Location All code is inline Negative: No design-time support in VS Positive: Isolation & easy updates Extensive user of User Controls Page is a frame for User Controls Dynamically loaded / cached Languages used C# is primary language Some VB code © 2004 Microsoft Corporation. All rights reserved. This presentation is for informational purposes only. Microsoft makes no warranties, express or implied, in this summary.

Recommendations & Resources 7/29/2019 7:45 AM Recommendations & Resources © 2004 Microsoft Corporation. All rights reserved. This presentation is for informational purposes only. Microsoft makes no warranties, express or implied, in this summary.

Key Performance Counters 7/29/2019 7:45 AM Key Performance Counters Processor: % Processor Time Processor time of all processors System: Processor Queue Length Exceeds 2 / CPU > 5 min. potential bottleneck Physical Disk: Avg. Queue Length Exceeds 2 / Drive > 5 min. potential bottleneck Physical Disk: % Disk Time General picture of how busy the disk is Memory: Pages / Sec Memory paged to disk © 2004 Microsoft Corporation. All rights reserved. This presentation is for informational purposes only. Microsoft makes no warranties, express or implied, in this summary.

Key Performance Counters 7/29/2019 7:45 AM Key Performance Counters Processor, CPU % Utilization Low numbers = blocking or lock contention ASP.NET, Requests Queued Linear growth here indicates server maxed ASP.NET Applications, Requests/Sec Dynamic throughput (should be consistent) ASP.NET Application, Errors Total Indicates functional problems (should be 0) ASP.NET App/Worker Process Restarts Indicates serious functional problems © 2004 Microsoft Corporation. All rights reserved. This presentation is for informational purposes only. Microsoft makes no warranties, express or implied, in this summary.

Tools / Resources Recommended Reading Query Analyzer SQL Profiler 7/29/2019 7:45 AM Tools / Resources Recommended Reading Microsoft SQL Server 2000 Performance Optimization and Tuning Handbook by Ken England, published by Digital Press Query Analyzer Execution Plan Trace SQL Profiler Live profiling of database Track down expensive procedures © 2004 Microsoft Corporation. All rights reserved. This presentation is for informational purposes only. Microsoft makes no warranties, express or implied, in this summary.

Recommendations De-normalize in some cases 7/29/2019 7:45 AM Recommendations De-normalize in some cases Normalization can affect performance Understand clustered indexes Common data stored together physically on disk Understand covered queries All data stored in index – faster lookups Use separate SQL accounts Makes tracing / security easier Know where you’re slow Likely database Definitely network © 2004 Microsoft Corporation. All rights reserved. This presentation is for informational purposes only. Microsoft makes no warranties, express or implied, in this summary.

Recommendations Cache aggressively Data Readers vs. DataSet 7/29/2019 7:45 AM Recommendations Cache aggressively Per-Request or other time duration Data Readers vs. DataSet DataSet used when data can be cached Return multiple results Batch common work together Use stored procedures Security & Efficiency Close connections Ensure any open connections are closed © 2004 Microsoft Corporation. All rights reserved. This presentation is for informational purposes only. Microsoft makes no warranties, express or implied, in this summary.

Recommendations Process hop as little as possible 7/29/2019 7:45 AM Recommendations Process hop as little as possible BLL / DAL in the same process ASP.NET 1.1 / IIS 6 Whitepaper Per-Request or other time duration Using Session State on server farm Mark as read-only if you don’t update IIS 6 Kernel Cache Can dramatically improve performance ViewState size Increases total size of page © 2004 Microsoft Corporation. All rights reserved. This presentation is for informational purposes only. Microsoft makes no warranties, express or implied, in this summary.

Lessons Learnt Hardware is inexpensive, people aren’t 7/29/2019 7:45 AM Lessons Learnt Hardware is inexpensive, people aren’t Database background is critical Database de-normalization is ok Robots.txt file Cross-site scripting attacks No Ad-Hoc SQL (SQL script attacks) HttpContext.Items (per-Request Cache) © 2004 Microsoft Corporation. All rights reserved. This presentation is for informational purposes only. Microsoft makes no warranties, express or implied, in this summary.

Summary www.asp.net Invest in hardware 7/29/2019 7:45 AM Summary www.asp.net Real world web site Community Portal Invest in hardware It’s ok to de-normalize for performance Stay in the same process Cache as much as possible © 2004 Microsoft Corporation. All rights reserved. This presentation is for informational purposes only. Microsoft makes no warranties, express or implied, in this summary.

© 2004 Microsoft Corporation. All rights reserved. 7/29/2019 7:45 AM © 2004 Microsoft Corporation. All rights reserved. This presentation is for informational purposes only. Microsoft makes no warranties, express or implied, in this summary. © 2004 Microsoft Corporation. All rights reserved. This presentation is for informational purposes only. Microsoft makes no warranties, express or implied, in this summary.