The size of the database depends on the number of client files to be stored and the method by which the server manages them. If you can estimate the maximum number of files that might be in server storage at any time, you can estimate the database size from the following information:
In the example below, the computations are probable maximums. In addition, the numbers are not based on the use of file aggregation. In general, aggregation of small files reduces the required database space. For details about aggregation, see How the Server Groups Files before Storing. Assume the following numbers for a Tivoli Storage Manager system:
500 000 files x 3 copies = 1 500 000 files
At 600 bytes per file, the space required for these files is:
(1 500 000 + 100 000 + 200 000) x 600 = 1.0GB
If the average file size is about 10KB, about 100 000 files are in cache at any one time.
100 000 files x 200 bytes = 19MB
(1 500 000 + 100 000 + 200 000) x 200 bytes = 343MB
Therefore, cached files and copy storage pool files require about 0.4GB of database space.
The database should then be approximately 2.1GB.
If you cannot estimate the numbers of files, you can roughly estimate the database size as from 1% to 5% of the required server storage space. For example, if you need 100GB of server storage, your database should be between 1GB and 5GB. See Estimating Space Needs for Storage Pools for details.
During SQL queries of the server, intermediate results are stored in temporary tables that require space in the free portion of the database. Therefore, the use of SQL queries requires additional database space. The more complicated the queries, the greater is the space required.
The size of the recovery log depends on the number of concurrent client sessions and the number of background processes executing on the server. The maximum number of concurrent client sessions is set in the server options.
Attention: Be aware that the results are estimates. The actual size of the database may differ from the estimate because of factors such as the number of directories and the length of the path and file names. You should periodically monitor your database and recovery log and adjust their sizes as necessary.
Begin with at least a 12MB recovery log. If you use the database backup and recovery functions in roll-forward mode, you should begin with at least 25MB. See Database and Recovery Log Protection and Estimating the Size of the Recovery Log for more information.
You should regularly monitor the database and recovery log to see if you should add or delete space. To monitor daily utilization, you might want to reset the maximum utilization counters each day. Utilization statistics are reset in two ways:
For example, to reset the database utilization statistic, enter:
reset dbmaxutilization
If the SELFTUNEBUFPOOLSIZE server option is in effect, the buffer pool cache hit ratio statistics are reset at the start of expiration. After expiration, the buffer pool size is increased if the cache hit ratio is less than 98%. The increase in the buffer pool size is in small increments and may change after each expiration. The change in the buffer pool size is not reflected in the server options file. You can check the current size at any time using the QUERY STATUS command. Use the SETOPT BUFPOOLSIZE command to change the buffer pool size.
To display information about the database or recovery log, issue the QUERY DB or QUERY LOG. For example:
query db
The server displays a report, like this:
+--------------------------------------------------------------------------------+ |Available Assigned Maximum Maximum Page Total Used %Util Max. | | Space Capacity Extension Reduction Size Pages Pages %Util | | (MB) (MB) (MB) (MB) (bytes) | |--------- -------- --------- --------- ------- --------- --------- ----- ----- | | 96 96 0 92 4,096 24,576 86 0.3 0.3 | +--------------------------------------------------------------------------------+
See the indicated sections for details about the following entries:
If utilization is high, you may want to add space (see Increasing the Size of the Database or Recovery Log). If utilization is low, you may want to delete space (see Decreasing the Size of the Database or Recovery Log).