P. 1
DB2 Backup Performance Presentation

DB2 Backup Performance Presentation

|Views: 339|Likes:
Published by balaji81

More info:

Published by: balaji81 on May 09, 2011
Copyright:Attribution Non-commercial

Availability:

Read on Scribd mobile: iPhone, iPad and Android.
download as PDF, TXT or read online from Scribd
See more
See less

06/07/2014

pdf

text

original

Performance Optimization with SAP on DB2 for Linux, Unix, and Windows – DB2 Backup Performance

Sven-Uwe Kusche IBM May 2009

Agenda

The DB2 Backup Utility
Presentation Q&A

Backup Tuning
Presentation Q&A

© SAP 2007 / Page 2

Agenda

The DB2 Backup Utility
Presentation Q&A

Backup Tuning
Presentation Q&A

. Read contents to high water mark Please note: DB2 backup is no file level backup! DB2 backup utility Update Recovery history file • Event • Date • Object • Granularity • .. Create Backup image ..... Read contents ..Backup Architecture Database backup DB2 configuration files DB2 container(s) ...

Backup Command 7 backup buffers Connection Layer Database Layer db2med db2med db2agent 3x db2bm READ READ READ Tablespace 3 db2bm db2bm db2bm db2pfchr db2pfchr db2pfchr Tablespace 1 WRITE Tablespace 2 WRITE pcibm16:db2w50 >db2 backup db PRD online to /dev/nst0. /dev/nst1 with 7 buffers 2x db2med parallelism 3 .

DB2 Backup in SAP – DB13 .

8973 of 9970 pages.using parallelism = 16. sqluxGetDegreeParallelism. … Autonomic BAR .log 2009-04-07-10.heap consumption.tuning enabled.090407084918 AUTHID : DB2W50 EDUID : 35 EDUNAME: db2agent (W50) 0 FUNCTION: DB2 UDB. Backup-Information in db2diag.5: As of FP4 DB2 9. Using buffer size = 553.db2w50.49. number = 16.7: As of FP0 .log in DIAGLEVEL 3: DB2 9. … Autonomic backup . Targetting (90%) .597395+120 E253547G483 LEVEL: Info PID : 7307 TID : 1195371424 PROC : db2sysc 0 INSTANCE: db2w50 NODE : 000 DB : W50 APPHDL : 0-12 APPID: *LOCAL.21.Backup Configuration db2diag.1: As of FP7 DB2 9. probe:507 DATA #1 : <preformatted> Autonomic backup/restore . database utilities.

280464 .386954 = Unthrottled = 489 = BACKUP = W50 = 0 = online db = 03/19/2009 09:38:22.Monitor Backup Process pcibm16:db2w50> db2 list utilities show detail ID Type Database Name Partition Number Description Start Time Throttling: Priority Progress Monitoring: Estimated Percentage Complete = 14 Total Work Completed Work Start Time = 8034538965 bytes = 1093299133 bytes = 03/19/2009 09:38:22.

Backup Check DB2 Recovery History File db2w50:>db2 list history backup all for W50 Op Obj Timestamp+Sequence Type Dev Earliest Log Current Log Backup ID ----------------------------------------------------------------------------------------------------------B D 20090316110019001 N D S0000073. .LOG ------------------------------------------------------------------------------------------------Contains 46 tablespace(s): 00001 SYSCATSPACE . .LOG S0000079. 00025 W50#ZBTAB1D 00026 W50#ZBTAB1I ---------------------------------------------------------------------------Comment: DB2 BACKUP W50 ONLINE Start Time: 20090316110019 End Time: 20090316113144 ---------------------------------------------------------------------------00010 Location: /db2/W50/backup Recovery history file • Range of relevant log files • Object Granularity • Event • Start and end time • Backup Image Location .

Backup Check DB2 Recovery History File in SAP – DB12 .

------------0 SYSCATSPACE 25812 . do date db2 "select TBSP_ID..18) as STATUS from SYSIBMADM.TBSP_UTILIZATION" sleep 60 done Wed May 6 04:14:05 CEST 2009 TBSP_ID TBSP_NAME HWM_IN_PAGES ------------.1..Monitoring Tablespace Status while true.... substr(TBSP_STATE. 44 record(s) selected. TBSP_PAGE_TOP as HWM_IN_PAGES.1..-------------.14) as TBSP_NAME. STATUS -----------------BACKUP_IN_PROGRESS NORMAL BACKUP_IN_PROGRESS NORMAL NORMAL BACKUP_IN_PROGRESS BACKUP_IN_PROGRESS BACKUP_IN_PROGRESS BACKUP_IN_PROGRESS BACKUP_IN_PROGRESS backup already finished backup running or still queued Only information about the status „backup complete“! . substr(TBSP_NAME. 9 W50#DDICD 30982 10 W50#DDICI 9762 . 20 W50#ES700D 314776 21 W50#ES700I 103242 22 W50#SOURCED 4984 23 W50#SOURCEI 7062 24 W50#PROTD 7828 25 W50#PROTI 2898 26 W50#LOADD 1464 .

.. 1=include logs 0=no compression. Status Flags .. ----------- W50 20081203121747 0 db2w50 0 0 Recovery history file is missing? 0 0 Information from 0 the 1 Backup Image via db2ckbkp -H 0=offline. 1=online 0=exclude logs... 16=incremental.Check of Backup Image Content db2ckbkp db2ckbkp -H <backup image> . 1=compression 0=full.: .... 3=tablespace 0=normal. Server Database Name Timestamp Database Partition Number Instance Backup Mode Includes Logs Compression Backup Type Backup Gran.. 48=delta Backup Mode: Include Logs: Compression: Backup Type: Backup Gran.

Summary Your questions Your questions ? .

Agenda The DB2 Backup Utility Presentation Q&A Backup Tuning Presentation Q&A .

Backup Optimization Targets: - Reduction of Database Size Reduction of Backup Image Size Reduction of Backup Runtime Solutions: - Tablespace Redistribution Deep Compression Reduction of High Water Mark Backup Tuning .

Network.. Parallelism..) File System Caching Tablespace Distribution High Water Mark (Extentsize) . CPU. Target Device) Configuration (IO Server.Backup Runtime Influencing Factors: - Database Size Hardware (Storage. Memory.. Number of Buffers.

Tablespace Redistribution Tablespace Distribution Backup Runtime (parallelism 3) Unequal Distribution 2 3 R3load Export / Import Including redistribution. Compression and HWM reduction 2/3 4 1 1 2 3 4 Redistribution 2/1 3 2/3 1 4 1 2/1 3 4 2/2 2/2 Beneficial Distribution .

Reduction of High Water Mark Overview Tablespace Tablespace Old HWM db2dart + reorg / db6conv or R3load export/import Tablespace Tablespace Backup runtime New HWM Backup runtime Extent 0 Please note: The method db2dart+reorg / db6conv is for a multiple iteration very painful and the Method R3load will need downtime! .

624901 Database Name: L70 Operational Mode: Database Inspection Only (INSPECT) ____________________________________________________________ Action option: LHWM Tablespace-ID: 26.34.1) Report: 2009-05-04-08. db ar 2d t/ W LH M Extent 0 Table1 .Reduction of High Water Mark db2dart Tablespace Unused DART (V9. Table: SAPR3.EDI40 DAT object size: 12 INX object size: 0 XDA object size: 0 LF object size: 0 LOB object size: 0 LOBA object size: 0 BMP object size: 0 Total size of object parts: 12 Minimum number of extents that will move by this operation: 12 Current highwater mark: 348 Desired highwater mark: 4 Number of used extents in tablespace: 337 Number of free extents below original HWM: 13 Number of free extents below desired HWM: 0 Number of free extents below current HWM: 12 Step #2: Object ID = 4 …….02. Desired Highwater Mark (Number-pages): 10 HWM Table1 Unused Table2 Table2 Unused Unused Table1 Table2 Table2 Table1 Step #1: Object ID = 22 => Offline REORG of this table using the LONGLOBDATA option (do not specify a temporary tablespace).

Reduction of High Water Mark Reorganization Unused Table1 Unused Unused HWM Unused Table2 Table2 Unused Unused Table1 Table2 Table2 Table1 reo rg <ta tab ble le 1> Unused Table2 Table2 Unused Table1 Table1 Table2 Table2 Table1 Extent 0 Table1 Extent 0 Table1 Significant Improvements with DB2 V9. .7.

An offline and an online table move is selectable.Reduction of High Water Mark db6conv Db6conv moves tables from one tablespace to another by recreating them in the specified target tablespace. .

Reduction of High Water Mark R3load Export/Import DB DB ex po rt R3load export image Caution: This method will need downtime! wi R3 th lo co ad m im pr p es or si t on R3 loa d .

Rule of Thumb: (Maximum Number of Tablespace Containers over all Tablespaces) x 2 .IO Server = Prefetcher Database Configuration parameter num_ioserver not optimal for daily business and online backups Database Configuration parameter num_ioserver with correct settings for daily business and online backups Backup Tablespace 1 Tablespace 1 Tablespace 2 Tablespace 3 Tablespace 1 Tablespace 1 Tablespace 2 Tablespace 3 Prefetching Buffer pool Buffer pool In case of Online Backups please increase the number of Prefetchers (num_ioserver).

it is necessary to restart the DB! .....admin....com/infocenter/db2luw/v9r5/index.. For availability of CIO / DIO please check the IBM documentation: http://publib..ibm. Tablespace name Tablespace ID Tablespace Type Tablespace Content Type Tablespace Page size (bytes) Tablespace Extent size (pages) Automatic Prefetch size enabled Buffer pool ID currently in use Buffer pool ID next startup Using automatic storage Auto-resize enabled File system caching ....jsp?topic=/com.File System Caching and DB2 Tablespaces pcibm16:db2w50 52> db2 get snapshot for tablespaces on w50 | more Tablespace Snapshot .. Large table space..luw.doc/doc/c0051304..ibm. 16384 2 Yes 1 1 No Yes No Bypassing File System Caching (CIO / DIO on) increases the UDI-Performance (Update/Delete/Insert)..boulder.. but can decrease under some circumstances the Backup Performance.db2...5) Please note: After switched OFF...dbobj. = = = = = = = = = = = = W50#DDICD 8 Database managed space All permanent data.html SAP Default: File System Caching NO (DB2 default as of DB2 V9....

5 FP7 (big I/O independent from Extentsize) . Larger Extentsize increases space consumption for empty tables MDC tables STOP Backup Performance Optimization for “No File System Caching” is targeted for V9.Effect of Extentsize on Backup Runtime File System Caching ON/OFF Backup Test 1 (5 Tablespaces with 5 Containers (2GB) ) 00:13:32 Filesystemcaching on Filesystemcaching off (SAP default) 00:08:04 00:05:26 00:03:58 00:04:02 00:04:00 Extentsize 2 Extentsize 8 Extentsize 16 Extentsize 2 Extentsize 8 Extentsize 16 Tablespaces Do not blindly increase the Tablespace Extentsize.7 FP1 and V9.

No Filesystem Caching on Target File System increases Backup Performance Writes to standard File System Writes using Direct IO (DIO) Writes using Concurrent IO (CIO) DB2 Backup Buffer Memory File System Caching File System File System Locking / Queuing Backup Image .

HWM equal Tablespace Size) 48 71GB 3h 10 min Test 1: Filesystem Caching OFF on Target Device (Filesystem) Backup Time 2h 17 min Test 2: Backup Test with parallel Workload Backup time with num_ioserver = AUTOMATIC(8) Backup time with num_ioserver = 20 3h 56 min 3h 06 min .5): Size: Compression: Tablespaces: Largest Tablespace: Online Backup Time 1.6TB After Load (800GB free.1TB ADC During Load (14GB free. no possiblity to reduce HWM) 29 900GB 8h R3load Export/Import including Tablespace Redistribution Target System (DB2 V9.5): Size: Compression: Tablespaces: Largest Tablespace: Online Backup Runtime: 1.Customer Case Source System (DB2 V9.Storage Optimization Tablespace Layout .

Suspend all write operations to database Create a database copy on file system level Resume all write operations Database Instance 3. 2 2 Database Database .Split Mirror Backup Production Server Backup Server 1 1 3 3 1. Database Instance 2.

Summary Your questions Your questions ? .

The statutory liability for personal injury and defective products is not affected. eine Produktstrategie bzw. ByDesign. Duet. PartnerEdge und andere in diesem Dokument erwähnte SAP-Produkte und Services sowie die dazugehörigen Logos sind Marken oder eingetragene Marken der SAP AG in Deutschland und in mehreren anderen Ländern weltweit. Links oder anderer in diesen Materialien enthaltenen Elemente. mySAP. a. einen bestimmten Geschäftsweg. Texte. This document contains only intended strategies. Die gesetzliche Haftung bei Personenschäden oder die Produkthaftung bleibt unberührt. Diese Einschränkung gilt nicht bei Vorsatz oder grober Fahrlässigkeit. SAP. mySAP. weder ausdrücklich noch stillschweigend. SAP übernimmt keine Haftung für Schäden jeglicher Art.Copyright 2009 SAP AG All rights reserved No part of this publication may be reproduced or transmitted in any form or for any purpose without the express permission of SAP AG. Alle Rechte vorbehalten.. Die Angaben im Text sind unverbindlich und dienen lediglich zu Informationszwecken. Duet. PartnerEdge and other SAP products and services mentioned herein as well as their respective logos are trademarks or registered trademarks of SAP AG in Germany and in several other countries all over the world. and/or development. Produkte können länderspezifische Unterschiede aufweisen. zu welchem Zweck und in welcher Form auch immer. und SAP unterstützt nicht die Nutzung von Internetseiten Dritter durch Sie und gibt keinerlei Gewährleistungen oder Zusagen über Internetseiten Dritter ab. unterliegen nicht dem Einfluss von SAP. spezielle. SAP assumes no responsibility for errors or omissions in this document. Data contained in this document serves informational purposes only. aber nicht ausschließlich. The information contained herein may be changed without prior notice. Die Informationen. ohne die ausdrückliche schriftliche Genehmigung durch SAP AG nicht gestattet. xApps. SAP shall have no liability for damages of any kind including without limitation direct. text. The information in this document is proprietary to SAP. or non-infringement. auf die Sie möglicherweise über die in diesem Material enthaltenen Hotlinks zugreifen. developments. Business ByDesign. Grafiken. special. mySAP. ByDesign. bereitgestellt. or other items contained within this material. Entwicklungen und Funktionen des SAP®-Produkts und ist für SAP nicht bindend. links. Diese Publikation wird ohne jegliche Gewähr. SAP has no control over the information that you may access through the use of hot links contained in these materials and does not endorse your use of third-party Web pages nor provide any warranty whatsoever relating to third-party Web pages Weitergabe und Vervielfältigung dieser Publikation oder von Teilen daraus sind. Alle anderen in diesem Dokument erwähnten Namen von Produkten und Services sowie die damit verbundenen Firmenlogos sind Marken der jeweiligen Unternehmen.com. Some software products marketed by SAP AG and its distributors contain proprietary software components of other software vendors. Dieses Dokument ist eine Vorabversion und unterliegt nicht Ihrer Lizenzvereinbarung oder einer anderen Vereinbarung mit SAP. xApp. fitness for a particular purpose. -entwicklung einzuschlagen. or consequential damages that may result from the use of these materials. SAP. indirect. die Eigentum anderer Softwarehersteller sind. This document is provided without a warranty of any kind.com. © SAP 2007 / Page 30 . Einige von der SAP AG und deren Vertriebspartnern vertriebene Softwareprodukte können Softwarekomponenten umfassen. either express or implied. Business ByDesign. In dieser Publikation enthaltene Informationen können ohne vorherige Ankündigung geändert werden. National product specifications may vary. R/3. SAP übernimmt keine Verantwortung für Fehler oder Auslassungen in diesen Materialien. SAP NetWeaver. All other product and service names mentioned and associated logos displayed are the trademarks of their respective companies. Dieses Dokument enthält nur vorgesehene Strategien. SAP garantiert nicht die Richtigkeit oder Vollständigkeit der Informationen. xApps. This limitation shall not apply in cases of intent or gross negligence. hinsichtlich der Gewährleistung der Marktgängigkeit und der Eignung für einen bestimmten Zweck sowie für die Gewährleistung der Nichtverletzung geltenden Rechts. SAP NetWeaver. including but not limited to the implied warranties of merchantability. einschließlich und ohne Einschränkung für direkte. SAP does not warrant the accuracy or completeness of the information. mySAP. product strategy. graphics. xApp. R/3. indirekte oder Folgeschäden im Zusammenhang mit der Verwendung dieser Unterlagen. This document is a preliminary version and not subject to your license agreement or any other agreement with SAP. Die in diesem Dokument enthaltenen Informationen sind Eigentum von SAP. and functionalities of the SAP® product and is not intended to be binding upon SAP to any particular course of business. Dies gilt u.

You're Reading a Free Preview

Download
scribd
/*********** DO NOT ALTER ANYTHING BELOW THIS LINE ! ************/ var s_code=s.t();if(s_code)document.write(s_code)//-->