Date post: | 02-Apr-2018 |
Category: |
Documents |
Upload: | edmundo-lozada |
View: | 230 times |
Download: | 0 times |
of 24
7/27/2019 M_03_1 00 Instance Architecture and Demos and Labs.pdf
1/24
Module 3: Instance
Architecture
Part 1
7/27/2019 M_03_1 00 Instance Architecture and Demos and Labs.pdf
2/24
Overview
PART 1:
Configure a Database Server
Memory Architecture Overview
Memory Areas and Their Functions
Process and Thread Architecture
7/27/2019 M_03_1 00 Instance Architecture and Demos and Labs.pdf
3/24
Configuration of a Server
Using Configuration Parameters to Allocate and ManageResources
Oracle Configuration
Use of initialization parameters (init.ora or spfile)
ALTER SYSTEM, ALTER DATABASE
SQL Server Configuration
Setting server properties using SQL Server Management Studio
(SSMS)
The role of sp_configure system stored procedure
Startup parameters in SQL Server Configuration Manager
7/27/2019 M_03_1 00 Instance Architecture and Demos and Labs.pdf
4/24
Demonstration: Configuration Parameters
Demonstration:Configuration Parameters
7/27/2019 M_03_1 00 Instance Architecture and Demos and Labs.pdf
5/24
Memory Architecture Overview
Virtual MemoryRelevance to DBMS
Sharing Data in Memory
Using Memory Intelligentlyto Reduce I/O and EnhancePerformance
7/27/2019 M_03_1 00 Instance Architecture and Demos and Labs.pdf
6/24
Memory Address Space Oracle
Components of Oracle in Memory
Application components
RDBMS components
SYSTEM GLOBAL AREA
JAVA POOL
LARGE
POOLSTREAMS
POOL
SHARED
POOL
REDO
BUFFERBUFFER
CACHE
Oracle
Process
ServerProcess
ServerProcess
Server
Process
Background
ProcessPGAPGA PGA
PGA PGA
Automatic Memory Management
Manage both SGA and PGA
Automatically sizes memory
7/27/2019 M_03_1 00 Instance Architecture and Demos and Labs.pdf
7/24
SQL Servers Memory Pool and Oracles SGA
Oracle System Global Area (SGA)
Buffer Cache Shared Pool
LargePool
JavaPool
RedoBuffers
FixedSGA
StreamsPool
SQL Server Memory Pool
Buffer Cache
Procedure Cache
Connection
ContextLog Cache System
Structures
CLR Hosting
Layer
Column Store Cache
7/27/2019 M_03_1 00 Instance Architecture and Demos and Labs.pdf
8/24
SQL Server Architecture (SQLOS)
Components of SQL Server Architecture
Non-Preemptive Scheduling
Memory Management
Hosting Subsystems
Memory Management Non-PreemptiveScheduling
SQLOS
Memory Nodes
Memory Clerks
Caches
Pools
Memory Objects
Scheduling Nodes
Schedulers
Tasks
Worker Threads
System Threads
Exception Handling Resource Monitoring
7/27/2019 M_03_1 00 Instance Architecture and Demos and Labs.pdf
9/24
Memory Address Space Comparison (Cont.)
Memory Allocation in SQL Server
Dynamic at
Higher level (memory pool, etc.)
Lower level (buffer cache, procedure cache, etc.)
Few configurable parameters
Memory Address Range
32-bit (x86) - legacy
/IncreaseUserVA
64-bit (x64)
7/27/2019 M_03_1 00 Instance Architecture and Demos and Labs.pdf
10/24
7/27/2019 M_03_1 00 Instance Architecture and Demos and Labs.pdf
11/24
Process and Thread-Based Architecture
Process - memory space to protect applications
Threads
Execute code
Allocated time on CPU
Managed by Operating System
Fibers are light-weight threads
reduce context switching overhead
Oracle uses processes in Unix and threads in Windows
Both Oracle and SQL Server use threads and optionally fibers.
Allocate thread assignment with CPU affinity
7/27/2019 M_03_1 00 Instance Architecture and Demos and Labs.pdf
12/24
Review
How to configure a database serverMemory Address Space of a database server
Memory areas inside Oracle SGA and their SQL Serverequivalents
Process- and thread-based architecture relevant toRDBMS
7/27/2019 M_03_1 00 Instance Architecture and Demos and Labs.pdf
13/24
Module 3: Instance
Architecture
Part 2
7/27/2019 M_03_1 00 Instance Architecture and Demos and Labs.pdf
14/24
Overview
PART 2:
Controlling Resources in SQL Server 2012
Client and RDBMS Interactions
Background Processes/Threads and Their Functions
7/27/2019 M_03_1 00 Instance Architecture and Demos and Labs.pdf
15/24
Controlling Resources in SQL Server 2012
Resource Governor is an Enterprise Edition featureCPU and memory limits per workload
Resource Governor allows for:
Workload prioritization
Predictable performance
Preventing runaway query
Accounting of resource usage
7/27/2019 M_03_1 00 Instance Architecture and Demos and Labs.pdf
16/24
Resource Governor = Greater Control
Resource Governor Performance
Availability
Key Components
Resource Pools Workload Groups
Classification
7/27/2019 M_03_1 00 Instance Architecture and Demos and Labs.pdf
17/24
Demonstration: Using the Resource Governor
Demonstration:
Using the Resource Governor
7/27/2019 M_03_1 00 Instance Architecture and Demos and Labs.pdf
18/24
Oracle ClientDatabase Interaction
Oracles two modes of interaction are: Dedicated Server uses a dedicated server process per client
session
Shared Server uses dispatchers and shared server processes
DATABASE Data Files
USERS
User
Process
User
Process
User
Process
Client
Client
Client
Request
Queue
Database
Buffer
Cache
Response
Queue
Dispatcher
Shared
Server
Dedicated
Server
INSTANCE
SGA1
5
6
7
2
3
4
8
7/27/2019 M_03_1 00 Instance Architecture and Demos and Labs.pdf
19/24
SQL Server ClientDatabase Interaction
SQL Server uses the shared server mode
Functionality of the dispatcher is facilitated by the networker thread
Functionality of the shared server processes by the worker threads
Users
UserProcess
User
Process
User
Process
Client
Client
ClientDatabase
Buffer
Cache
Data Files
Relational
EngineODBC Storage
Engine
Open
Data
Services
Worker
Thread
Worker
Thread
Worker
Thread
Memory
Pools
7/27/2019 M_03_1 00 Instance Architecture and Demos and Labs.pdf
20/24
Oracle Background Processes
USERS
UserProcess
User
Process
User
Process
Client
Client
Client
INSTANCE
DATABASE
Automatic Storage Management
Process
Monitor
System
Monitor
Queue
Monitor
Job
Queue
Event
Monitor
Recoverer
Trace
Writer
Dispatcher
Shared
Server
RequestQueue
Response
Queue
SGA
Redo
Log
Buffer
Data FilesArchive Log
Files
Control
Files
Redo Log
Files
Database
Buffer
Cache
Dedicated
Server
Database
Writer
Checkpoint
Archiver
Log
Writer
7/27/2019 M_03_1 00 Instance Architecture and Demos and Labs.pdf
21/24
SQL Server Background Processes
Users
User
Process
User
Process
User
Process
Client
Client
Client
Relational
Engine
ODBCStorage
Engine
Data Files
Log
Files
Database
Buffer
Cache
Log
Cache
Database
Cleanup
Worker
Thread
Log
Writer
Lazy
Writer
Worker
Thread
Database
Shrinking
Open
DataServices
Memory
Pool
7/27/2019 M_03_1 00 Instance Architecture and Demos and Labs.pdf
22/24
Comparing Background Processes
Oracle
Process
Oracle
Identifier
SQL Server
Equivalent
Required
Process Monitor PMON SQLOS Mandatory
System Monitor SMON Database
Cleanup/Shrinking
Mandatory
Database Writers DBWn Lazywriter Mandatory
Checkpoint Process CKPT Database Checkpoint Mandatory
Recoverer RECO MS DTC Optional
Log Writer LGWR Log Writer Mandatory
Archive Processes ARCn N/A N/A
Job Queue Processes Jnnn SQL Agent Optional
Job Queue Coordinators CJQn SQL Agent Optional
Queue Monitor Processes QMNn SQL Agent Optional
Parallel Query Slave
Processes
Pnnn Worker Threads Mandatory
Dispatcher Dnnn Networker Thread Mandatory
Shared Servers Snnn Worker Threads Mandatory
7/27/2019 M_03_1 00 Instance Architecture and Demos and Labs.pdf
23/24
Demonstration: Background Processes
Demonstration:
Background Processes
7/27/2019 M_03_1 00 Instance Architecture and Demos and Labs.pdf
24/24
Review
Controling resources with Resource GovernorClient interaction with database server
Background processes and threads and what they do