EBZ325 - SQL.ru

internalchildlikeInternet and Web Development

Nov 12, 2013 (3 years and 8 months ago)

82 views

EBIZ 325

Building High Performance Web Sites using
Commerce Server 2002 and Content
Management Server 2002


Scott Fynn

Microsoft Consulting Services

National Practice


Overview

Performance best practices for E
-
Biz
servers (and Web sites in general)

Site design, network considerations..

Tips on design, coding, configuration,
networking, and hardware infrastructure.

In depth:

CMS 2002 performance tuning

Extreme capacity with CMS 2002

Agenda

Content Management Server 2002

Commerce Server 2002

Common Elements of Fast Sites



CMS 2002 Performance

Focus areas:

Navigation Design

Template Design

Caching

Authentication and Security

Operations

Other Optimizations

Extreme capacity with CMS 2002


Navigation Design

Typically greatest impact on performance

Use ASP.Net cache object to fragment
cache

10x performance increase not uncommon

Be careful with client
-
side menus


use
incremental loading and frag. cache

Limit personalization in navigation tree.

Limit channel depth to <15, items in
container to <300


Template Design

Placeholders

Minimize placeholders per template (<30)

Minimize placeholder size (<1000 lines of
text)

Placeholder collection request retrieves all
placeholder data!

Headers/footers/sidebars

Use ASP.Net user controls

Enable caching


Caching

CMS disk cache

Resources are stored as BLOBs in DB

Serialized to disk after first request

Increase CMS disk cache large enough to
store entire resource gallery

Create on non
-
system disk partition!

CMS node cache

CMS
-
internal memory data cache


Caching: Node Cache

Node cache stores CMS objects

You can set max. number of nodes to
cache

Node size is variable

Small Site: (< 2000 pages)

Set node cache value to total number of
nodes

Large Site:

Tune node cache

Caching: Node Cache Tuning

Tuning is an iterative process

Increase cache size by 10%

Put site under load, measure performance with
ACT / WAST / Load Runner / Segue

If performance improves, and CMS cache
misses/second is reduced, repeat.

Caution:

Increasing node cache beyond addressable limit
will cause instability

This approach is highly sensitive to traffic
distribution and test data

Authentication and Security

CMS pre
-
calculates and caches rights for
the guest user

Results in 30% performance increase!

Don’t authenticate users if possible

All authorization is handled through the
CMS authorization HTTP module.

Remove this module for read
-
only sites

Up to 10% performance increase!


Operations

Site Deployment is CPU
-
intensive

Schedule for off
-
peak hours

Use incremental deployment

Consider impact of global cache flush

Background Processing

Cleans up deleted nodes

Runs at SQL server in CMS 2002

Schedule for off
-
peak hours

Other Optimizations

Searches namespace:

Avoid using GetByPath, GetByUrl

GetByGuid is faster and name
-
safe.

Custom property searches are expensive!

ISAPI filter for page version comparison

rehtmlpackager.dll

Remove filter from IIS for 5% performance
boost for read
-
only sites.


Extreme Capacity with CMS

Concerns:

Traffic distribution

Site size

Content update frequency

Maximize memory for cache!

Partition the site using load balancer

Split the site into separate CMS databases

Maximize RAM : CPU ratio

Adding CPUs won’t help!

Be careful of updates

Node cache flushed all at once, for each update

Danger: server overloads upon update

Solution: time
-
varied fragment caching

Consider less frequent updates / deployments


Commerce Server 2002 Performance

Focus areas:

Database Performance

Deployment and Infrastructure

Commerce Site Design

Fast Hardware for Business Analytics

Business Desk

Authentication

Database Performance

No internal data caching

Fast database access = high performance

Review SQL utilization

Use SQL index tuning wizard

Use stored procedures & parameterized
queries

Logically separate databases

Partitioning

Database Hardware

DB I/O design can not be overstated!

Use RAID 1/0 not RAID 5 for faster writes.

SAN

Fast backups, low latency, fast replication

Minimize end
-
user impact of running biz analytics

Winsock Direct

Windows 2000 Datacenter Server and Windows 2000
Advanced Server SP2

20% boost in throughput, up to 30% reduction in CPU

http://www.microsoft.com/windows2000/docs/winsockdir.doc

If not SAN, consider Gigabit Ethernet

Deployment and Infrastructure

Redirect Web traffic

Separate dynamic from static (basket.shop.com)

Separate HTTPS (secure.shop.com)

Dedicated search (search.shop.com)

Better performance

Move static content to non
-
licensed CPUs!

Move static content to a caching server or
caching hardware.


Should not be same as firewall

CS is ok
-

special considerations for CMS.


Deployment and Infrastructure

Consider performance impact of a mid
-
tier
firewall

Separates Web servers from SQL layer

Costs latency, but it’s secure

Typically only worth it for online commerce


Commerce Site Design

Rendering

Consider dollar value cost of personalization and
dynamic rendering.

Personalized Content Objects (PCOs)

Personalized = low “cacheability”

Expensive call


limit use.

Catalog

Minimize frequency of basket views

Minimize number of products per page in browse

Tracking anonymous increases DB load

Every click causes a DB write!


Fast Hardware for Biz Analytics



Large memory for OLAP



Many disks for DW



Fast clients

Business Desk

How to connect to the data center?

Private LAN

Corporate LAN

Client machines

Fast network

Large memory

Use dedicated Business Desk servers

Place behind 2
nd

tier firewalls

Load balance as necessary


Authentication

Commerce Server supports Auth. using

Basic Authentication (no SSL)

AuthFilter (ISAPI) and SQL

AuthFilter (ISAPI) and AD

AuthManager (COM) and SQL

Fastest, secure method is to use Authfilter
and SQL, and use SSL only for logins.

Authentication


Common Elements

ASP.Net vs. ASP

Site Design Considerations

Server Hardware

Network Considerations



ASP.Net vs. ASP


Performance Advantages

Better use of allocations

Native cache support

Improved multi
-
processor scalability

Key Win: Output caching!

Faster than fragment caching

Cache user controls (header/footer)

Site Design Considerations

Many popular site homepages:


“Loading image 3 of 81”

Minimize number of requests per page!

Reduce total image count

Limit use of the “single pixel trick”

Use a single .css, a single .js per page

Limit use of rollovers and layered images

Minimize total page size and footprint

Google has enormous throughput!



Server Hardware

Web Tier

Fastest CPU you can find

Lots of memory

Most value for each CPU license

Dual processor on Win2K is most efficient

DB Tier

More important with Commerce Server

CMS doesn’t write to DB at runtime


Network Considerations

Consider network delay when measuring
acceptable TTFB (2 sec), TTLB (6 sec)

Expensive test software simulates this

Domestic Traffic

median delay 60 milliseconds

95th percentile 164 ms

Packet loss is 1
-
2%

Overseas Traffic

Up to 400 milliseconds

Summary

Content Management Server 2002

Output
-
, fragment
-
, node
-

and disk caching!

Optimize for read
-
only servers

Commerce Server 2002

Fast DB layer recommended

Bizdesk/analytics need fast clients

In general

Powerful Web servers = best license value

Simple Web design = high performance

Appendix…

Commerce Server 2000 performance

http://www.microsoft.com/commerceserver/performance


Content Management Server Information

http://www.microsoft.com/cmserver/techinfo/deployment/
default.htm


Community Resources

Community Resources

http://www.microsoft.com/communities/default.mspx


Most Valuable Professional (MVP)

http://www.mvp
.support.microsoft.com/


Newsgroups

Converse online with Microsoft Newsgroups, including Worldwide

http://www.microsoft.com/communities/newsgroups/default.mspx


User Groups

Meet and learn with your peers

http://www.microsoft.com/communities/usergroups/default.mspx

Suggested Reading And Resources

The tools you need to put technology to work!

TITLE

Available

Microsoft Content Management
Server: Best Practices for
Building and Deploying Web
Sites: 0
-
7356
-
1980
-
8


















9/24/03

Building Solutions with
Microsoft® Commerce Server
2002: 0
-
7356
-
1854
-
2



Today

Microsoft Press books are
20%

off at the TechEd Bookstore

Also buy any TWO Microsoft Press books

and get a FREE T
-
Shirt



evaluations

© 2003 Microsoft Corporation. All rights reserved.

This presentation is for informational purposes only. MICROSOFT MAKES NO WARRANTIES, EXPRESS OR IMPLIED, IN THIS SUMMARY.