Академический Документы
Профессиональный Документы
Культура Документы
com/db2/labchats
Sal Vella
Vice President, Development,
Distributed Data Servers and Data Warehousing
IBM
Matt Huras
Distinguished Engineer,
DB2 for Linux, UNIX, and Windows
IBM
3 3
© 2009 IBM Corporation
> Featured Speaker
Aamer Sachedina
Senior Technical Staff Member,
DB2 for Linux, UNIX, and Windows
IBM
4 4
© 2009 IBM Corporation
Agenda
Introduction
Goals & Value Propositions
Technology Overview
Technology In-Depth
Key Concepts & Internals
Efficient scaling
Failure modes & recovery automation
Stealth Maintenance
Unlimited Capacity
Any transaction processing or ERP workload
Start small
Grow easily, with your business
Application Transparency
Avoid the risk and cost of tuning your
applications to the database topology
Continuous Availability
Maintain service across planned and
unplanned events
CS CS
2nd-ary Log Log Log Log Primary
PowerHA pureScale technology from STG
Efficient global locking and buffer management
Shared Storage Access Synchronous duplexing to secondary ensures availability
Database
Data sharing architecture
Shared access to database
Members write to their own logs
Logs accessible from another host (for recovery)
Without changing
applications
Efficient coherency protocols
designed to scale without Single Database View
application change
Applications automatically and
transparently workload balanced
across members
% of Data Available
at the time it failed 100
50
Time (~seconds)
Introduction
Goals & Value Propositions
Technology Overview
Technology In-Depth
Key Concepts & Internals
Efficient scaling
Failure modes & recovery automation
Stealth Maintenance
Primary
Log Log
Members duplex GBP, GLM, GBP GLM SCA
SCA state to both a primary and
secondary Secondary
Done synchronously
Duplexing is optional (but recommended)
Set up automatically, by default
Shared database
(Single database partition)
13 © 2009 IBM Corporation
The Role of the GBP Client A :
Select from T1
Client B : Client
where C2=Y C :
Update T1 set C1=X Select from T1
GBP acts as fast disk cache where C2=Y where C2=Y
Commit
Dirty pages stored in GBP, then later,
written to disk
Provides fast retrieval of such pages Member 0 Member 1
when needed by other members
Wr
te
da
it e
ge
Force-at-Commit (FAC) Pa
ali
Pa
Inv
ad
ge
protocol ensures coherent Re
nt”
ile
access to data across
“S
members
DB2 “forces” (writes) updated pages to GBP GLM SCA
GBP at COMMIT (or before)
GBP synchronously invalidates any
copies of such pages on other members
– New references to the page on Page
other members will retrieve new Registry
copy from GBP
M1 M2
– In-progress references to page
can continue
14 © 2009 IBM Corporation
The Role of the GLM Client A :
Select from T1
Client B : Client
where C2=Y C :
Update T1 set C1=X Select from T1
where C2=Y where C2=Y
Grants locks to members Commit
upon request Member 0 Member 1
If not already held by another member,
or held in a compatible mode
X
Lo
ck
Re
q
Grants pending lock requests q
Wr
Re
te
Loc
when available
da
kR
it e
e k
elea ag oc
ali
L
Pa
se P
Inv
d S
Via asynchronous notification a
ge
Re
nt”
ile
“S
Notes
When a member owns a lock, it may GBP GLM SCA
grant further, locally
“Lock Avoidance” : DB2 avoids lock R32
requests when log sequence number
in page header indicates no update on R33
R33
Page
the page could be uncommitted Registry
M1-X
M2-S
M1 M2 R34
Silent Invalidation
Informs members of page updates
requires no CPU cycles on those
Ca
n
members
Yu
e
Ih
ag
p,
av
dP
h
e
No interrupt or other message
er
Ne
th
a
e
Re
is
w
yo
processing required
loc
pa
u
ge
k?
ar
e.
Increasingly important as cluster
im
ag
grows
e
GBP GLM SCA
Transaction processing
workload modeling warehouse
& ordering process 1Gb Ethernet
Write transactions rate to 20% Client
Typical read/write ratio of many OLTP Connectivity
p550
workloads p550 powerHA pureScale
members
Configuration
12 8-core p550 members Two 4Gb FC
64 GB, 5 GHz each Switches
Duplexed PowerHA pureScale across 2
additional 8-core p550s
64 GB, 5 GHz each
DS8300 storage
576 15K disks, Two 4Gb FC Switches DS8300
IBM 20Gb/s IB HCAs Storage
7874-024 IB Switch
12
11 10.4x @ 12 members
Throughput vs 1 member
10
9
8
7.6x @ 8 members
7
6
5
4 3.9x @ 4 members
3
2 1.98x @ 2 members
1
0
0 5 10 15
# Members
18 © 2009 IBM Corporation
Member SW Failure : “Member Restart on
Home Host”
kill -9 erroneously issued to a member
Clients
DB2 Cluster Services automatically detects
member’s death
Informs other members & powerHA pureScale servers
Initiates automated member restart on same (“home”)
host
Member restart is like a database crash recovery in a Single Database View
single system database, but is much faster
• Redo limited to inflight transactions (due to FAC)
• Benefits from page cache in GBP
Automatic; kill -9
Lo
g
R
ec
Log Log Log Log
s
Primary retains update locks held by member at the Pa
ge
time of failure CS s CS
Other members can continue to read and update data Updated Pages Updated Pages
Global Locks Global Locks
not locked for write access by failed member Shared Data
Secondary Primary
Member restart completes
Retained locks released and all data fully available
Clients
DB2
CS CS
Updated Pages Updated Pages
Global Locks Global Locks
Shared Data
Secondary Primary
Clients
Power cord tripped over accidentally
secondary
Eg. read locks
Log Log Log Log
CS CS
Updated Pages Updated Pages
Secondary becomes primary Global Locks Shared Data Global Locks
Clients
Power restored and system re-booted
Catchup complete CS CS
Secondary in peer state (contains same lock Updated Pages Updated Pages
and page state as primary) Global Locks Shared Data Global Locks
Primary Secondary
(Catchup
(Peer state)
state)
Clients
Power cord tripped over accidentally
Ultra Fast;
DB2 DB2 DB2 DB2
Online CS CS CS CS
Log Log Log Log
Member
CF CF
Connections to failed
member transparently
move to another member
Primary
PowerHA DB2 DB2 DB2 DB2
pureScale
CF CF
Secondary
PowerHA DB2 DB2 DB2 DB2
pureScale
CF CF
CF CF
Connections to failed
member transparently
move to another member
CF CF
Connections to failed
member transparently
move to another member
CF CF
Connections to failed
member transparently
move to another member
db2start member 3
Introduction
Goals & Value Propositions
Technology Overview
Technology In-Depth
Key Concepts & Internals
Efficient scaling
Failure modes & recovery automation
Stealth Maintenance
Clients
db2nodes.cfg
host0 host1 host2 host3 0 host0 0 host0ib MEMBER
1 host1 0 host1ib MEMBER
DB2 DB2 DB2 DB2 2 host2 0 host2ib MEMBER
3 host3 0 host3ib MEMBER
4 host4 0 host4ib CF
5 host5 0 host5ib CF
host4 host5
Shared Data
Clients
> db2start
08/24/2008 00:52:59 0 0 SQL1063N DB2START processing was successful.
08/24/2008 00:53:00 1 0 SQL1063N DB2START processing was successful.
08/24/2008 00:53:01 2 0 SQL1063N DB2START processing was successful.
08/24/2008 00:53:01 3 0 SQL1063N DB2START processing was successful.
Single Database View SQL1063N DB2START processing was successful.
host0 ACTIVE NO NO
host1 ACTIVE NO NO
host2 ACTIVE NO NO
host3 ACTIVE NO NO
host4 ACTIVE NO NO
host5 ACTIVE NO NO
host0 ACTIVE NO NO
host1 ACTIVE NO NO
host2 ACTIVE NO NO
host3 ACTIVE NO NO
host4 ACTIVE NO NO
host5 ACTIVE NO NO
Clients
> db2start
08/24/2008 00:52:59 0 0 SQL1063N DB2START processing was successful.
08/24/2008 00:53:00 1 0 SQL1063N DB2START processing was successful.
08/24/2008 00:53:01 2 0 SQL1063N DB2START processing was successful.
08/24/2008 00:53:01 3 0 SQL1063N DB2START processing was successful.
Single Database View SQL1063N DB2START processing was successful.
host0 ACTIVE NO NO
host1 ACTIVE NO NO
host2 ACTIVE NO NO
host3 ACTIVE NO NO
host4 ACTIVE NO NO
host5 ACTIVE NO NO
Failover
Load of failed member evenly distributed to surviving members automatically
Fallback
Once the failed member is back online, fallback does the reverse
Clients Clients
db2dsdriver.cfg file
Drill down per member… LBP Hit Ratio = 95% LBP Hit Ratio = 80%
… or get global view
Available from any member
Clients
Unlimited Capacity
Start small
Grow easily, with your business
Application Transparency
Avoid the risk and cost of tuning your
applications to the database topology
Continuous Availability
Maintain service across planned and
unplanned events
38 38
© 2009 IBM Corporation
Thank You!
ibm.com/db2/labchats
ng!
n di
tte
ora
f
u
yo
a nk
Th
39 39
© 2009 IBM Corporation