Top Banner
Ingres Version 6.4 Ingres Version 6.4 An Overview of the An Overview of the Architecture Architecture Presented by Quest Software
25

Ingres Version 6.4 An Overview of the Architecture Presented by Quest Software.

Jan 03, 2016

Download

Documents

Charla Edwards
Welcome message from author
This document is posted to help you gain knowledge. Please leave a comment to let me know what you think about it! Share it to your friends and learn new things together.
Transcript
Page 1: Ingres Version 6.4 An Overview of the Architecture Presented by Quest Software.

Ingres Version 6.4Ingres Version 6.4An Overview of the An Overview of the

ArchitectureArchitecturePresented by

Quest Software

Page 2: Ingres Version 6.4 An Overview of the Architecture Presented by Quest Software.

Ingres 6.4 - An OverviewIngres 6.4 - An Overview

• Client / Server Architecture• Components• Locking & I/O• Server Internals

– Query Processing

Page 3: Ingres Version 6.4 An Overview of the Architecture Presented by Quest Software.

Client - Server ArchitectureClient - Server Architecture

Page 4: Ingres Version 6.4 An Overview of the Architecture Presented by Quest Software.

Client - Server ArchitectureClient - Server Architecture

• User Image• Name Server• DBMS Server• Archiver• Recovery Process

Page 5: Ingres Version 6.4 An Overview of the Architecture Presented by Quest Software.

Name ServerName Server

• isql dbname– image activated

– call Ingres General Communication Facility (GCF) routines

– opens connection to Name Server

Page 6: Ingres Version 6.4 An Overview of the Architecture Presented by Quest Software.

Name ServerName Server

Page 7: Ingres Version 6.4 An Overview of the Architecture Presented by Quest Software.

Name ServerName Server

• Uses “GCA” Protocol• Receives connection request from User

Image• Provides mailbox address to User• User Image Connects to DBMS• What about Ingres / Net ?

Page 8: Ingres Version 6.4 An Overview of the Architecture Presented by Quest Software.

Name Server - Ingres /NetName Server - Ingres /Net

Page 9: Ingres Version 6.4 An Overview of the Architecture Presented by Quest Software.

DBMS ServerDBMS Server

• The Ingres “engine”• Accepts incoming SQL• Processes it• Executes I/O on behalf of Users• Multi - threaded

Page 10: Ingres Version 6.4 An Overview of the Architecture Presented by Quest Software.

ComponentsComponents

Page 11: Ingres Version 6.4 An Overview of the Architecture Presented by Quest Software.

Logging and RecoveryLogging and Recovery

• DBMS Server– writes to memory log buffers

• Recovery Process– Reads from memory log buffers

– Writes to Physical Log File

– Returns “ok to complete” to Server

• DBMS Server– writes to the database

Page 12: Ingres Version 6.4 An Overview of the Architecture Presented by Quest Software.

Logging and Recovery (cont)Logging and Recovery (cont)

Page 13: Ingres Version 6.4 An Overview of the Architecture Presented by Quest Software.

Logging and Recovery (cont)Logging and Recovery (cont)

• “Circular” Log File• All transactions which update the

database are logged• Writes “Before Image” to log file• “Transaction Complete” stamp after

complete• Write to the log file BEFORE the

database

Page 14: Ingres Version 6.4 An Overview of the Architecture Presented by Quest Software.

Group Commit / Fast CommitGroup Commit / Fast Commit

• Group Commit– Sever writes query “A” to log buffers

– Sever writes query “B” to same buffers

– All “commits” are written together

• Fast Commit– Server writes “forces” directly to Log File

– then writes to the database (Cached)

– Write-Behind threads write to the database

Page 15: Ingres Version 6.4 An Overview of the Architecture Presented by Quest Software.

ArchivingArchiving

• Log File has periodic “Consistancy Points”

• Archiver reclaims space from the Log File

• Only extracts COMMITED transactions from the Log File

• Writes transactions to the Journals• Moves the End Of File marker forward

Page 16: Ingres Version 6.4 An Overview of the Architecture Presented by Quest Software.

Archiving (cont)Archiving (cont)

• If there are Uncommitted Transactions in the Log File– Archiver Process cannot extract them

– Cannot move the EOF marker

– Log File Fills Up

– Chaos !

Page 17: Ingres Version 6.4 An Overview of the Architecture Presented by Quest Software.

ComponentsComponents

Page 18: Ingres Version 6.4 An Overview of the Architecture Presented by Quest Software.

LockingLocking

• Initiated by Server Process• Types

– Exclusive / Shared

• Levels– Page / Table / Database

• VMS Cluster– II_CSP talks to clusterwide lock manager

Page 19: Ingres Version 6.4 An Overview of the Architecture Presented by Quest Software.

Locking (cont)Locking (cont)

• Locking Escallation can Occur when– MAXLOCKS exceeded

– Locks Per Transaction exceeded

– Ingres installation-wide resources low

• “Blocking Locks”– Cause Deadlock checking to start

Page 20: Ingres Version 6.4 An Overview of the Architecture Presented by Quest Software.

I/O HandlingI/O Handling

• Unix has Synchronous I/O– call iislave processes to offload I/O

requests

– II_NUM_SLAVES

– how many ?

• VMS has Asynchronous I/O

Page 21: Ingres Version 6.4 An Overview of the Architecture Presented by Quest Software.

Server InternalsServer Internals

Page 22: Ingres Version 6.4 An Overview of the Architecture Presented by Quest Software.

Query Processing - Parsing Query Processing - Parsing

• Query arrives in Server Control Facility (SCF)

• Store Text in Query Storage Facility (QSF)

• Parse the Query (PSF)• Check the Relational Descriptions (RDF)• Check Query Modifications due to

Permits, Views etc. (QRYMOD)

Page 23: Ingres Version 6.4 An Overview of the Architecture Presented by Quest Software.

Query Processing - PlanningQuery Processing - Planning

• Create a Parsed Query Tree in QSF• Optimiser (OPF) uses Query Tree &

Statistics to develop Query Plan• Store the Query Plan in QSF• Query Execution Facility validates table

descriptions (QEF)

Page 24: Ingres Version 6.4 An Overview of the Architecture Presented by Quest Software.

Query Processing - ExecutionQuery Processing - Execution

• Access the actual files using the Data Manipulation Facility (DMF)

• DMF returns data to QEF• QEF returns data to SCF• SCF returns data to GCA

communications• Eventually ends up at the user’s front

end program !

Page 25: Ingres Version 6.4 An Overview of the Architecture Presented by Quest Software.

ConclusionsConclusions

• Ingres DBMS is complex• Multiple Components• Handle with care !!!