View
219
Download
0
Category
Preview:
Citation preview
8/14/2019 i103 SQL Moss
1/30
11. to 12. April 2007 | Zurich, Switzerland
8/14/2019 i103 SQL Moss
2/30
11. to 12. April 2007 | Zurich, Switzerland
Michael Epprecht
Consultant
Microsoft Switzerland
8/14/2019 i103 SQL Moss
3/30
I/O Sub-system (1/2)
Planning time spent in I/O Configuration would havesignificant payback
Normal I/O Performance guidelines apply Minimally, size for the sum of all work load being
consolidated including growth
Be careful An misbehaving application might use up DB and Log space
planned for other applications
An upper limit specification might be appropriate for some DBs
Considerations Isolation at physical disk level may not be practical
Focus on ensuring healthy disk latency1 - 5 ms for Log (Ideally 1 ms or better)5 - 20 ms for Data (OLTP) (Ideally 10 ms or better)
8/14/2019 i103 SQL Moss
4/30
I/O Sub-system (2/2)
Considerations (continued) Raid 10 preferred
Raid 5 is generally less costly However, lower write performance
But, may be acceptable for some workloads
Keep Backup Files on separate spindles
Safeguard against Cache loss (battery back up) Particularly for Log Devices
Watch cache read write usage settings Use multiple channels if available
Storage Top 10 Best Practices http://www.microsoft.com/technet/prodtechnol/sql/bestpractice/stora
ge-top-10.mspx
http://www.microsoft.com/technet/prodtechnol/sql/bestpractice/storage-top-10.mspxhttp://www.microsoft.com/technet/prodtechnol/sql/bestpractice/storage-top-10.mspxhttp://www.microsoft.com/technet/prodtechnol/sql/bestpractice/storage-top-10.mspxhttp://www.microsoft.com/technet/prodtechnol/sql/bestpractice/storage-top-10.mspxhttp://www.microsoft.com/technet/prodtechnol/sql/bestpractice/storage-top-10.mspxhttp://www.microsoft.com/technet/prodtechnol/sql/bestpractice/storage-top-10.mspxhttp://www.microsoft.com/technet/prodtechnol/sql/bestpractice/storage-top-10.mspxhttp://www.microsoft.com/technet/prodtechnol/sql/bestpractice/storage-top-10.mspx8/14/2019 i103 SQL Moss
5/30
Processors
Intel vs. AMD
x86
x64
N-cores
IA 64 (Real 64 Bit)
N-cores
8/14/2019 i103 SQL Moss
6/30
Managing Memory Resources
Best Practice: Place a memory ceiling on each relational server
instance
To ensure a certain amount of memory resources set min server
memory
Be aware that SQL does not acquire memory on startup, memory is acquired ondemand (this is a behavior change from SQL 2000 64-bit)
Best Practice: Grant the SQL Server service account Lock pages in
memory privilege
Prevents OS paging of SQL buffers pool memory under memory pressure
On 32-bit, required to utilize AWE memory
Best Practices apply to:
Single instance of SQL Server
Multiple SQL Server instances sharing the server
When other components (AS, SSIS, RS) co-reside with the relational server
8/14/2019 i103 SQL Moss
7/30
Managing Memory Resources
Managing SQL RDBMS memory consumption
Determine desired size of total RDBMS memory footprint for each
instance (Msql)
Ensure Msql < Total Server Memory ~1GB (per 8-16GB) for OS
Max memory required by other apps or instances
Reserve enough room outside of buffer pool for
SQL Threads
Threads will consume 4MB each on Itanium, 2MB on X64, 1MB on 32-Bit
(= 1GB for 256 Worker Threads on Itanium)
XPs, In-Proc OleDB drivers, CLR GC heap
Calculate & set the resulting size of buffer pool desired Bpool = Msql - Threads - XPs - CLR GC heap - etc
Sp_configure Max Server Memory = Bpool
Consider: Sp_configure Min Server Memory = min desired amount
NOTE: On 64-bit memory outside of Buffer Pool cannot be limited
(memtoleave on 32-bit system)
8/14/2019 i103 SQL Moss
8/30
Taking Advantage of NUMA Systems
NUMA memory configurations are common on servers with> 4 cores Some SQL Server 2005 OLTP workloads are 60% faster when using
NUMA instead of Interleaved memory
Many NUMA Enhancements in Relational SQL Server Improved placement of objects in local cache Per-node lazywriter, free list and checkpointing
Per-node resource management (threads)
Per-node IO completion port
A SQL connection will remain on the same NUMA node forits lifetime Potential for leveraging local cache for all of its tasks
Soft NUMA provides the ability to direct specific connections tospecific nodes
8/14/2019 i103 SQL Moss
9/30
NUMA: Be Careful
AS (prior to SP2) and SSIS are not NUMA aware
No assurance of evenly distributed memory allocation
Windows will tend to fill a single nodes CPUs with work before exercising
other CPUs
Common to see only one busy set of nodes and remainder of server idle
until a node saturates
SP2 for AS introduces (NUMA aware) new PreAlloc
configuration setting
If on same physical server, consider
Using WSRM to manage CPU resource
Starting SQL Server and warming cache before launching AS Avoids AS potentially grabbing all local memory for one node
Avoids filesystem cache from stealing pages disproportionately from a single node
which could create a SQL node starved of local pages
Deploy this configuration only after thorough testing
8/14/2019 i103 SQL Moss
10/30
TempDB Usage
Be sure to tune TempDB for proper sizing as
well as performance
TempDB usage is much more common in
SS2005 (vs. SQL2000) See next slide
8/14/2019 i103 SQL Moss
11/30
TempDB Usage in SQL Server 2005
1. DBCC CHECKDB - small change
2. Internal objects: work file (hash join, SORT_IN_TEMPDB) - CTEs
3. Internal objects: work table (cursor, spool) - small changes
4. Large object (LOB) variables
5. Service Broker
6. Temporary objects: global/local temp table, table variables7. Temporary objects: SPs and cursors - small changes
8. Version store: General
9. Version store: MARS
10. Version store: Online index, mapping index, sort operations
11. Version store: Row version based isolation levels
12. Version store: Triggers13. XML
8/14/2019 i103 SQL Moss
12/30
Tempdb Isolation & Configuration
Tempdb placement (dedicated vs. shared physical disks)Unless you understand Tempdb I/O characteristics it may be betterto allocate Tempdb on spindles for data and indexes to utilizemore cumulative disks
ROT: Tempdb 1 data file per CPU (core) on host server
Data files should be of equal sizePre-size data/log files do no rely on AUTOGROWException: Testing to determine how much space will be needed
T1118 Disables mixed page allocationsUse if waitresource "2:1:1" (PFS Page) or "2:1:3" (SGAM Page) makes systemappear unresponsive
Refer to http://support.microsoft.com/kb/328551/ for problem description
Monitor and understand your own Tempdb usageSql Server:Transactions/FreeSpace in Tempdb (KB)Related DMVs
sys.dm_db_session_space_usagesys.dm_db_task_space_usagesys.dm_exec_requests
http://support.microsoft.com/kb/328551/http://support.microsoft.com/kb/328551/8/14/2019 i103 SQL Moss
13/30
High Availability
Failover Clustering
Database Mirroring
Log Shipping
Replication is NOT supported
8/14/2019 i103 SQL Moss
14/30
Log Shipping
Only User Databases can be Log Shipped
Master DB
System Configuration
Logins
MSDB
SQL Agent Jobs
Backup History
DTS Packages saved in SQL Server
8/14/2019 i103 SQL Moss
15/30
Log Shipping
Master
Model
AdventureWorks
MSDB
TempDB
Databases
Safe
Only User Databases
can be Log Shipped
8/14/2019 i103 SQL Moss
16/30
Failover Clustering
Pros Very high availability
Quick failover (5-90 seconds)
Same IP Address
All databases are safe. TempDb is cleared.
Standard Edition can now be setup as a 2 node cluster.
Enterprise Edition can now be setup as a 8 node cluster.
Cons Hardware must be on Windows HCL
Cost
SAN is Point of Failure
Can not protect against database Corruption
Sensitive to Domain Controller outages
SQL Server Service Pack application requires instance downtime
Transactions in progress are rolled back
Shared location
8/14/2019 i103 SQL Moss
17/30
Failover Clustering
Master
Model
AdventureWorks
MSDB
TempDB
Databases
Safe
TempDB is
cleared on
failover
8/14/2019 i103 SQL Moss
18/30
Database Mirroring
High availability operating mode Synchronous with a witness
Mirror acknowleges before commit to client
Automatic Failover
Mirror and Witness not reachable, DB goes offline High protection operating mode
Synchronous without a witness
Mirror acknowleges before commit to client
Manual Failover High performance operating mode
Asynchronous without a witness
Manual Failover, possible data loss
8/14/2019 i103 SQL Moss
19/30
Database Mirroring
Master
Model
AdventureWorks
MSDB
TempDB
Databases
Safe
Only User Databases
can be Mirrored
8/14/2019 i103 SQL Moss
20/30
Backup / Restore
SQL Server DB Level
DB Server Loss
DB Corruption
DBA Error
STSADM.exe Site Deleted (sites are not in Recyacvle Bin)
Backup/Resore to another Server
Farm
STSADM.exeo backupdirectory \\moss\moss_backup -backupmethod full
Site
STSADM.exe -o backup -url http://intralot-portal -filename .datoverwrite
All MySites
STSADM.exe -o backup -url http://mysites -filename c:\moss_backup\mysites.dat
overwrite
Microsoft System Center Data Protection Manager v2 (RTM Q4
2007)
8/14/2019 i103 SQL Moss
21/30
SSRS Add-In Install
WSS 2007
Reporting Services Add-in
Report ViewerWeb Part
ReportManagement UI
WSS Object Model
SharePoint Content DB
SSRS 2005
SQL Server 2005 SP2
SP2 Report Server
SecurityExtension
CatalogManagement
WSS Object Model
Report Server DB
Reporting Services
8/14/2019 i103 SQL Moss
22/30
RS Database Integration
WSS Content Database stores the mastercopy of SSRS items
Schedules, caching, and subscriptions arestored in SSRS database only
Get Master Copyfrom WSS DB
RunReport Exists
?Master
?
NO
Yes Yes
ON
No automated migration path from existingSSRS installations
8/14/2019 i103 SQL Moss
23/30
RS - Security Mapping
SSRS security operations map toSharePoint Web or List rights.
Model Item security is still managed by SSRS.
CreateReportoperation
CreateReport( )
New Site permissions replace Systempermissions.
CreateSchedules
operationCreateSchedule( )
Add Items
ManageWeb Site
8/14/2019 i103 SQL Moss
24/30
RS - Standard SharePoint Roles
SharePoint Role Reporting Services Functionality
Limited Access Can view shared schedules
Read View/run reports, view data sources, models. Create
and delete own subscriptions, view report history
(snapshots).
Contribute Create/edit/delete reports, data sources, models.
Create/delete snapshots.
Design Create/delete folders. Update properties?
Full Control Create/edit/delete shared schedules.
Create/edit/delete any subscription.
Report Builder Requires Use Remote Interfaces permission
8/14/2019 i103 SQL Moss
25/30
RS - Security Modes
Windows Integrated & Trusted Account
SSRSSP2
WSS WebApplication with
Windows
Authentication
WSS Web
Application(non-Kerberosor Custom
Authentication)
Non-Windows
User
WindowsUser
TrustedAccount &
SharePointUser token
WindowsUser
8/14/2019 i103 SQL Moss
26/30
Typical System DB growth - 4GB
ContentDatabase Web Application Storage
yr1
Storage yr3 Description
SharePoint_Admin_Content
_{GUID}
SharePoint Central
Administration v3
60MB 100MB Site Collection for Central
Administration Web Site
SharePoint_Config Writable from Central
Administration, Read
by all Web
Applications
10MB 100MB Hosts Configuration
Information Common to all
members of the Farm.
SSP1_DB SSP1 10MB 100MB Shared Services Providing
Content DB
SSP1_Search_DB SSP1 3MB 75GB Responsible for storing search
related data from indexing
(Property Store, URL Maps)
SSP1_WSS_Content SSP1 14MB 100MB Content Database for SSP
administration site.
WSS_Search_ServerName Central
Administration
60MB 100MB Crawl Database of SharePoint
Help FIle
The Search_DB also hosts the query log used for query reporting and analysis!
8/14/2019 i103 SQL Moss
27/30
Microsoft IT
12TB of SharePoint data.
83GB index files (0.67 % of Content)
243GB Search database (1.97 % of Content) Combined percentage for total index storage =
2.64%
Maximum single data DB size: 50Gb Due to SLAs.
3.3GB/minute restore rate = 15 Minute downtime
8/14/2019 i103 SQL Moss
28/30
More Information
SQLRAP - SQL Risk Assesment Program, delivered byPremier Support Services, ask your Technical AccountManager (TAM)
SQL Server Customer Advisory Team:http://blogs.msdn.com/sqlcat
Troubleshooting Performance Problems in SQL Server2005http://www.microsoft.com/technet/prodtechnol/sql/2005/tsp
rfprb.mspx
SQL Server User Group http://www.sqlpass-swiss.org/
http://blogs.msdn.com/sqlcathttp://www.microsoft.com/technet/prodtechnol/sql/2005/tsprfprb.mspxhttp://www.microsoft.com/technet/prodtechnol/sql/2005/tsprfprb.mspxhttp://www.sqlpass-swiss.org/http://www.sqlpass-swiss.org/http://www.sqlpass-swiss.org/http://www.sqlpass-swiss.org/http://www.microsoft.com/technet/prodtechnol/sql/2005/tsprfprb.mspxhttp://www.microsoft.com/technet/prodtechnol/sql/2005/tsprfprb.mspxhttp://blogs.msdn.com/sqlcathttp://blogs.msdn.com/sqlcathttp://blogs.msdn.com/sqlcat8/14/2019 i103 SQL Moss
29/30
11. to 12. April 2007 | Zurich, Switzerland
8/14/2019 i103 SQL Moss
30/30
11 to 12 April 2007 | Zurich Switzerland
Recommended