Expert
Oracle
Exadata
Second Edition
Martin
Bach
Karl Arao
Andy
Colvin
Frits
Hoogland
Kerry
Osborne
Randy
Johnson
Tanel
Poder
Contents
J
AbouttheAuthors xxi
Acknowledgments.
xxiiiIntroduction xxv
Chapter
1: What Is Exadata? 1An Overview of Exadata 1
History
of Exadata 2Alternative ViewsofWhat Exadata Is 4
DataWarehouseAppliance 4 OLTP Machine 5
Consolidation Platform 5
Configuration Options
6Exadata Database Machine X5-2 6 ExadataDatabase MachineX4-8 7 ExadataStorage ExpansionRack X5-2 7
Hardware
Components
9 Operating Systems 10 Database Servers 10 StorageServers 10 InfiniBand 10 FlashCache 11 Disks 11CONTENTS
Software
Components
11Database Server Software 11
StorageServer Software 14
SoftwareArchitecture 16
Summary
20Chapter
2:Offloading
/ Smart Scan 21Why Offloading
IsImportant
21 WhatOffloading
Includes 26Column Projection 27
PredicateFiltering 31
StorageIndexes and Zone Maps 33
SimpleJoins(Bloom Filters) 35
FunctionOffloading 38
Compression/Decompression 41
Encryption/Decryption 42
Virtual Columns 42
Supportfor LOBoffloading 45
JSON Supportand Offloading 46
DataMiningModelScoring 47
Non-Smart ScanOffloading 48
Smart Scan
Prerequisites
49Full Scans 49
Direct Path Reads 50 ExadataStorage 53
Smart Scan Disablers 54
SimplyUnavailable 54
Revertingto BlockShipping 55
SkippingSomeOffloading 56
SkippingOffloading silently 56
Howto
Verify
That Smart Scan IsHappening
5710046 Trace 57
Session Performance Statistics 58
OffloadEligible Bytes 59
SQLMonitoring 63
Parameters 65
Summary
66Chapter
3:Hybrid
ColumnarCompression
67Oracle Storage Review 67
Disassemblingthe Oracle Block 70
Compression
Mechanics 73BASICCompression 73
OLTPCompression 74
HybridColumnarCompression 76
HCC Internals 80
What Happens WhenYou CreateaHCCCompressedTable? 83
HCC Performance 86
LoadPerformance 86
QueryPerformance 87
DML Performance 90
Expected
Compression
Ratios 97CompressionAdvisor 97
Real-WorldExamples 99
Restrictions/Challenges
105MovingDatatoaNon-Exadata Platform 105
DisablingSerial Direct Path Reads 106
LockingIssues 106
iCONTENTS
Common Usage Scenarios 111
Automatic DataOptimization 112
ExampleUse CasesforADO 114
Summary
120Chapter
4:Storage
Indexes 121Structure 121
Monitoring Storage Indexes 122
Database Statistics 123
Tracing 124
Monitoring Wrap-Up 126
Controlling Storage
Indexes 126_kcfis__storageidx_disabled 127
_kcfis_storageidx_diag_mode 127
_celLstoridx^mode 127
_cell_storidxjTiinrnax_enabled 128
StorageSoftwareParameters 128
Behavior 129
Performance 130
Special Optimizationfor Nulls 132
PhysicalDistribution of Values 133
Potential Issues 134
IncorrectResults 134
Moving Target 135
PartitionSize 138
Incompatible Coding Techniques 138
Summary 139
Chapter
5: Exadata Smart Flash Cache 141Hardware 142
FlashMemoryin Exadata X4-2StorageServers 142 FlashMemoryin Exadata X5-2StorageServers 144
Flash Cache vs. Flash Disk 145
Using FlashMemoryasCache 146
Mixed Workload andOLTPOptimizations 150
Using FlashMemoryforDatabaseLogging 151
Using FlashMemorytoAccelerate Writes 153
MiscellaneousOtherWBFC-relatedOptimizations 155 How ESFC and ESFL Are Created 156
Enablingthe Write-back Flash Cache 158
FlashCacheCompression 162
ControllingESFCUsage 163
Monitoring
164At theStorage Layer 164
Atthe DatabaseLayer 170
Summary
176Chapter 6: Exadata Parallel
Operations
177Parameters 177
Parallelizationat the StorageTier 180
Auto DOP 180
Operationand Configuration 181
I/OCalibration 184
Auto DOPWrap-Up 186
ParallelStatement
Queueing
186The OldWay 187 The NewWay 187
ControllingParallelQueueing 190 ParallelStatementQueueing Wrap-Up 197
In-Memory
Parallel Execution 197Troubleshooting
Parallel Execution 206lCONTENTS
Chapter
7: ResourceManagement
• 209Consolidation 210
Typesof Database Consolidation 210
Instance
Caging
211Configuring InstanceCaging 212
SettingCPU_C0UNT 213
InstanceCaging Usageand Results 213 InstanceCagingandMultitenancy 214
Over-Provisioning 214
Binding
Instances toSpecific
CPUsUsing Cgroups
215Installation andConfigurationofCgroups 215
Oracle 12c
THREADED_EXECUTION
217Managing
PGAMemory
218Database Resource
Manager
221CreatingaCDB Resource Plan 222
Creatinga(Pluggable)Database Resource Plan 224
UsingtheSchedulertoChangetheResourcePlan 227
The Wait Event:resmgr: cpuquantum 228 Where to Go from Here 228 ResourceMappingPriorities 229 ResourceLimiting 229 OtherLimitingParameters 230 ConsumerGroup Mappings Using ORACLE_FUNCTION 231
Monitoringthe ResourceManager 232
ResourceManagerViews 233
I/O Resource
Manager
234IORM Methods 235
How IORMWorks 236 IORM Architecture 236
IORMObjective 238
ConfiguringInterdatabase IORM 238
CategoryIORM 241 I/O ResourceManagerandPluggableDatabases 243 I/O ResourceManagerProfiles 243
Resource
Management
Directives Matrix 244IORMMonitoringand Metrics 245
Summary 250
Chapter8:
Configuring
Exadata 251Exadata Network
Components
251TheManagementNetwork 252
The Client Access Network 252 The Private Network 252
About the
Configuration
Process 254Configuring
Exadata 256Step1:GatheringInstallationRequirements 256
Step2: Run Oracle ExadataDeploymentAssistant 257
Step3: Create Network VLANs and DNS Entries for Hostnames 285
Step4: Run CheckIP toVerify Network Readiness 285
Step5:Run Cables and Power to Exadata Racks 288
Step6: Perform HardwareInstallation 289
Step7:StageOneCommand Files and Oracle Software 289
Step8:ConfiguretheOperating System 291
Step9: Run OneCommand 294
Upgrading
Exadata 297CreatingaNew RAC Cluster 298
UpgradingtheExisting Cluster 299
Summary
301Chapter
9:Recovering
Exadata • 303Exadata
Diagnostic
Tools 303SunDiagnostics: sundiag.sh 304
CONTENTS
Backing Up
Exadata 308BackingUp the Database Servers 308
Backing UptheStorageCell 312
Backing
Upthe Database 316 Disk-BasedBackups 316Tape-Based Backups 317
BackupfromStandbyDatabase 318
ExadataOptimizationsforRMAN 318
Recovering
Exadata 319Restoringthe Database Server 320
RecoveringtheStorageCell 323
Summary 339
Chapter
10: Exadata Wait Events 341Events
Specific
toExadata 342 The "cell" Events 343PlanStepsThatTriggerEvents 344
Exadata Wait Eventsin the User I/O Class 346
cell smart tablescan 346
cell smart indexscan 350
cellsingleblockphysicalread 352
cell multiblockphysicalread 354
cell listofblocksphysicalread 355 cell smart file creation 356
cell statisticsgather 356 Minor EventsintheUser/10 Class 357
Exadata Wait Eventsinthe
System
I/OClass 358cell smart incrementalbackup 358
cellsmart restore frombackup 360
Exadata Wait Events in the Other and Idle Classes 361
cell smart flash unkeep 361 EventMeaning 362 xiv
Non-Exadata-Specific
Events 363 directpathread 363Enq:KO—fastobject checkpoint 364 reliablemessage 365
Resource
Manager
Events 366resmgr.becomeactive 366
resmgncpuquantum 368
resmgr:pqqueued 369
Summary
370Chapter
11: Exadata Performance Metrics 371Measuring
Exadata's Performance Metrics 371Revisiting
thePrerequisites
for Exadata Smart Scans 374Exadata SmartScan Performance 374
UnderstandingExadata Smart Scan Metrics and Performance Counters 378 Exadata Dynamic Performance Counters 378
When and How to Use Performance Counters 379 TheMeaningand Explanationof Exadata Performance Counters 383
Performance CounterReferenceforaSelected Subset 386
Understanding
SQLStatementPerformance 411Querying
cellsrv InternalProcessing
Statistics 414TheVSCELLFamilyofViews 415
The cellsrvstatutility 419
Summary
421Chapter
12:Monitoring
Exadata Performance 423 A SystematicApproach
423Monitoring
SQLStatementResponse
Time 424MonitoringSQL Statements with Real-TimeSQLMonitoring Reports 425
mCONTENTS
Monitoring
theStorage
CellLayer
441 AccessingCell Metrics intheCellLayer UsingCellCLI 442AccessingCell MetricsUsingtheEnterprise ManagerExadataStorageServerPlug-In 443 Which Cell Metricsto Use? 449
MonitoringExadataStorageCellOS-Level Metrics 450
Summary
461Chapter 13:
Migrating
toExadata 463Migration
Strategies
464Logical Migration
465Extract andLoad 466
Copying Dataover aDatabase Link 472
Replication-Based Migration 486
Logical Migration Wrap Up 492
Physical
Migration
492Backup
and Restore 493FullBackupand Restore 493
IncrementalBackup 495
Transportable Tablespaces 497
Cross-Platform TTS with IncrementalBackups 500
Physical Standby ;..503
Wrap Up Physical MigrationSection 505
Summary
506Chapter
14:Storage Layout
507Exadata Disk Architecture 507
FailureGroups 509
Grid Disks 512
StorageAllocation 514
Creating
Grid Disks 518CreatingGrid Disks 519
Grid DiskSizing.... 520
CreatingFlashDisk-Based Grid Disks 524
Storage Strategies
525Configuration Options 525
Isolating StorageCell Access 526
Cell
Security
528CellSecurity Terminology .529
CellSecurityBest Practices 529
Configuring ASM-Scoped Security 530
Configuring Database-Scoped Security 531
RemovingCell Security 534
Summary
536Chapter
15:Compute
NodeLayout
537Provisioning
Considerations 538Non-RAC
Configuration
539Split-Rack
Clusters 541Typical
ExadataConfiguration
543Multi-RackClusters 544
Summary
546Chapter
16:Patching
Exadata 547Types
ofExadata Patches 548Quarterly
Database Patch for Exadata 549ApplyingaQDPE in Place 550
ApplyingaQDPEbyCloningHomes 553
Exadata
Storage
Server Patches 556Applyingan ExadataStorageServerPatch 559
Upgrading Compute Nodes 565
UpgradingInfiniBandSwitches 568
ApplyingPatchestoStandby Systems 569
CONTENTS
Chapter
17:Unlearning
SomeThings
WeThought
We Knew 571A Tale of TwoSystems 571
OLTP-Oriented Workloads 572
Exadata Smart Flash Cache(ESFC) 572
Scalability 573
Write-lntensiveOLTP Workloads 573
DW-OrientedWorkloads 574
EnablingSmart Scans 574
ThingsThat CanCripple Smart Scans 576
OtherThingstoKeepinMind 583
Mixed Workloads 590
To IndexorNot to Index? 591
The0ptimi2erDoesn'tKnow 594
Using ResourceManager 598
Summary
598Appendix
A:CELLCLI and DCLI 599An Introductionto CellCLI 599
Invokingcellcli 600
GettingFamiliar withcellcli 602
SendingCommands fromtheOperatingSystem 607
UsingcellcliXMLOutputin the Database 607
ConfiguringandManagingthe StorageCell 609
An Introduction to deli 610
Summary
612AppendixB: Online Exadata Resources 613
My Oracle
Support
Notes 613The Authors'
Blogs
615Appendix
C:Diagnostic Scripts
617Appendix
D: exachk 621An Introduction to exachk 621
Running exachk 622
SavingPasswords for exachk 625
Automatingexachk Executions 627
Summary 629