November 2006 64-Bit SQL Server
November 2006 64-Bit SQL Server
Agenda
64-bit Platforms
64Benefits of 6464-bit SQL
64--Bit Challenges and Best Practices
64
Memory Configuration
NUMA
Performance
64-bit Platforms
The mainstream highhigh-volume server
platforms are now 6464-bit OS ready
Your choice is whether to run 64 bit SQL
on these platforms, or to run 3232-bit SQL on
the 6464-bit or 3232-bit operating system
For highhigh-scale 6464-bit systems, you also
need to choose between Itanium (IA64)
and x64 offerings
http://www.microsoft.com/windowsserver2003/64bit/ipf/ia32el.mspx
Montvale+
Multi--core and massive cache, slated 2007
Multi
Main Vendors
HP, Unisys, NEC, Fujitsu
Properties of x64
Runs 6464-bit Windows, drivers and software
specifically compiled for X64 instruction set
Can act like an x86 processor when an X64
system is booted into a 3232-bit operating system
and as such runs all 3232-bit versions of Windows
commercially available today
Runs 3232-bit software without recompilation
Does not run Itanium versions of Windows nor
drivers compiled for Itanium
x64 Offerings
Two chip vendors, same OS required
AMD (Opteron)
Eliminates FSB and uses HyperTransport
Currently limited to 1MB L2 cache
64-bit App
running on
64-bit OS
32-bit App
running on 64-bit
OS (in WOW)
32-bit App
64-bit App
32-bit App
32-bit App
32-bit App
64-bit App
32-bit App
WOW
WOW
32-bit OS
64-bit OS
64-bit OS
x64 Hardware
x64 Hardware
x64 Hardware
64-bit OS
x64 HW
32--bit
32
OS
64--bit
64
OS
Itanium
64--bit
64
OS
WOW64
64--bit
64
OS
64--bit
64
OS
WOW64
Yes
Yes
No
No
No
No
No
No
No
Yes
Yes
Yes
No
No
No
No
No
Yes
No
No
No
No
No
No
Yes
Yes
Yes
No
No
No
Yes
Yes
No
Yes
No
Yes
Yes
No
No
No
Agenda
64-bit Platforms
64Benefits of 6464-bit SQL
64--Bit Challenges and Best Practices
64
Memory Configuration
NUMA
Performance
Memory Primer
32--bit applications
32
All 3232-bit applications are limited to a 4GB virtual
address space (VAS)
An application can utilize 2GB (3GB using /3gb, or
4GB in x64 WOW). Remainder is reserved for OS
addresses
Using AWE, some applications can use larger
amounts of memory by mapping / unmapping
additional memory into the VAS
64--bit applications
64
Flat, huge virtual address space
No mapping needed for large memory access
DB Page Cache
Plan Cache
Query Workspace.
Buffer Pool
(8KB buffers)
Locks
Other
AWE
Addressable
Memory
Plan Cache
Large number of compiles/sec
Low cache hit ratio
Locks
Large percentage of VM occupied by locks
Agenda
64-bit Platforms
64Benefits of 6464-bit SQL
64--Bit Challenges and Best Practices
64
Memory Configuration
NUMA
Performance
64-Bit Challenges
64--bit drivers for Data Access
64
Analysis Services and Integration Services require the
64--bit versions of 3rd party OleDB drivers to support
64
data sources such as Oracle, Informix, etc.
No 6464-bit ODBC access supported
Verify before purchasing your server!
Memory Configuration
Alternatives
Use separate hardware partitions or
separate servers for solutions that
combine Relational, AS and SSIS
Eliminates risks of crosscross-application memory
contention
But this may underutilize CPU resources
OR
Manage memory use explicitly for each
component running on a single server
Less dynamic
+ Guarantees resources for a critical workload
- May leave insufficient memory for other applications
- May leave insufficient memory for nonnon-buffer pool
components (CLR GC heap, DLLs, etc)
NOTE: sqlservr Private Bytes and Working Set are not correct
in Perfmon when Lock Pages are used.
Agenda
64-bit Platforms
64Benefits of 6464-bit SQL
64--Bit Challenges and Best Practices
64
Memory Configuration
NUMA
Performance
NUMA Considerations
All 6464-bit servers that scalescale-up are NUMA
platforms
Non Uniform Memory Access
Longer latencies for accessing memory on remote
nodes
Server
Pod/Node
Pod/Node
RAM
CPU
CPU
CPU
Pod/Node
RAM
CPU
CPU
Bus
CPU
CPU
RAM
CPU
CPU
CPU
CPU
CPU
NUMA Servers
All NUMA servers can be configured in BIOS to
expose to the OS either
N U M A M e m o ry, o r
In te rle a ve d M e m o ry
SS2005 RDBMS
NUMA Memory Management
SQL RDBMS instantiates an abstraction for each
NUMA node on the server
A S Q L N o d e in clu d in g la zyw rite r, b p o o l, sch e d u le rs,
IO port, etc.
NUMA Memory
Management Continued
SQL Tasks running on a node will use pages
allocated to that node (local or foreign) when
possible
B u t w ill u se a n o th e r n o d e s p a g e s if D B p a g e s a re
already cached there
W ill u se a n o th e r n o d e s p a g e s to sa tisfy a m e m o ry
grant when necessary
N o d e a llo ca tio n o f fo re ig n p a g e s ca n b e
monitored in Perfmon:
SP2 Improvements
SP2 has NUMA improvements for processing
SP2 can prepre-allocate memory per NUMA node with config entry
Agenda
64-bit Platforms
64Benefits of 6464-bit SQL
64--Bit Challenges and Best Practices
64
Memory Configuration
NUMA
Performance
Performance Considerations
SQL Server 6464-bit working set is larger than 3232bit SQL
Long pointers
Code path less likely to be found in processor cache
than equivalent 3232-bit code
Performance Considerations
If you are not under memory pressure,
pressure, and do not
need to scale up,
up, and you want the absolutely
fastest singlesingle-thread performance
Use X64 instead of Itanium
Consider using 3232-bit SQL in the WOW or on 3232-bit OS
X e o n s la rg e r L 3 ca ch e m a y h a ve a n o tice a b le im p a ct
relative to Opteron
Resources
SQLCAT Team Blog: http://blogs.msdn.com/sqlcat
SQL Server memory management, 6464-bit and NUMA
Slava Oks Blog
http://blogs.msdn.com/slavao
Integration Services
Blogs by Ashvini Sharma, Donald Farmer at sqljunkies.com
http://www.sqljunkies.com/WebLog/donald_farmer
http://sqljunkies.com/WebLog/ashvinis
2006 Microsoft Corporation. All rights reserved. Microsoft, Windows, Windows Vista and other product names are or may be registered trademarks 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 date 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 accuracy 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.