Josh-D. S. Davis

Xaminmo / Omnimax / Max Omni / Mad Scientist / Midnight Shadow / Radiation Master

Previous Entry Share Next Entry
TSM constantly running full DB Backups
Josh 201604 KWP
joshdavis
I also found that DB2 is wonky in that:
* DB2 put my ACTIVELOG in C:\SERVER1 rather than C:\Tivoli\TSM\LOG as specified during loadformat
* DB2 leaves a whole lot of garbage in C:\ProgramData\IBM\DB2\DB2TSM1\SERVER1
* TSM doesn't clean up the DB2TSM1\SERVER1, even after DSMSERV REMOVEDB and DB2ICRT sequence.
* TSM decides to run a full DBB on every 10 min poll of log space, even when nothing is running and no log space is used.

I've cleared off another 20G of garbage from the drive, mostly DB2 dumps from the last instance, and restarted TSM. No new DBBs yet, which is promising.


tsm: OMNITECH>q act begint=-00:30 endt=now search=backup

Date/Time Message
-------------------- ----------------------------------------------------------
2012-04-24 13:18:06 ANR4531I An automatic full database backup will be started. The last log number used is 653 and the first log number used is 615. The log file size is 512 megabytes. The maximum log file size is 16384 megabytes. (PROCESS: 133)
2012-04-24 13:18:06 ANR0984I Process 134 for Database Backup started in the BACKGROUND at 13:18:06. (PROCESS: 134)
2012-04-24 13:18:06 ANR4559I Backup DB is in progress. (PROCESS: 134)
2012-04-24 13:18:06 ANR0506I A full backup has been started for database TSMDB1. This backup is required. (PROCESS: 134)
2012-04-24 13:18:06 ANR4626I Database backup will use 1 streams for processing with the number originally requested 1. (PROCESS: 134)
2012-04-24 13:19:42 ANR4550I Full database backup (process 134) completed. (PROCESS: 134)
2012-04-24 13:20:07 ANR2017I Administrator JDAVIS issued command: QUERY ACTLOG begint=-00:10 endt=now search=backup (SESSION: 950)
2012-04-24 13:20:42 ANR0985I Process 134 for Database Backup running in the BACKGROUND completed with completion state SUCCESS at 13:20:42. (PROCESS: 134)
2012-04-24 13:28:06 ANR4531I An automatic full database backup will be started. The last log number used is 653 and the first log number used is 615. The log file size is 512 megabytes. The maximum log file size is 16384 megabytes. (PROCESS: 134)
2012-04-24 13:28:06 ANR0984I Process 135 for Database Backup started in the BACKGROUND at 13:28:06. (PROCESS: 135)
2012-04-24 13:28:06 ANR4559I Backup DB is in progress. (PROCESS: 135)
2012-04-24 13:28:06 ANR0506I A full backup has been started for database TSMDB1. This backup is required. (PROCESS: 135)
2012-04-24 13:28:06 ANR4626I Database backup will use 1 streams for processing with the number originally requested 1. (PROCESS: 135)
2012-04-24 13:29:42 ANR4550I Full database backup (process 135) completed. (PROCESS: 135)
2012-04-24 13:30:42 ANR0985I Process 135 for Database Backup running in the BACKGROUND completed with completion state SUCCESS at 13:30:42. (PROCESS: 135)
2012-04-24 13:33:38 ANR2782I SET DBRECOVERY completed successfully and device class for automatic DB backup is set to DFILE. (SESSION: 950)
2012-04-24 13:38:08 ANR4531I An automatic full database backup will be started. The last log number used is 654 and the first log number used is 616. The log file size is 512 megabytes. The maximum log file size is 16384 megabytes. (PROCESS: 135)
2012-04-24 13:38:08 ANR0984I Process 136 for Database Backup started in the BACKGROUND at 13:38:08. (PROCESS: 136)
2012-04-24 13:38:08 ANR4559I Backup DB is in progress. (PROCESS: 136)
2012-04-24 13:38:08 ANR0506I A full backup has been started for database TSMDB1. This backup is required. (PROCESS: 136)
2012-04-24 13:38:08 ANR4626I Database backup will use 1 streams for processing with the number originally requested 1. (PROCESS: 136)
2012-04-24 13:39:46 ANR4550I Full database backup (process 136) completed. (PROCESS: 136)
2012-04-24 13:40:16 ANR2017I Administrator JDAVIS issued command: QUERY ACTLOG begint=-00:10 endt=now search=backup (SESSION: 950)
2012-04-24 13:40:46 ANR0985I Process 136 for Database Backup running in the BACKGROUND completed with completion state SUCCESS at 13:40:46. (PROCESS: 136)
2012-04-24 13:42:44 ANR2017I Administrator JDAVIS issued command: QUERY ACTLOG begint=-00:30 endt=now search=backup (SESSION: 950)

tsm: OMNITECH>q ses

Sess Comm. Sess Wait Bytes Bytes Sess Platform Client Name
Number Method State Time Sent Recvd Type
------ ------ ------ ------ ------- ------- ------- -------- ------------------
950 Tcp/Ip Run 0 S 45.3 K 1.5 K Admin WinNT JDAVIS

tsm: OMNITECH>q proc

Process Process Description Process Status
Number
-------- -------------------- -------------------------------------------------
1 Identify Duplicates Storage pool: DISKPOOL. Volume: NONE. State:
idle. State Date/Time: 04/24/2012 04:44:43.
Current Physical File(bytes): 0. Total Files
Processed: 7,259. Total Duplicate Extents Found:
3,769. Total Duplicate Bytes Found: 639,399,607.
2 Identify Duplicates Storage pool: COPYPOOL. Volume: NONE. State:
idle. State Date/Time: 04/23/2012 03:00:39.
Current Physical File(bytes): 0. Total Files
Processed: 15. Total Duplicate Extents Found: 0.
Total Duplicate Bytes Found: 0.
3 Identify Duplicates Storage pool: WDBLUE. Volume: NONE. State: idle.
State Date/Time: 04/24/2012 03:00:12. Current
Physical File(bytes): 0. Total Files Processed:
835. Total Duplicate Extents Found: 0. Total
Duplicate Bytes Found: 0.

tsm: OMNITECH>q log f=d

Total Space(MB): 16,384
Used Space(MB): 0
Free Space(MB): 19,870
Active Log Directory: C:\tivoli\tsm\log
Archive Log Directory: D:\tivoli\tsm\logarch
Mirror Log Directory:
Archive Failover Log Directory: E:\tivoli\tsm\logfail

  • 1
This may be related to ARCHLOGUSEDTHRESHOLD

Probably.
Basically, if you put one of the DB/Active Log/Archive Log on the same File system partition, or are filling up the filesystem with the active log, it calls that the active log filling up.

So, my DB and active log are on the same partition (mirrored SSD),
my archive log is on another, and my archfail on a third. The partition with the DB and activelog also has other applications on it (small system, keeping high perf stuff together). As the filesystem slowly grows, TSM can't really deal with that.

For now, I set ARCHLOGUSEDTHRESHOLD to 80 (80%) which should limit the impact of this. In the future, I might need to split the partition and put the activelog all by itself.


Logic for TSM 6.x automatic DB Backups

http://www.ibm.com/developerworks/wikis/display/tivolistoragemanager/Tivoli+Storage+Manager+V6.1.2+automatic+DB+backup

With Tivoli Storage Manager, V6.1, the transition to DB2 as the provided server database has many new capabilities. One of these is the DB2 automatic database backup capability. With this DB2 capability enabled, DB2 can decide to perform database backups based on a number of different criteria or thresholds.

Starting with Tivoli Storage Manager, V6.1.2, the Tivoli Storage Manager automatic DB backup will be enabled.

Tivoli Storage Manager will NOT use the DB2 automatic DB backup.

Some of the following criteria considered by DB2 for automatic database backup are:
1. "Has the minimum required number of full backups been performed?"
2. "Has the time interval between database backups been exceeded?"
3. "How much log space has been consumed since the last database backup?"

After evaluating the DB2 automatic database backup capabilities in our development and test environments, it was determined that the database backup processing was not consistent with the typical server administration model used by Tivoli Storage Manager.

The Tivoli Storage Manager server implemented its own approach to triggered database backups so that the frequency and timing of the database backups could be explicitly controlled by the Tivoli Storage Manager server itself. The Tivoli Storage Manager triggered backups for the server will occur as a result of the following criteria:

logSpaceConsumedSinceLastBackup used by TSM to trigger FULL auto DB backup:
logSpaceUsedSinceLastBackup = (lastActiveLogFileNum - (firstActiveLogFileNum + 1)) * logFileSize;
NOTE: logFileSize is 512M bytes set by TSM.

TSM uses the DB2 API db2GetSnapshot() to get firstActiveLogFileNum and the lastActiveLogFileNum.
For example this is from the DB snapshot:
File number of first active log = 36
File number of last active log = 140

The logSpaceUsedSinceLastBackup is calculated by counting the number of log files used since the last backup (lastActiveLogFileNum - (firstActiveLogFileNum + 1)) and multiply by the log file size.
If this value is greater than the maximum log size, a FULL DB backup will be started.
The maximum log size is default to 2G and can be set to other value ( maximum 128G) by the format or loadformat command.
This is the same trigger used by DB2 automatic DB backup trigger - "How much log space has been consumed since the last database backup?".

An informational message will be generated before the automatic DB backup is started. For example:
ANR4531I An automatic full database backup will be started. The last log number used is 140 and the first log number used is 36. The log file size is 25 megabytes. The maximum log file size is 2048 megabytes.

logUtilizationRatio used by TSM to trigger Incremental auto DB backup:
This is the ratio of the total active log space used exceed threshold ( set to 80% and not configurable ).
logUsedRatio = totalActiveLogSpaceUsed / ( totalActiveLogSpaceUsed + totalActiveLogSpaceAvailable )
TSM uses the DB2 API db2GetSnapshot() to get totalActiveLogSpaceUsed and totalActiveLogSpaceAvailable.

For example this is from the DB snapshot:
Log space available to the database (Bytes)= 83541717
Log space used by the database (Bytes) = 16683666
logUsedRatio = 16683666 / ( 16683666 + 83541717 ) = 0.16 < 80% No DB backup will be triggered.

An informational message will be generated before the automatic DB backup is started. For example:

ANR4529I An automatic full or incremental database backup will be started. The active log space used is 17.00 megabytes, and the active log space available is 1.00 megabytes. The ratio, 0.94, exceeds the threshold 0.80.

The above checking is performed with interval specified in the TSM option "Runstats Interval" which is default to 10 minutes.

NOTE: By using CLI "db2 get snapshot for db on db_alias", you can obtain the same information as using DB2 API db2GetSnapshot().

The device class used for automatic DB backup is the device class defined with the SET DBRECOVERY command.
You can check it with " q db f=d". The device class listed will be used to perform automatic DB backup.

Edited at 2012-04-30 07:40 pm (UTC)

  • 1
?

Log in

No account? Create an account