oracle rac - twg-it · 2013-04-11 · oracle rac 1986 clustered oracle (oracle 5)...

22
Thorsten Grebe, science + computing ag © 2010 science + computing ag © 2006 Oracle RAC versus MySQL Cluster DOAG Regionaltreffen Berlin / Brandenburg, 2.6.2010 . Thorsten Grebe [email protected] science + computing ag Tübingen I München I Berlin I Düsseldorf [email protected] | www.science-computing.de

Upload: others

Post on 16-Jul-2020

7 views

Category:

Documents


0 download

TRANSCRIPT

Page 1: Oracle RAC - twg-it · 2013-04-11 · Oracle RAC 1986 Clustered Oracle (Oracle 5) Machbarkeitsstudie 1989 Oracle Parallel Server (OPS) (Oracle 6,7,8) Manko Disk Ping 1999 Cache Fusion

Thorsten Grebe, science + computing ag © 2010

science + computing ag © 2006

Oracle RAC

versus

MySQL Cluster

DOAG Regionaltreffen Berlin / Brandenburg, 2.6.2010 .

Thorsten Grebe [email protected]

science + computing ag

Tübingen I München I Berlin I Düsseldorf

[email protected] | www.science-computing.de

Page 2: Oracle RAC - twg-it · 2013-04-11 · Oracle RAC 1986 Clustered Oracle (Oracle 5) Machbarkeitsstudie 1989 Oracle Parallel Server (OPS) (Oracle 6,7,8) Manko Disk Ping 1999 Cache Fusion

Thorsten Grebe, science + computing ag © 2010

1. Einführung / Geschichte

2. Architektur / Installation

3. Verhalten / Eckdaten

4. Entscheidungskriterien

5. Fazit

Agenda: Oracle Real Application Cluster vs. MySQL Cluster

Page 3: Oracle RAC - twg-it · 2013-04-11 · Oracle RAC 1986 Clustered Oracle (Oracle 5) Machbarkeitsstudie 1989 Oracle Parallel Server (OPS) (Oracle 6,7,8) Manko Disk Ping 1999 Cache Fusion

Thorsten Grebe, science + computing ag © 2010

1. Einführung / Geschichte

2. Architektur / Installation

3. Verhalten / Eckdaten

4. Entscheidungskriterien

5. Fazit

Agenda: Oracle Real Application Cluster vs. MySQL Cluster

Page 4: Oracle RAC - twg-it · 2013-04-11 · Oracle RAC 1986 Clustered Oracle (Oracle 5) Machbarkeitsstudie 1989 Oracle Parallel Server (OPS) (Oracle 6,7,8) Manko Disk Ping 1999 Cache Fusion

Thorsten Grebe, science + computing ag © 2010

Warum Oracle RAC versus MySQL Cluster ?

Clusterdatenbank Kriterien Datenbestand wird gleichzeitig durch mehrere Knoten bearbeitet

transaktionssicher

im Produktivbetrieb bewährt

Support noch in 3 Jahren gewährleistet

(Ausgeschlossen: aktiv/passiv-Failover

Forschungsprojekte

analytische Datawarehouse Systeme)

Clusterdatenbanken am Markt Oracle Real Application Cluster (alias RAC)

MySQL Cluster (alias NDB Cluster)

?

1. Einführung / Geschichte

Page 5: Oracle RAC - twg-it · 2013-04-11 · Oracle RAC 1986 Clustered Oracle (Oracle 5) Machbarkeitsstudie 1989 Oracle Parallel Server (OPS) (Oracle 6,7,8) Manko Disk Ping 1999 Cache Fusion

Thorsten Grebe, science + computing ag © 2010

MySQL Cluster

1991-96 Mikael Ronström entwickelt die Network

Database (NDB) als Main-Memory

Datenbank

1997 Ronström veröffentlicht NDB Cluster:

“Design and Modelling of a Parallel Data Server

for Telecom Applications” http://user.it.uu.se/~udbl/Theses/MikaelRonstromPhD.pdf

2000 Ericsson gründet Startup Alzato

2001 Version 1.0 mit Perl/DBI-Support

2003 MySQL übernimmt Alzato

2004 Integration von NDB Engine in

MySQL 4.1

2005 Disk Data

(MySQL 5)

( getrennte Versionierung ab Version 6 )

2009 Multithreaded NDB (Version 7.0)

2010 Cluster Manager (Version 7.1)

Aktuell: NDB 7.1

Herkunft und Historie

1. Einführung / Geschichte

Oracle RAC

1986 Clustered Oracle

(Oracle 5)

Machbarkeitsstudie

1989 Oracle Parallel Server (OPS)

(Oracle 6,7,8)

Manko Disk Ping

1999 Cache Fusion 1 (ab 8.1.5)

2001 Real Application Cluster

Cache Fusion 2

(Oracle 9)

2004 VIP, CRS, ASM

(Oracle 10)

2009 Grid Infrastructure

(11gR2)

Aktuell: 11.2.0

Page 6: Oracle RAC - twg-it · 2013-04-11 · Oracle RAC 1986 Clustered Oracle (Oracle 5) Machbarkeitsstudie 1989 Oracle Parallel Server (OPS) (Oracle 6,7,8) Manko Disk Ping 1999 Cache Fusion

Thorsten Grebe, science + computing ag © 2010

1. Einführung / Geschichte

2. Architektur / Installation

3. Verhalten / Eckdaten

4. Entscheidungskriterien

5. Fazit

Agenda: Oracle Real Application Cluster vs. MySQL Cluster

Page 7: Oracle RAC - twg-it · 2013-04-11 · Oracle RAC 1986 Clustered Oracle (Oracle 5) Machbarkeitsstudie 1989 Oracle Parallel Server (OPS) (Oracle 6,7,8) Manko Disk Ping 1999 Cache Fusion

Thorsten Grebe, science + computing ag © 2010

Oracle RAC

• shared Everything

• Daten liegen in “Shared Storage”

• proprietärer Locking- und Queuing

Mechanismus

• Registrierung des Status aller Blöcke

im "Global Resource Directory"

2x Registry

MySQL Cluster

• shared Nothing

• synchrone Replikation / Two-Phase Commit

• Main-Memory

• horizontale Partitionierung

U

N

D

R

E

D

R

E

D

U

N

D

2. Architektur / Installation

Instanzen 1 3 4 2

1 Datenbank

Tabelle Datenblock

Cache Fusion

R

E

D

O

U

N

D

O

R

E

D

O

U

N

D

O

SQL-Knoten 1

Datenknoten 1

mit eigener DB Datenknoten 2

mit eigener DB

SQL-

Knoten 2

R

E

D

O

U

N

D

O

R

E

D

O U

N

D

O

R

E

D

O

U

N

D

O

R

E

D

O

U

N

D

O

Mgmt

3x Voting

Page 8: Oracle RAC - twg-it · 2013-04-11 · Oracle RAC 1986 Clustered Oracle (Oracle 5) Machbarkeitsstudie 1989 Oracle Parallel Server (OPS) (Oracle 6,7,8) Manko Disk Ping 1999 Cache Fusion

Thorsten Grebe, science + computing ag © 2010

Node 4 1GB RAM

Node 3 1GB RAM

Node 2 1GB RAM

Node 1 1GB RAM

Tabelle (engine=NDB)

Partition 1

Partition 2

Node Group 1

Node Group 2

Gesamter Speicher: 4x 1GB / 2 Replika 2GB

2. Architektur / Installation

MySQL Cluster

horizontale Partitionierung

Page 9: Oracle RAC - twg-it · 2013-04-11 · Oracle RAC 1986 Clustered Oracle (Oracle 5) Machbarkeitsstudie 1989 Oracle Parallel Server (OPS) (Oracle 6,7,8) Manko Disk Ping 1999 Cache Fusion

Thorsten Grebe, science + computing ag © 2010

Node 4 1GB RAM

Node 3 1GB RAM

Node 2 1GB RAM

Node 1 1GB RAM

Tabelle (engine=NDB)

Partition 1

Partition 2

Node Group 1

Gesamter Speicher: 4x 1GB / 2 Replika 2GB

2. Architektur / Installation

2 Knoten dürfen ausfallen

MySQL Cluster

horizontale Partitionierung

Node Group 2

Page 10: Oracle RAC - twg-it · 2013-04-11 · Oracle RAC 1986 Clustered Oracle (Oracle 5) Machbarkeitsstudie 1989 Oracle Parallel Server (OPS) (Oracle 6,7,8) Manko Disk Ping 1999 Cache Fusion

Thorsten Grebe, science + computing ag © 2010

MySQL Cluster Oracle RAC

Software

Oracle Database 11g Release 2 Grid Infrastructure (1GB)

Oracle Database 11g Release 2 (2.1GB)

SUMME: 3.1 GB

Installationsvoraussetzungen

Hardware

SQL-Knoten: 2 Netzwerkkarten

eine öffentliche IP-Adresse

Datenkonten: kein vorgegebenes Minimum für RAM

oder Plattenplatz

(privates Netz)

Management-Knoten: keine Mindestanforderung,

(privates Netz)

2. Architektur / Installation

Hardware

RAC-Knoten: 1GB RAM

10GB für Software

2 Netzwerkkarten pro RAC-Knoten (privat / öffentlich)

2 über DNS auflösbare IP-Adressen pro RAC-Knoten

eine für das öffentliche Netz

eine für die virtuelle IP-Adresse

Eine über DNS auflösbare Adresse für SCAN.

Shared Storage für: Datenbank

Voting Disk 3x

Cluster Registry 2x

1 Server für 3. Voting Disk

Software

SQL-Knoten: MySQL Server (18 MB)

Client ( 8 MB)

Daten-Knoten: Storage Engines ( 4 MB)

Management-Knoten: Management Utilities ( 1 MB)

Cluster Tools ( 9 MB)

SUMME: 40 MB

Page 11: Oracle RAC - twg-it · 2013-04-11 · Oracle RAC 1986 Clustered Oracle (Oracle 5) Machbarkeitsstudie 1989 Oracle Parallel Server (OPS) (Oracle 6,7,8) Manko Disk Ping 1999 Cache Fusion

Thorsten Grebe, science + computing ag © 2010

Oracle RAC [root@node1 ~]# ps -ef|grep /opt/oracle/app/grid

oracle ...11.2.0/bin/oraagent.bin

oracle ...11.2.0/bin/gipcd.bin

oracle ...11.2.0/bin/mdnsd.bin

oracle ...11.2.0/bin/gpnpd.bin

oracle ...11.2.0/bin/ocssd.bin

oracle ...11.2.0/bin/diskmon.bin -d -f

oracle ...11.2.0/bin/evmd.bin

oracle ...11.2.0/bin/oclskd.bin

oracle ...11.2.0/bin/evmlogger.bin ...

oracle ...11.2.0/bin/oraagent.bin

oracle ...11.2.0/opmn/bin/ons -d

oracle ...11.2.0/opmn/bin/ons -d

oracle ...11.2.0/jdk/jre/bin/java ...

oracle ...11.2.0/bin/tnslsnr LISTENER ...

root ...11.2.0/bin/ohasd.bin reboot

root ...11.2.0/bin/orarootagent.bin

root ...11.2.0/bin/cssdmonitor

root ...11.2.0/bin/cssdagent

root ...11.2.0/bin/octssd.bin reboot

root ...11.2.0/bin/crsd.bin reboot

root ...11.2.0/bin/oclskd.bin

root ...11.2.0/bin/orarootagent.bin

2. Architektur / Installation

Komplexität / Betriebssystemprozesse

MySQL Cluster

Management Node [root@mgmt1 ~]# ps -ef | egrep 'ndb|my'

root 3759 1 ... ndb_mgmd

Client Knoten (SQL node) [root@node3 ~]# ps -ef | egrep 'ndb|my'

root 3487 1 .../mysqld_safe ...

mysql 3575 3487 .../mysqld ...

Datenknoten (data node) [root@node1 ~]# ps -ef | egrep 'ndb|my'

root 31440 1 ... ndbd

root 31441 31440 ... ndbd

Page 12: Oracle RAC - twg-it · 2013-04-11 · Oracle RAC 1986 Clustered Oracle (Oracle 5) Machbarkeitsstudie 1989 Oracle Parallel Server (OPS) (Oracle 6,7,8) Manko Disk Ping 1999 Cache Fusion

Thorsten Grebe, science + computing ag © 2010

Komplexität - Stoppen / Starten des Clusters

[root@node1 ~]# crsctl stop cluster –all

CRS-2673: Attempting to stop 'ora.crsd' on 'node1'

CRS-2673: Attempting to stop 'ora.crsd' on 'node3'

CRS-2673: Attempting to stop 'ora.crsd' on 'node2'

CRS-2790: Starting shutdown of Cluster Ready Services-managed resources on 'node2'

CRS-2673: Attempting to stop 'ora.LISTENER_SCAN1.lsnr' on 'node2'

CRS-2673: Attempting to stop 'ora.orcl.db' on 'node2'

CRS-2673: Attempting to stop 'ora.registry.acfs' on 'node2'

CRS-2673: Attempting to stop 'ora.LISTENER.lsnr' on 'node2'

CRS-2790: Starting shutdown of Cluster Ready Services-managed resources on 'node1'

CRS-2673: Attempting to stop 'ora.orcl.db' on 'node1'

CRS-2673: Attempting to stop 'ora.registry.acfs' on 'node1'

CRS-2673: Attempting to stop 'ora.LISTENER.lsnr' on 'node1'

CRS-2790: Starting shutdown of Cluster Ready Services-managed resources on 'node3'

CRS-2673: Attempting to stop 'ora.orcl.db' on 'node3'

CRS-2673: Attempting to stop 'ora.registry.acfs' on 'node3'

CRS-2673: Attempting to stop 'ora.LISTENER.lsnr' on 'node3'

CRS-2677: Stop of 'ora.LISTENER_SCAN1.lsnr' on 'node2' succeeded

CRS-2673: Attempting to stop 'ora.scan1.vip' on 'node2'

CRS-2677: Stop of 'ora.registry.acfs' on 'node3' succeeded

CRS-2677: Stop of 'ora.scan1.vip' on 'node2' succeeded

CRS-2677: Stop of 'ora.LISTENER.lsnr' on 'node2' succeeded

CRS-2673: Attempting to stop 'ora.node2.vip' on 'node2'

CRS-2677: Stop of 'ora.node2.vip' on 'node2' succeeded

CRS-2677: Stop of 'ora.registry.acfs' on 'node2' succeeded

CRS-2677: Stop of 'ora.registry.acfs' on 'node1' succeeded

CRS-2677: Stop of 'ora.LISTENER.lsnr' on 'node3' succeeded

CRS-2673: Attempting to stop 'ora.node3.vip' on 'node3'

CRS-2677: Stop of 'ora.LISTENER.lsnr' on 'node1' succeeded

CRS-2677: Stop of 'ora.node3.vip' on 'node3' succeeded

CRS-2673: Attempting to stop 'ora.node1.vip' on 'node1'

CRS-2677: Stop of 'ora.node1.vip' on 'node1' succeeded

CRS-2677: Stop of 'ora.orcl.db' on 'node3' succeeded

CRS-2673: Attempting to stop 'ora.DATA.dg' on 'node3'

CRS-2673: Attempting to stop 'ora.FRA.dg' on 'node3'

CRS-2677: Stop of 'ora.DATA.dg' on 'node3' succeeded

CRS-2677: Stop of 'ora.FRA.dg' on 'node3' succeeded

CRS-2673: Attempting to stop 'ora.asm' on 'node3'

CRS-2677: Stop of 'ora.asm' on 'node3' succeeded

CRS-2673: Attempting to stop 'ora.ons' on 'node3'

CRS-2673: Attempting to stop 'ora.eons' on 'node3'

CRS-2677: Stop of 'ora.ons' on 'node3' succeeded

CRS-2673: Attempting to stop 'ora.net1.network' on 'node3'

CRS-2677: Stop of 'ora.net1.network' on 'node3' succeeded

CRS-2677: Stop of 'ora.orcl.db' on 'node2' succeeded

CRS-2673: Attempting to stop 'ora.DATA.dg' on 'node2'

CRS-2673: Attempting to stop 'ora.FRA.dg' on 'node2'

CRS-2677: Stop of 'ora.eons' on 'node3' succeeded

CRS-2792: Shutdown of Cluster Ready Services-managed resources on 'node3' has completed

CRS-2677: Stop of 'ora.crsd' on 'node3' succeeded

CRS-2673: Attempting to stop 'ora.cssdmonitor' on 'node3'

CRS-2673: Attempting to stop 'ora.ctssd' on 'node3'

CRS-2673: Attempting to stop 'ora.evmd' on 'node3'

CRS-2673: Attempting to stop 'ora.asm' on 'node3'

CRS-2677: Stop of 'ora.cssdmonitor' on 'node3' succeeded

CRS-2677: Stop of 'ora.evmd' on 'node3' succeeded

CRS-2677: Stop of 'ora.orcl.db' on 'node1' succeeded

CRS-2673: Attempting to stop 'ora.DATA.dg' on 'node1'

CRS-2673: Attempting to stop 'ora.FRA.dg' on 'node1'

CRS-2677: Stop of 'ora.ctssd' on 'node3' succeeded

CRS-2677: Stop of 'ora.DATA.dg' on 'node2' succeeded

CRS-2677: Stop of 'ora.asm' on 'node3' succeeded

CRS-2673: Attempting to stop 'ora.cssd' on 'node3'

CRS-2677: Stop of 'ora.cssd' on 'node3' succeeded

CRS-2673: Attempting to stop 'ora.diskmon' on 'node3'

CRS-2677: Stop of 'ora.FRA.dg' on 'node2' succeeded

CRS-2673: Attempting to stop 'ora.asm' on 'node2'

CRS-2677: Stop of 'ora.asm' on 'node2' succeeded

CRS-2677: Stop of 'ora.diskmon' on 'node3' succeeded

CRS-2677: Stop of 'ora.DATA.dg' on 'node1' succeeded

CRS-2677: Stop of 'ora.FRA.dg' on 'node1' succeeded

CRS-2673: Attempting to stop 'ora.asm' on 'node1'

CRS-2677: Stop of 'ora.asm' on 'node1' succeeded

CRS-2673: Attempting to stop 'ora.ons' on 'node1'

CRS-2673: Attempting to stop 'ora.eons' on 'node1'

CRS-2677: Stop of 'ora.ons' on 'node1' succeeded

CRS-2673: Attempting to stop 'ora.net1.network' on 'node1'

CRS-2677: Stop of 'ora.net1.network' on 'node1' succeeded

CRS-2677: Stop of 'ora.eons' on 'node1' succeeded

CRS-2792: Shutdown of Cluster Ready Services-managed resources on 'node1' has completed

CRS-2673: Attempting to stop 'ora.ons' on 'node2'

CRS-2673: Attempting to stop 'ora.eons' on 'node2'

CRS-2677: Stop of 'ora.ons' on 'node2' succeeded

CRS-2673: Attempting to stop 'ora.net1.network' on 'node2'

CRS-2677: Stop of 'ora.net1.network' on 'node2' succeeded

CRS-2677: Stop of 'ora.crsd' on 'node1' succeeded

CRS-2673: Attempting to stop 'ora.cssdmonitor' on 'node1'

CRS-2673: Attempting to stop 'ora.ctssd' on 'node1'

CRS-2673: Attempting to stop 'ora.evmd' on 'node1'

CRS-2673: Attempting to stop 'ora.asm' on 'node1'

CRS-2677: Stop of 'ora.cssdmonitor' on 'node1' succeeded

CRS-2677: Stop of 'ora.evmd' on 'node1' succeeded

CRS-2677: Stop of 'ora.eons' on 'node2' succeeded

CRS-2792: Shutdown of Cluster Ready Services-managed resources on 'node2' has completed

CRS-2677: Stop of 'ora.crsd' on 'node2' succeeded

CRS-2673: Attempting to stop 'ora.cssdmonitor' on 'node2'

CRS-2673: Attempting to stop 'ora.ctssd' on 'node2'

CRS-2673: Attempting to stop 'ora.evmd' on 'node2'

CRS-2673: Attempting to stop 'ora.asm' on 'node2'

CRS-2677: Stop of 'ora.cssdmonitor' on 'node2' succeeded

CRS-2677: Stop of 'ora.ctssd' on 'node1' succeeded

CRS-2677: Stop of 'ora.ctssd' on 'node2' succeeded

CRS-2677: Stop of 'ora.evmd' on 'node2' succeeded

CRS-2677: Stop of 'ora.asm' on 'node1' succeeded

CRS-2673: Attempting to stop 'ora.cssd' on 'node1'

CRS-2677: Stop of 'ora.cssd' on 'node1' succeeded

CRS-2673: Attempting to stop 'ora.diskmon' on 'node1'

CRS-2677: Stop of 'ora.diskmon' on 'node1' succeeded

CRS-2677: Stop of 'ora.asm' on 'node2' succeeded

CRS-2673: Attempting to stop 'ora.cssd' on 'node2'

CRS-2677: Stop of 'ora.cssd' on 'node2' succeeded

CRS-2673: Attempting to stop 'ora.diskmon' on 'node2'

CRS-2677: Stop of 'ora.diskmon' on 'node2' succeeded

[root@node1 ~]# crsctl start cluster –all

MySQL Cluster Oracle RAC

CRS-2677: Stop of 'ora.ons' on 'node3' succeeded

CRS-2673: Attempting to stop 'ora.net1.network' on 'node3'

CRS-2677: Stop of 'ora.net1.network' on 'node3' succeeded

CRS-2677: Stop of 'ora.orcl.db' on 'node2' succeeded

2. Architektur / Installation

ndb_mgm> shutdown

Node 2: Cluster shutdown initiated

Node 3: Cluster shutdown initiated

2 NDB Cluster node(s) have shutdown.

Disconnecting to allow management server to shutdown.

ndb_mgm> startup

Unable to connect with connect string: ...

(ab 7.1. Clustermanager)

Page 13: Oracle RAC - twg-it · 2013-04-11 · Oracle RAC 1986 Clustered Oracle (Oracle 5) Machbarkeitsstudie 1989 Oracle Parallel Server (OPS) (Oracle 6,7,8) Manko Disk Ping 1999 Cache Fusion

Thorsten Grebe, science + computing ag © 2010

1. Einführung / Geschichte

2. Architektur / Installation

3. Verhalten / Eckdaten

4. Entscheidungskriterien

5. Fazit

Agenda: Oracle Real Application Cluster vs. MySQL Cluster

Page 14: Oracle RAC - twg-it · 2013-04-11 · Oracle RAC 1986 Clustered Oracle (Oracle 5) Machbarkeitsstudie 1989 Oracle Parallel Server (OPS) (Oracle 6,7,8) Manko Disk Ping 1999 Cache Fusion

Thorsten Grebe, science + computing ag © 2010

Oracle RAC

SQL> update t set data=‘neu’

where data = ‘alt’;

SQL> commit;

SQL> (Prompt kommt zurück)

WAL – write ahead logging

3. Verhalten / Eckdaten

MySQL Cluster

SQL> update t set data=‘neu’

where data=‘alt’;

SQL> commit;

SQL> (Prompt kommt zurück)

nWAL – neighbor write ahead logging

Transaktionenverhalten / ACID-Konformität

5. LGWR schreibt Blöcke aus Log Buffer

in Redologs

6. Betriebssystem meldet erfolgreichen

Schreibvorgang zurück

7. LGWR meldet Erfolg an Serverprozess

8. DBWR schreibt „schmutzige“ Blöcke aus

Buffer Cache in Datenbankdateien

1. ndbd-Prozess ermittelt die Lage benötigter

Blöcke (Knotengruppe)

2. Setzen von Sperren

3. Neuer Blockinhalt wird in Redo Buffer,

alter Blockinhalt wird Undo Buffer

geschrieben.

4. Neuer Blockinhalt wird in Data Buffer

geschrieben.

5. Neuer Blockinhalt wird in das Memory

eines zweiten Datenknoten repliziert.

6. Zweiter Knoten meldet erfolgreiche

Replikation zurück

(Kein Schreibzugriff auf Festplatte.)

6. Globaler Checkpoint schreibt

Datenänderungen auf Festplatte

1. Serverprozess ermittelt Lage benötigter

Blöcke (Disk, Buffer Cache)

und liest sie in buffer cache.

2. Setzen von Sperren

3. Neuer Blockinhalt und alter Blockinhalt

werden in Log Buffer geschrieben

4. Neuer Blockinhalt wird in Buffer Cache

geschrieben.

Alter Blockinhalt wird ins Undo Segment

geschrieben.

ohne Disk Data

Page 15: Oracle RAC - twg-it · 2013-04-11 · Oracle RAC 1986 Clustered Oracle (Oracle 5) Machbarkeitsstudie 1989 Oracle Parallel Server (OPS) (Oracle 6,7,8) Manko Disk Ping 1999 Cache Fusion

Thorsten Grebe, science + computing ag © 2010

Oracle RAC

Gefährdung der Dauerhaftikeit /durability:

• Redologs liegen zusammen mit Datendateien

• nur 1 Member pro Redologgruppe

• alle Member einer Redologgruppe auf selber

Festplatte

D – kann gefährdet werden

ACI – beeinflussbar durch Ändern des Isolation

Levels.

Default READ COMMITED

MySQL Cluster

vor Version 7 nur single threaded NDB-Prozesse

Empfehlung bei Mehrkernprozessoren vor Version 7:

mehrere Datenknoten auf einen Host

D – kann gefährdet werden, wenn Datenknoten einer

Knotengruppe (node group) auf selbem Host

laufen.

ACI – nicht beeinflussbar,

NDB kenn nur READ COMMITED

Gefährdung der ACID-Konformität durch Unwissenheit?

3. Verhalten / Eckdaten

Node Group 1

ok Node Group 1

nicht ok

Node Group 1

Page 16: Oracle RAC - twg-it · 2013-04-11 · Oracle RAC 1986 Clustered Oracle (Oracle 5) Machbarkeitsstudie 1989 Oracle Parallel Server (OPS) (Oracle 6,7,8) Manko Disk Ping 1999 Cache Fusion

Thorsten Grebe, science + computing ag © 2010

MySQL Cluster

Spezielle Indextypen bei MySQL Cluster

Hash Index

Ordered Index

Hauptindextyp: T-Baum / T-TREE

Oracle RAC

Spezielle Indextypen bei Oracle:

B-tree Cluster Index

Hash Cluster index

Partitionierter Index

Reverse Key Index

Bitmap Index

Funktions-basierter Index

Domänenindex

Spatial

Fulltext

Indexoptionen bei Oracle: compressed, invisible

Hauptindextyp: B-Baum / B-TREE Lehman & Carey 1986

Bayer & McCreight 1972

3. Verhalten / Eckdaten

Indizes

Page 17: Oracle RAC - twg-it · 2013-04-11 · Oracle RAC 1986 Clustered Oracle (Oracle 5) Machbarkeitsstudie 1989 Oracle Parallel Server (OPS) (Oracle 6,7,8) Manko Disk Ping 1999 Cache Fusion

Thorsten Grebe, science + computing ag © 2010

MySQL Cluster

Unsicher “out of the box”!

Innerhalb Cluster keine Benutzer-Authentifizierung.

Authentifizierung über Granttabellen auf SQL-

Knoten. Anonyme Slots in config.ini erlauben

anonymen Vollzugriff!

Sicherheit muss über Netzwerkabschottung

und Firewalls erreicht werden.

Passwortlose Root-Konten müssen auf den SQL-

Knoten entfernt werden.

Für den Datenverkehr innerhalb des Clusters ist keine

Verschlüsselung vorgesehen.

Oracle RAC

Sicher “out of the box”.

Es gibt in Oracle keinen nicht authentifizierten Zugriff.

Beispielschemata gesperrt

(HR, SCOTT müssen erst entsperrt werden).

Netzwerkpakete gesperrt (Netzwerk-ACLs müssen

erst geschrieben werden.)

Datenablage und Netzwerkverkehr können

verschlüsselt werden (ASO).

/var/lib/mysql-cluster/config.ini

[MYSQLD]

[MYSQLD]

nodeid=4

HostName=10.10.1.4

Jeder Laptop

mit Netzwerkzugriff

auf den Management-

Knoten hat vollen

Zugriff auf die

Clusterdaten !

Sicherheitskonzepte

3. Verhalten / Eckdaten

Page 18: Oracle RAC - twg-it · 2013-04-11 · Oracle RAC 1986 Clustered Oracle (Oracle 5) Machbarkeitsstudie 1989 Oracle Parallel Server (OPS) (Oracle 6,7,8) Manko Disk Ping 1999 Cache Fusion

Thorsten Grebe, science + computing ag © 2010

Oracle RAC

Maximale Knotenzahl (Datenknoten): 100

Maximale Kapazität:

abhängig von OS / Blockgröße Exabyte-Bereich

Erreichbare Verfügbarkeit: 98 – 99 %

trotz rolling upgrades - besser mit zero downtime?

Performance-Benchmarks: TPC > 7,5 Mio tpmC

(Nov. 24, 2009)

$18 Mio USD (davon 6 Mio Oracle Lizenzen)

ca. 40 TB Daten / Flash Arrays

db_16k_cache_size=95G

db_4k_cache_size=2G

db_cache_size=65G

db_keep_cache_size=210G

db_recycle_cache_size=40G

shared_pool_size=20G

log_buffer = 256M Ʃ 432G

3. Verhalten / Eckdaten

Kapazität, Verfügbarkeit und (nicht vergleichbare) Benchmarks.

http://www.tpc.org/results/FDR/TPCC/Sun_T5440_TPC-C_Cluster_FDR_122309_v2.pdf

MySQL Cluster

Maximale Knotenzahl (Datenknoten): 48

Maximale Kapazität (nur-Memory):

32bit: (48Knoten * 4 GB / 2 Replika) / 1,25

ca. 50 - 75 GB

64bit: (48Knoten * 512 GB / 2 Replika) / 1,25

ca. 10 TB (sinnlos ohne schnelle Platten

wg. lokaler Checkpoints)

Erreichbare Verfügbarkeit: 99,999%

Performance-Benchmarks: DBT2 > 250.000 tpm

(April 2009)

http://www.mysql.com/news-and-events/generate-article.php?id=2009_06

Page 19: Oracle RAC - twg-it · 2013-04-11 · Oracle RAC 1986 Clustered Oracle (Oracle 5) Machbarkeitsstudie 1989 Oracle Parallel Server (OPS) (Oracle 6,7,8) Manko Disk Ping 1999 Cache Fusion

Thorsten Grebe, science + computing ag © 2010

1. Einführung / Geschichte

2. Architektur / Installation

3. Verhalten / Eckdaten

4. Entscheidungskriterien

5. Fazit

Agenda: Oracle Real Application Cluster vs. MySQL Cluster

Page 20: Oracle RAC - twg-it · 2013-04-11 · Oracle RAC 1986 Clustered Oracle (Oracle 5) Machbarkeitsstudie 1989 Oracle Parallel Server (OPS) (Oracle 6,7,8) Manko Disk Ping 1999 Cache Fusion

Thorsten Grebe, science + computing ag © 2010

Oracle RAC

1. Ist meine Hardware zertifiziert?

2. Ist mein Betriebssystem zertifiziert?

3. Kann ich mir die Lizenzen leisten?

4. Kann ich mir eine zuverlässige shared

storage leisten?

5. Habe ich genügend Knowhow im Haus?

Hauptsorge: Kosten / Infrastruktur

12. Entscheidungsleitfaden - was man sich voher überlegen sollte.

MySQL Cluster

1. Werden meine Datentypen unterstützt ?

2. Komme ich ohne Fremdschlüssel aus?

3. Komme ich ohne komplexe Joins /

Aggregate / Order by / Table Scans aus?

4. Habe ich genügend RAM, um alle Daten

und Indizes 2x im Speicher zu halten?

5. Wie handhabe ich Views, Prozeduren,

Funktionen, Trigger, Grants, Events?

Hauptsorge: Fehlende Funktionen

Bevor es losgeht!

Top 5 Fragen:

Studium der Oracle Lizenz-Philosophie

plus

klärende Telefonate mit Oracle Sales

Studium des Kapitels

Known Limitations of MySQL Cluster

aus der aktuellen MySQL-Dokumentation

Empfehlenswert: MySQL Cluster Evaluation Guide

(Oracle Whitepaper, April 2010)

Erster Schritt:

Page 21: Oracle RAC - twg-it · 2013-04-11 · Oracle RAC 1986 Clustered Oracle (Oracle 5) Machbarkeitsstudie 1989 Oracle Parallel Server (OPS) (Oracle 6,7,8) Manko Disk Ping 1999 Cache Fusion

Thorsten Grebe, science + computing ag © 2010

1. Einführung / Geschichte

2. Architektur / Installation

3. Verhalten / Eckdaten

4. Entscheidungskriterien

5. Fazit

Agenda: Oracle Real Application Cluster vs. MySQL Cluster

Page 22: Oracle RAC - twg-it · 2013-04-11 · Oracle RAC 1986 Clustered Oracle (Oracle 5) Machbarkeitsstudie 1989 Oracle Parallel Server (OPS) (Oracle 6,7,8) Manko Disk Ping 1999 Cache Fusion

Thorsten Grebe, science + computing ag © 2010

Fazit

• Oracle Real Application Cluster und MySQL Cluster sind die einzigen

transaktionssicheren, ausgereiften (mir bekannten) Clusterdatenbanken am Markt,

die gleichzeitigen Lese- und Schreibzugriff erlauben

• Grundlegend unterschiedliche Architektur Oracle RAC: Shared Everything, extrem komplex

MySQL Cluster: Shared Nothing, schlankes Design

• Grundlegend unterschiedlicher Funktionsumfang

Oracle RAC: Vollausstattung

MySQL Cluster: Stark eingeschränkter Funktionenumfang bei NDB

• Migration von Einzelinstanz auf Clusterversion

Oracle RAC: Immer möglich, transparent

MySQL Cluster: Nur mit Einschränkungen möglich – workarounds notwendig.

• Kosten / Verfügbarkeit

Oracle RAC: Teuer, > 99% nur mit Standbysystem (noch teurer!)

MySQL Cluster: Preiswert, 99,999%

• Konkurrenten? Nein, RAC und NDB bedienen unterschiedliche Anforderungen.

Oracle RAC: z.B. DB-Kosolidierung (dynamisch konfigurierbare Services)

MySQL Cluster: z.B. Websessions oder LDAP-Backend