Professional Documents
Culture Documents
Agenda
Architecture Overview
PROCESS MODEL
CPU Usage
CPU being used CPU idle, not working on process
Integrated parallelism
Dynamic Scalable
Threads
Services requests from client application (user threads)
E.g. Select query issued by a client is serviced by an user thread
Accomplish internal tasks like database I/O, logging I/O, page cleaning, administrative functions (internal threads) A thread can run on any VP in its class To run a thread, VP retrieves threads data and environment stack from ready queue and executes request
9 2010 IBM Corporation
Fan-out
Physical Processor 2 Physical Processor 3
Virtual Processor
Virtual Processor 1
Virtual Processor 2
Virtual Processor 3
10
As more users connect, the number of processes remains static as each connection represents a request to run a thread, not a process
Notice the bottom axis shows Virtual Processor Usage Over Time. This represents time the thread is running on a pre-existing oninit process
11
CPU Usage
12
Time to Process
Parallel
Parallelized
2010 IBM Corporation
Disk Scan
14
Exchange Threads
select count(*) from tickets a, flightleg b where a.flno = b.flno and orig=DFW order by a.class
Exchange Threads
Exchange Threads
15
MEMORY MODEL
16
Shared Memory
O/S feature that allows database server processes to share data by sharing access to pools of memory Reduces disk I/O by caching data from disk Provides the fastest method of inter-process communication Provides communication channels for local client applications that use IPC communication
Unallocated space
Unallocated space
Private data
Private data
Program text
17
Virtual segment
Contains information about the threads and sessions, and the data used by them Could be paged out to disk by the operating system Expandable
Message segment
Holds the message buffers used in client-server communication if shared memory communication is configured
18 2010 IBM Corporation
19
STORAGE MODEL
20
Disk Page
The basic unit of storage in a server All database and system information is stored on pages The minimum unit of I/O in a server is a page The size of a page is by default 2KB on most UNIX systems and 4KB on AIX and Windows Page size can also be configured (max of 16KB)
21
Tablespace
Logical collection of extents Storage for table A table can have multiple tablespaces
22
Tablespace
Extent
Chunks
Largest unit of contiguous disk dedicated to database server data storage Chunk can be a raw device (characterspecial device), a piece of a raw device, or a UNIX file (cooked file) Maximum size of chunk is 4TB Maximum allowable chunks is 32767
23
Dbspaces
Logical collection of one or more chunks Can have between 1 and 32767 chunks Maximum allowable dbspaces is 2047
24
Storage Model
Dbspace
Chunk
Chunk Chunk
Page
Extents
Tablespace
25
Blobspaces
Special dbspace that stores simple large objects (TEXT and BYTE data) Basic unit of storage in blobspace is a blobpage Blobpage size can be configured as a multiple of the database server page size Database server writes data stored in a blobspace directly to disk (not buffered)
26
Sbspaces
Special dbspace that stores smart large objects (BLOB and CLOB data) and user defined data Pages in sbspace are called sbpages Sbpage size is same as the database server page size and is not configurable Basic unit of allocation in sbspace is an extent Writes to sbspace are buffered by default
Buffering can be turned off at sbspace creation time
27
Mirroring
Process of automatically writing same data to two disks Eliminates data loss due to disk failure If one disk fails, the data is still available on the other disk Costs Additional disk space Performance cost of having to write to two locations
Primary Chunk Mirrored Chunk
Writes
28
29
Logical logging
Process of recording transaction details Transaction records are stored in logical log Logical log is comprised of logical log files, which are collections of contiguous pages on disk Required for transaction rollback and recovery purpose in event of a system failure
30
Recovery
If a system failure occurs, the database server restarts at that established point Before-images of pages modified since checkpoint are restored from physical log Transactions since checkpoint are then replayed from the logical log to get the server to the consistent state just before the time of failure
31
Resources
The Online IDS Information Center
http://publib.boulder.ibm.com/infocenter/idshelp/v115/index.jsp
Replication)
http://www-128.ibm.com/developerworks/blogs/page/gbowerman (IDS Application Development) http://www-128.ibm.com/developerworks/blogs/page/idsteam (IDS Experts Blog)
32