+ All Categories
Home > Documents > The problem - 2021.hroug.hr

The problem - 2021.hroug.hr

Date post: 16-Oct-2021
Category:
Upload: others
View: 4 times
Download: 0 times
Share this document with a friend
64
Transcript
Page 1: The problem - 2021.hroug.hr
Page 2: The problem - 2021.hroug.hr

The problem

● Last night report took 30 minutes instead of 1!

● Developer: I believe i can make this part of the job run many times faster - when can i test it?

Page 3: The problem - 2021.hroug.hr

Boris OblakAbakus plus d.o.o.

Page 4: The problem - 2021.hroug.hr

Abakus plus d.o.o.History

from 1992, ~20 employees

Applications:special (DMS – Document Management System, DB – Newspaper Distribution, FIS – Flight Information System)ARBITER – the ultimate tool in audit trailingAPPM – Abakus Plus Performance and Monitoring Tool

Services:DBA, OS administration, programming (MediaWiki, Oracle)networks (services, VPN, QoS, security)open source, monitoring (Nagios, OCS, Wiki)

Hardware:servers, Backup server, SAN storage, firewalls

Infrastructure:from 1995 GNU/Linux (>20 years of experience!)>20 years of experience with High-Availability!

Page 5: The problem - 2021.hroug.hr
Page 6: The problem - 2021.hroug.hr

PROD

The problem

Page 7: The problem - 2021.hroug.hr

The problem

PROD TEST

● Beyond every prod ...– There is TEST, DEV …

Page 8: The problem - 2021.hroug.hr

The problem

PROD TEST DEV

● Beyond every prod ...– There is TEST, DEV …– … and other project-specific

environment.

Page 9: The problem - 2021.hroug.hr

The problem

PROD

PROD● PROD grows

Page 10: The problem - 2021.hroug.hr

The problem

PROD

TEST DEV

● Trying to migrate the problem by copying subsets of PROD …

Page 11: The problem - 2021.hroug.hr

The problem

PROD

TEST DEV

● Trying to migrate the problem by copying subsets of PROD …

● … but it is difficult andtime-consuming.Most give up …

Page 12: The problem - 2021.hroug.hr

The problem

PROD

TEST DEV

● The environment become stale …

Page 13: The problem - 2021.hroug.hr

Attempting to solve problem

PROD

Page 14: The problem - 2021.hroug.hr

Attempting to solve problem

PROD

DEVTom

DEVSally

DEVHarry

In a perfect world ...

Page 15: The problem - 2021.hroug.hr

Attempting to solve problem

In a real world ...

PROD

DEV

Tom Sally Harry

Page 16: The problem - 2021.hroug.hr

Attempting to solve problem

● It is not easy for developers or testers to share environments simultaneously.– Changes made by each user conflict with one another.

● Serialize access to the limited number of environments.– Each user queues at the resource – their project takes

more time.

– Each user destructively changes the resource.

● We need a way and time to reset or cleanup environment between each use.– Reset or clean up takes time and resources.

Page 17: The problem - 2021.hroug.hr

Test

● The best place to test is on production.– Right data, right stats, right hardware.

– End-users may disagree.

– At least competition for resources is a threat.

– Cannot test code on »history« data.

● Next best is a »good« copy of production.– How good, how often, how quickly?

– How do you supply a terrabyte sized database to five different developer teams without 5TB of disk space?

– How do you supply one week old database?

Page 18: The problem - 2021.hroug.hr

The problem

> ----- Original Message -----> From: xxxxxxxxxxxxxxxxxxxxx> To: "Boris Oblak" <[email protected]>> Sent: Tuesday, 8. March 2014 11:43:55> Subjects: The database from Friday>> Boris,a procedure that ran over the weekend went wrong. Can you restore the friday's database somewhere where we could repeat the procedure and debug it?>

Page 19: The problem - 2021.hroug.hr

The problem> ----- Original Message -----> From: xxxxxxxxxxxxxxxxxxxxx> To: "Boris Oblak" <[email protected]>> Sent: Tuesday, 8. March> Subjects: The database from Friday>> Boris,a procedure that ran over the weekend went wrong. Can you restore the friday's database at 20pm somewhere where we could repeat the procedure and debug it?>● Last night report took 30 minutes instead of

1!● Developer: I believe i can make this part of

the job run many times faster - when can i test it?

● Different versions in PROD and DEV or TEST databases!

Page 20: The problem - 2021.hroug.hr

The problem: debuging

PRODtoday

● Test on actual data.

Page 21: The problem - 2021.hroug.hr

The problem: debuging

PRODtoday

● Test on actual data.

TESTFriday, march 4th,

20pm

Page 22: The problem - 2021.hroug.hr

The problem: debuging

PRODtoday

● Test on actual data.

TESTFriday, march 4th,

20pm

Page 23: The problem - 2021.hroug.hr

The problem: debuging

PRODtoday

● Test on actual data.

TESTFriday, march 4th,

20pm

Page 24: The problem - 2021.hroug.hr

The problem: debuging

PRODtoday

● Test on actual data.

TESTFriday, march 4th,

20pm

TESTFriday, february 26th,

20pm

Page 25: The problem - 2021.hroug.hr

The problem

PROD V1.0

● Different versions on PROD, TEST and DEV

TEST V1.1 DEV V1.1

Page 26: The problem - 2021.hroug.hr

The problem: reporting● Last night report took 30 minutes instead

of 2. Why? Make sure it doesn't do it again tonight.– data change,

– statictics might change,

– is execution plan same as yesterday?

Page 27: The problem - 2021.hroug.hr

A solution

PROD

● Virtual database of PROD from yesterday.● Run new report.

PROD now

-1PROD

New report

Page 28: The problem - 2021.hroug.hr

A solution

PROD

● Another virtual database of PROD from yesterday.

● Run old report.

PRODnow

-1

New reportPROD

Old report

PROD now

-1

Page 29: The problem - 2021.hroug.hr

A solution

PROD

● Virtual database from PROD.● Run new and old report and compare

results.PROD now

-1

PRODnow

-1

New reportPROD

Old report

Compareresults

Page 30: The problem - 2021.hroug.hr

A solution

PROD

● Virtual database of PROD from history.● Run new and old report and compare

results.PROD now

-1

PRODnow

-1

PRODPROD now-

2

PRODnow-2

PROD now-n

PRODnow-n

Page 31: The problem - 2021.hroug.hr

The problem: reporting● Last night report took 30 minutes instead

of 2. Why? Make sure it doesn't do it again tonight.– data change,

– statictics might change,

– is execution plan same as yesterday?

● Open database from yesterday.– check/debug report, check workload, compare results.

● Open database from any day in last week/month.– check updated report on all virtual databases.

Page 32: The problem - 2021.hroug.hr

The problem: optimizing● Developer: I believe i can make this part

of the job run many times faster - when can i test it?

● Open database from yesterday.– check/debug job, check workload, check results.

● Open database from any day in last week/month.– check updated job on all virtual databases, compare

results between »old« and »new« job.

Page 33: The problem - 2021.hroug.hr

The problem: different versions

PROD V1.0

● Different versions on PROD, TEST and DEV

TEST V1.1 DEV V1.1

Page 34: The problem - 2021.hroug.hr

The problem

PROD V1.0

● Debug on PROD!? Or ...

TEST V1.1 DEV V1.1

Page 35: The problem - 2021.hroug.hr

The problem

PROD V1.0

● Debug on PROD!? Or ...● … create V1.0 TEST clone and debug it.

TEST V1.1 DEV V1.1

TEST V1.0

Page 36: The problem - 2021.hroug.hr

A solution

PROD

● DEV database for each developer team.

DEV1 DEVnDEV2

Page 37: The problem - 2021.hroug.hr

A solution

PROD

● DEV database for each developer team.● Point in time database for each problem.

DEV1 DEVnDEV2

TESTtime1

TESTntimen

TESTtime2

Page 38: The problem - 2021.hroug.hr

DBA

● Developers,● testers.

● Leadership.

Page 39: The problem - 2021.hroug.hr

Point In Time Recovery

● Setup a new server and restore the backup.

● Open the standby database in read only mode (if we have old enough standby database).

● Import data or metadata from exports (if we have one).

Page 40: The problem - 2021.hroug.hr

Point In Time Recovery

● Setup a new server and restore the backup.

● Open the standby database in read only mode (if we have old enough standby database).

● Import data or metadata from exports (if we have one).

● Time to complete procedure?● Cost (DBA work, servers, …)?

Page 41: The problem - 2021.hroug.hr

MISSION: IMPOSSIBLE

Page 42: The problem - 2021.hroug.hr

MISSION: IMPOSSIBLE

Page 43: The problem - 2021.hroug.hr

Backup Server – Deja Vu

● Connect to the Backup server.● Open the database from required time in

read-only or read-write mode.

Page 44: The problem - 2021.hroug.hr

The solution

Tom

Page 45: The problem - 2021.hroug.hr

The solution

Tom

Sally

Page 46: The problem - 2021.hroug.hr

The solution

Tom

Sally

Harry

Page 47: The problem - 2021.hroug.hr

The solutionTime 1 Time 3Time 1 Time 2

Time 4 Time 5

Backup server

PROD

Page 48: The problem - 2021.hroug.hr

The solution

Time 1Time 2

NFSNFS

PROD

Backup server

DEV srv1 TEST srv1

Page 49: The problem - 2021.hroug.hr

Backup Server – Deja Vu

Page 50: The problem - 2021.hroug.hr

Backup Server – Deja Vu

Page 51: The problem - 2021.hroug.hr

Backup Server – Deja Vu

Page 52: The problem - 2021.hroug.hr

Backup Server – Deja Vu

Page 53: The problem - 2021.hroug.hr

Backup Server – Deja Vu

Page 54: The problem - 2021.hroug.hr

Backup Server – Deja Vu

Page 55: The problem - 2021.hroug.hr

Disk space

Page 56: The problem - 2021.hroug.hr

Disk space

● 577 days of history● 416,40 TB of data occupies 22 TB of

physical disk space

Page 57: The problem - 2021.hroug.hr

Backup Server - Editions

Lite Standard Deja Vu

Primary purpose backup & recovery

backup & recovery

test & development

Oracle license required NO YES YES

Perfect Recall Optional Optional Optional

Page 58: The problem - 2021.hroug.hr

The Solution● Backup server & Deja Vu● Virtual databases.● Fast data provisioning in continous

delivery.● Restore points.● Faster development and accurate testing.● Fast and accurate debuging.● Reduces IT cost.

Page 59: The problem - 2021.hroug.hr

Boris OblakAbakus plus d.o.o.

ORA-03113: end-of-file on communication channel

Page 60: The problem - 2021.hroug.hr

Oracle Physical Standby

Page 61: The problem - 2021.hroug.hr

Perfect Recall

Page 62: The problem - 2021.hroug.hr

Environment

Page 63: The problem - 2021.hroug.hr

Disaster scenario – SAN(disk) failure

Page 64: The problem - 2021.hroug.hr

Recovery scenario


Recommended