Upload
trungt2k6
View
213
Download
0
Embed Size (px)
Citation preview
8/7/2019 Session13_64Bit
1/31
SQL Server 64 bit
Vu Tuyet [email protected]
Hanoi University of Technology
1
8/7/2019 Session13_64Bit
2/31
Microsoft
Microsoft
Outline
Overview of database performance and scalability
Compatibility
Advantages of 64-bit environment Consideration for choosing SQL Server 64-bit
Deployment consideration
2
8/7/2019 Session13_64Bit
3/31
Microsoft
Microsoft
Database Performance and Scalability
Many applications running on 32-bit platforms today areapproaching or have exceeded the limits of the platform.
Advanced DBMS capabilities, data is growing numbers of business
users. Organizations are consolidating servers to simplify critical data
center operations. Consolidation can reduce managementcomplexity and cost, while reducing physical space requirements inthe data center.
8/7/2019 Session13_64Bit
4/31
Microsoft
Microsoft
SQL Server 64 bit
Cost Savings
Scalability
The highlyscalable database platform for memory
intensive, performance-criticalbusiness applications
Optimized for Windows Server 2003 and ItaniumOptimized for Windows Server 2003 and Itanium Great performanceGreat performance
Large memory addressability (up to 32 TB)Large memory addressability (up to 32 TB)
Nearly unlimited virtual memory (up to 8 TB)Nearly unlimited virtual memory (up to 8 TB)
I/O savings due to larger memory buffer poolsI/O savings due to larger memory buffer pools
TT--SQL codeSQL code--compatibility with SQL Server 2000compatibility with SQL Server 2000
8 node clustering support8 node clustering support
Same onSame on--disk format as 32disk format as 32--bit for easy migrationbit for easy migration
One setup for database & OLAP based on WindowsOne setup for database & OLAP based on Windows
Installer technologyInstaller technology Compelling alternative to expensive Unix solutionsCompelling alternative to expensive Unix solutions
Manageability
8/7/2019 Session13_64Bit
5/31
Microsoft
Microsoft
32bit vs. 64 bit
AWEMemoryAWEMemory
(up to 32GB)(up to 32GB)
3GB Virtual3GB Virtual
AddressspaceAddressspace
available toavailable to
SQL ServerSQL Server
SQL Server 2000SQL Server 2000 32bit32bitrunning on a Xeon Serverrunning on a Xeon Server
VirtualVirtualAddressAddress
SpaceSpace
(currently(currently
tested up totested up to
512 GB)512 GB)
SQL Server 2000SQL Server 2000 64 bit64 bitrunning on an Itanium 2running on an Itanium 2
ServerServer
Buffer pool pagesBuffer pool pages
can be mapped /can be mapped /
unmappedunmapped
As pages areAs pages areneeded, they canneeded, they can
be mapped intobe mapped into
the virtual addressthe virtual address
spacespace
Some structureSome structure
stay in virtualstay in virtual
address memoryaddress memoryincluding planincluding plan
cache, cursorcache, cursor
structures andstructures and
user connectionuser connection
contextcontext
Cost associatedCost associated
with mapping /with mapping /
unmappingunmapping
Virtual address spaceVirtual address space
available to allavailable to all
structuresstructures
Direct accessDirect access nono
map costmap cost
Access to largeAccess to large
amounts of physicalamounts of physical
memory in virtualmemory in virtual
address spaceaddress space
Current and futureCurrent and future
hardwarehardware
8/7/2019 Session13_64Bit
6/31
Microsoft
Microsoft
The primary differences between the SQL
64-bit and SQL 32-bit The 64-bit architecture offers a larger directly-addressable memory space. SQL
Server 2005 (64-bit) is not bound by the memory limits of 32-bit systems. Therefore,more memory is available for performing complex queries and supporting essentialdatabase operations.
The 64-bit processor provides enhanced parallelism, thereby providing more linear
scalability and support for up to 64 processors, and yielding stronger returns perprocessor as compared to 32-bit systems.
The improved bus architecture enhances performance by moving more data betweencache and processors in shorter periods.
A larger on-die cache allows for faster completion of user requests and more efficientuse of processor time.
8/7/2019 Session13_64Bit
7/31
MicrosoftMicrosoft
Advantages of 64-bit environment
Memory addressability
Larger numbers of processors and more linear scalability
per processor Enhanced bus architecture
8/7/2019 Session13_64Bit
8/31
MicrosoftMicrosoft
Memory addressability
A 32-bit system can directly address only a 4-GB address space.
Additional memory is indirectly accessible by using Address
Windowing Extensions (AWE) on 32-bit platforms, as described in a
later section. Windows Server 2003 SP1 running on the Intel Itanium64-bit architecture supports up to 1,024 gigabytes of both physical
and addressable memory.
8/7/2019 Session13_64Bit
9/31
MicrosoftMicrosoft
Larger numbers of processors and more
linear scalability per processor Improvements in parallel processing and bus architectures enable 64-bit
platforms to support larger numbers of processors (up to 64) while providingclose to linear scalability with each additional processor. With a largernumber of processors, SQL Server can support more processes,
applications, and users in a single system. Server platforms that offer more than 32 CPUs are available exclusively on
64-bit architecture. The highest TPC-C benchmark figures for SQL Serverhave been achieved on 64-bit systems because these systems leverageboth large amounts of memory and the superior scaling of 64-bit processorson the 64-bit architecture.
8/7/2019 Session13_64Bit
10/31
MicrosoftMicrosoft
Enhanced bus architecture
The bus architecture on current 64-bit chipsets is faster
and wider than earlier generations. More data is passed
to the cache and processor; this is somewhat analogousto the improvement that broadband connections offer
over dial-up connections.
8/7/2019 Session13_64Bit
11/31
MicrosoftMicrosoft
Industry-Leading Features
Analysis Server Gartner claimed Microsoft Analysis Server best of breed
Auto Configuration, Tuning
Loading Data Bulk Insert rates of 70 MB/Sec+
Replication transactional replication 2000 cmds/sec
Management Tools Set the bar
Reliability -- testing unmatched in the industry Utilities Fast Backup, Best re-org and very fast Load
SQL CE, Query Processor, Storage Engine, Developer talent, XML, etc.
8/7/2019 Session13_64Bit
12/31
MicrosoftMicrosoft
Example Terabyte-Scale Deployments
Large-ScaleOLTP and Data Warehousing
Call CenterMgmt / Telecom Billing Verizon (19 TB)
Credit Scoring and Collections Fair Isaac (13 TB)
Retail Analytics / BI Edgars Consolidated (4 TB)
Retail Banking Analytics Royal Bank of Scotland (3 TB) SAP Pilgrims Pride (3 TB)
Brokerage Front and Back-Office CSS Software (1+ TB)
Loss Prevention: (US Retail Chain) Rite Aid (1+ TB)
Scientific / New Generation
Bioinformatics: Rosetta Genomics (10 TB)
GeoSpatial: Terraserver (3+ TB)
Astronomy: SkyServer (~1TB 5TB)
8/7/2019 Session13_64Bit
13/31
MicrosoftMicrosoft
What is 64-bit SQL Server?
Same codebase as SQL Server
All pointer types are now 64 bit Good news: Lots of virtual memory
Bad news: Control structures bigger
Flat memory addressing to 512GB of RAM Does NOT require AWE support, massive cache useable by all components of
SQL: Stored proc, OLAP, sort area etc.
Massive Scale-up support 64-way HP, 32-way NEC, 16-way Unisys
Until very recently MSFT held fastest TPC number
Easy Database Migration & Integration Detach/Attach, Log shipping, Replication etc.
8-node Fail-over clustering support
8/7/2019 Session13_64Bit
14/31
MicrosoftMicrosoft
Compatibility
Maintains T-SQL code-compatibility with SQL Server 32-bit releases
Same SQL Server 2000 code base plus service pack fixes and
performance enhancements
No changes in database file format No changes in client applications when connecting to a 64-bit
backend versus a 32-bit backend
Supported Clients
SQL Server 2005 (64-bit) is optimized to run on servers using Intel
Itanium 2, AM
DO
pteron, AM
D Athlon 64, Intel Xeon with EM
64Tsupport, or Intel Pentium IV with EM64T support processors
8/7/2019 Session13_64Bit
15/31
MicrosoftMicrosoft
64-bit gaps
Some non-engine SQL components are not currently
supportedon 64-bit:
Graphical Admin Tools
Data Transformation Services Reporting Services
Notification Services
SQL Mail
English query
These require a 32-bit supporting instance to host
8/7/2019 Session13_64Bit
16/31
MicrosoftMicrosoft
64-Bit Winning Scenarios
Workloads stressing Virtual Memory Limited to 3GB on 32-bit, regardless of AWE
Applications that stress
Procedure cache and cursor memory
Sort, index and hash table memory Connection memory
Analysis Services memory Examples:
Server Consolidation
High-Volume, diverse OLTP
Large-Scale OLAP
Simultaneous queries with large table joins
8/7/2019 Session13_64Bit
17/31
MicrosoftMicrosoft
64-Bit Winning Scenarios - 2
Massive Scale-up Scenarios
More linear scalability beyond 8-way, and especially beyond 16-
way
Server Consolidation Workloads leveraging large SQL Buffer Cache
OLTP with large working sets
Relational Data Warehouses
64-bit eliminates performance overhead of AWE, the 32-bit large-
memory technology
8/7/2019 Session13_64Bit
18/31
MicrosoftMicrosoft
SQL Server (64-bit)64-bit address space
Flat address space
Applies to all memory
structures
Procedure cache
Data structures
Locks
Buffer pool
Sorts, joins
User connections
DB Page Buffers need notundergo AWE map/unmap
8/7/2019 Session13_64Bit
19/31
MicrosoftMicrosoft
Example: Server Consolidation / Larger
Procedure Cache
Internal test of a 500-database consolidation; accounting
application
Scarce resource on 32-bit is Procedure Cache
Migrating to 64-bit and eliminating the bottleneck reduces
CPUand enables greater throughput
8/7/2019 Session13_64Bit
20/31
MicrosoftMicrosoft
Consolidation / Proc Cache500 Pace database
2379
7059
14133
2318
4770
0
5,000
10,000
15,000
30sec 10sec 5sec
Thinktime
Tpm Tpm (64)
Tpm (32)
500 Pace databases
36.7
81.2
9.0
25.3
51.4
0
20
40
60
80
100
120
30sec 10sec 5sec
Thinktime
CPU%,
SQ
L
comp/sec SQL comp/sec(32)
CPU% (32)
SQL comp/sec(64)CPU% (64)
TPM versus think time
CPU% and SQLcompilations/sec
versus think time
8/7/2019 Session13_64Bit
21/31
MicrosoftMicrosoft
Example: Large-Scale OLTP Migration
Large US Escrow / Title company
Document management, title and tax processing
High-volume, complex transactions and searches
Refinance boom had stressed their 32-way 32-bit servers to over70% CPU at peak
MigratedOLTP from 32-way 32-bit to 32-way 64-bit
Reduced CPU from 70% to 30%
Indexing time improved by 30%
8/7/2019 Session13_64Bit
22/31
MicrosoftMicrosoft
Example: Scale Up
Bulk Insert Throughput
16-way Unisys Cassin (Itanium II 1Ghz) and16-way Unisys
ES7000 (1.6Ghz Xeon) both with 64GB of RAM
32-bit vs. 64-bit BULK INSERT Throughput
0
10
20
30
40
50
60
70
80
0 2 4 6 8 10 12 14 16 18
Number of BULK INSERT streams
BulkLo
adThroughpu
(
MB/sec)
32-bit
ES7000
64-bit
CASSIN
8/7/2019 Session13_64Bit
23/31
MicrosoftMicrosoft
Example: Eliminate AWE
Table Tot Rows Data Size(MB) Index Size (MB)
ORDERS 48,223,600 6,188.32 2,781.53
CUSTOMER 121,303 14.18 4.14
PAYMENT 130,414 11.52 3.21
TOTAL 48,475,317 6,214.02 2,788.88
CPUs
64 bit 64-bit Faster by 32 bit
CPU Time Elapsed Time CPU Time Elapsed Time CPU Time Elapsed Time
16-way 36,120 2,994 2.07 1.87 74,905 5,601
4-way 30,470 7,931 1.85 1.99 56,313 15,819
Re-select data which is already memory-resident
Query: select sum(Qty) from ORDERS
16-way Unisys Cassin (Itanium II 1Ghz) and 16-way Unisys
ES7000 (1.6Ghz Xeon) both with 64GB of RAM (16GB to SQL)
8/7/2019 Session13_64Bit
24/31
MicrosoftMicrosoft
Advantages Of Analysis Services (64-Bit)
Not constrained by 3GB memory
limit
Dimension memory + Shadow
dimensions + Buffer space
(partitions)
Cache fills
remaining space
Huge dimensions supported in
memory
MOLAP dimensions are extremely
large, but provide best queryperformance
DimensionDimension
MemoryMemory
ShadowShadow
Dimen
sio
nsD
imens
io
ns
AvailableAvailable
CacheCache
ProcessingProcessing
BuffersBuffers
8/7/2019 Session13_64Bit
25/31
MicrosoftMicrosoft
Advantages Of Analysis Services (64-Bit)
More parallelism in partition processing is possible due to memory
advantages
Each partition needs working memory
Analysis Services can make use of huge memory available forquery cache and cube processing
Faster aggregation processing
Aggregations are built in memory during
cube processing, avoiding Temp Files
Very large filesystem cache speeds cube query operations
8/7/2019 Session13_64Bit
26/31
MicrosoftMicrosoft
Example: Analysis ServicesOLAP Large Customer Dimension
Transaction tracking to customer level 3 Million key
customers
Migrated to 64-bit allowed support of the full customer
dimension Memory also speeded data load and aggregation time by
factor of 10
Expanded size of customer dimension to 4.5 M
8/7/2019 Session13_64Bit
27/31
MicrosoftMicrosoft
Good SQL Server 64-Bit Candidates
Large working set size (BP) 6-8GB+
I/O intensive
Save on processing i/o interrupts, BP thrashing (critical sections)
I.e., TPC-C like
Large scale OLAP
Large number of dimension members
Large-scale parallel processing
Complex queries
Sorts, joins, workspace that can spill to disk
ERP (including Supply Chain), CRM, Financial Apps
Relational Analytics i.e., PSFT EPM, SAP BW
Virtual Memory
Many open cursors
Procedure cache (not an excuse for bad design)
ODBC, OLEDB parm caching
SQL Server 64bit can significantly improve overall dbms performance and
throughput
8/7/2019 Session13_64Bit
28/31
MicrosoftMicrosoft
Customer Examples / Deployed
Leading Express Package Shipper
Customer-level OLAP for profitability analysis / route cost
structures
1+ TB source data
Clalit Health Services
Largest Healthcare provider in Israel
Combined Relational and OLAP
1+ TB
8/7/2019 Session13_64Bit
29/31
MicrosoftMicrosoft
Customer Examples / Under
Development Large brokerage network
Massive customer-level OLAP solution for assets and trading
activity
Millions of products and Millions of accounts
Property & Casualty Insurance provider
Multi-TB relational analytics workload
Initial workload benchmarks show 2.5x query improvement of
1.5Ghz Itanium II vs 1Ghz Xeon
8/7/2019 Session13_64Bit
30/31
MicrosoftMicrosoft
64-bit Caveats Non-winners:
Workloads on 4-way servers or smaller that are notunder
memory pressure
E.g. 3+ Ghz Xeon architectures will often
outperform Itanium II at 1.5 Mhz when virtualmemory is not under pressure
Beware the oversell:
64 Bit 2x performance of 32 bit
4-way Itanium II 8-way Xeon
8/7/2019 Session13_64Bit
31/31
MicrosoftMicrosoft
64-bit Caveats Extended stored procedures and AS UDFs must be
recompiled for 64-bit
ODBC Drivers for 3rd party databases
Device drivers for SAN
Management and monitoring tools