Computer Corporation of America
|
Feedback
Search CCA:
   
USA CCA
CCA Products
CCA Customer Support
CCA Resources
CCA - Company
CCAPRINT: A Newsletter for Model 204® and System 1032® Users
March 10, 2005
     
Insight 204: Present at Insight—Stay for FREE!
Model 204: Using MONITOR DISKBUFF to Understand Your Data Printer-friendly version

Insight 204

USE OF AND ACCESS TO PRODUCTS AND FEATURES ARE IN ACCORDANCE WITH THE TERMS AND CONDITIONS OF THE USER’S SOFTWARE LICENSE. THE PRESENTATION OF MATERIAL HEREIN DOES NOT, IN ANY MANNER, MODIFY SUCH TERMS AND CONDITIONS.

Present at Insight—Stay for FREE!
By Marie Kelly
Director of Marketing

There are still a few customer speaker slots available for this year's Insight 204, being held in Boston on June 5-8. If you would like to give a Model 204-related presentation at Insight 204, please use the Insight Feedback Form and provide a brief description of your presentation topic in the Question/Comment box. Someone from CCA will be in touch with you regarding your idea. If your presentation is accepted, CCA will pay your lodging expenses at Insight 204.

To view the current list of session abstracts, visit the Insight 204 Web site at
http://www.cca-int.com/resources/usergroups/insight/main_2005.html and choose General Sessions, Breakout Sessions, and Training Sessions.

If you have not yet registered for Insight 204, you should do so immediately, since attendance at some of the sessions is limited and is on a first-come, first-served basis. As always, conference registration is free.

If you have any questions about Insight 204, please use the Insight Feedback Form to submit them. We look forward to seeing you in Boston in September!

Model 204

USE OF AND ACCESS TO PRODUCTS AND FEATURES ARE IN ACCORDANCE WITH THE TERMS AND CONDITIONS OF THE USER’S SOFTWARE LICENSE. THE PRESENTATION OF MATERIAL HEREIN DOES NOT, IN ANY MANNER, MODIFY SUCH TERMS AND CONDITIONS.

Using MONITOR DISKBUFF to Understand Your Data
By James Damon



Customers store massive amounts of data in Model 204 files with many databases currently exceeding tens of terabytes. From a macro level, it can be instructive to know what kind of data you have and how it’s being used. Is most data access to the raw or derived data stored in Table B? Is the data heavily indexed? Is there still heavy use of the hash-key index (the KEY attribute) in Table C even though there has been an effort to convert all fields to ORDERED? Is Table A frequently accessed or is it only accessed at APSY compile time? The answer to many of these questions can often be found in the disk buffer pool where database pages, currently being referenced by applications, reside.

Model 204 File Tables
Currently, these five tables comprise a Model 204 file:

  1. File Control Table (FCT), always 8 pages with the first page being the File Parameter List (FPL). Every Model 204 file, including CCAGRP and CCATEMP, has one FPL page and it is always the first page of the FCT. CCAGRP and CCATEMP have no other FCT pages.
  2. Table A contains field definitions and values for few-valued, many-valued and coded fields.
  3. Table B contains raw and derived data.
  4. Table C contains entries for the hash-key index; populated if fields have the KEY attribute.
  5. Table D contains existence bit maps, record-list-bit maps, record lists, ordered index, procedures and a few other miscellaneous data structures.

Examining the disk buffer pool
The MONITOR DISKBUFF command output displays, file-by-file and table-by-table, the number of pages currently residing in memory in the disk buffer pool, as shown in Figure 1.

Figure 1. MONITOR DISKBUFF command output

FILENAME   FCT   TABLE A  TABLE B  TABLE C  TABLE D  *TOTAL*
-------- ---- -------- ------- ------- ------- -------
CCATEMP 1 908 0 0 0 909
CCAGRP 1 0 0 0 1 2
CCASYS 1 1 25 5 13 45
USERPROC 1 0 0 0 70 71
SUBSPROC 1 0 0 0 103 104
HISTORY 0 1 390 0 610 1001
SCRATCH 0 2 17 3 3 25
ORDERS 0 1 3 0 21 25
PRICETAB 1 3 64 30 17 115
CUSTOMER 0 2 82 56 90 230
ACCOUNTS 0 2 204 18 91 315
SYSPROC 1 1 1 1 65 69
******* LINES DELETED *******
*TOTAL* 23 934 781 226 1316 3280

The list of files displayed always begins with the special files: CCATEMP and CCAGRP.

CCATEMP
CCATEMP is essentially the Model 204 page dataset. Its pages are used to store temporary data structures that have no permanent life after the run. All CCATEMP pages are labeled as Table A even though they have nothing whatsoever to do with Table A. CCATEMP pages had to be assigned to a table and Table A was arbitrarily chosen in the early design of Model 204. The data structures are, among other things:

Figure 1 shows that 908 pages from CCATEMP are currently in memory in the disk buffer pool. There may be thousands of CCATEMP pages containing the data structures, either in the CCATEMP dataset or dataspace, but these are the ones currently being referenced. It is not unusual to see 15-20% of the buffer pool consumed by CCATEMP pages.

A total of six thousand buffers (NUMBUF=6000) were allocated to this run. However, only 3280 buffers currently have data. The total number of buffers in use goes up and down during the run but can never exceed NUMBUF. Of the 6,000 buffers available, roughly 15% currently contain CCATEMP pages. Or, looking at percentages another way, of the 3,280 buffers currently in use, 27% contain CCATEMP pages. CCATEMP is typically the most active file in a run because it contains data structures created and being referenced by all logged in users.

CCAGRP
CCAGRP stores all permanent group definitions in Table D pages. There are no Table A, B or C pages in CCAGRP and no FCT pages except for the FPL.

Other Model 204 Files
The remaining files are either data files, procedure files or a combination of both.

The files named USERPROC, SUBSPROC and SYSPROC are all procedure files. Each have the FPL page, which is always the first page of the FCT, in memory. The first two files then have only pages from Table D, indicating that the file probably contains procedures only and no data.

However, SYSPROC has one page from each of Table A, B and C also in memory. This indicates that the file, in addition to being a procedure file, also contains data, although probably only a small amount. The data also has at least one field defined with the KEY attribute since one page from Table C is also in the buffer pool. The Table A page is in the buffer pool most likely as the result of compiling a request that referenced one of the fields defined in the file.

The remaining files appear to be data files. Although the pages from Table D could be User Language procedures, we know that is not the case here because we know the files. Each has some number of pages in the buffer pool from the FCT and Table A, B, C, and D. Several of the files have some number of Table C pages currently in memory, indicating that fields with the KEY attribute are defined and are currently being, or have recently been referenced. Some have pages from Table A indicating that requests were compiled that referenced fields in the file. It is also possible that fields with the FV (few valued), MV (many valued) or COD (coded) attributes have been referenced and that data is required during evaluation.

A page is only read into the buffer pool when data on that page is referenced by a command or by a User Language program. Based on this, the activity at the instant the MONITOR DISKBUFF command was issued indicates a fair amount of Ordered Index processing in conjuction with Table B access in the HISTORY, CUSTOMER, and ACCOUNTS files. If subsequent displays using MONITOR DISKBUFF reveal a similar pattern, then you have a good indication that these files are typically processed in this way.

Other clues
Suppose that the display in Figure 1 is fairly typical most of the day. But on occassion, with many users logged in and many files open for ad hoc requests or by production APSY subsystems, you see something like Figure 2:

Figure 2. MONITOR DISKBUFF command output on an atypical day

FILENAME     FCT   TABLE A   TABLE B   TABLE C   TABLE D     *TOTAL*
-------- ---- ------- ------- ------- ------- -------
CCATEMP 0 4 0 0 0 4
ACCOUNTS 0 0 5994 0 2 5996
*TOTAL* 0 4 5994 0 2 6000

This is almost conclusive evidence of a direct Table B search agains the ACCOUNTS file. There are a few other possibilities--a TABLEB RECLEN or TABLEB LIST command--but those are not generally issued in a production Online. The problem with Table B searches, aside from the fact that they are extremely I/O intensive, is that the reading of numerous Table B pages into the buffer pool may cause all other pages to be replaced, especially if the buffer pool is small or the direct search reads many Table B pages. If you need access to those pages in the near future, the pages must be re-read from the disk dataset, increasing overall database I/O, increasing response time and reducing Online performance.

The same type of results occurs when a request performs a long walk of the Ordered Index. An example of this is:

FD LASTNAME IS LIKE *SON

If there are thousands of values of LASTNAME, each value in the Ordered Index is examined to see if it matches the pattern. This can result in reading a very large number of Table D pages into the buffer pool, again displacing pages already in memory with the same consequences as a direct Table B search. Figure 3 shows an example of this situation.

Figure 3. MONITOR DISKBUFF command output for a lengthy pattern match

FILENAME     FCT   TABLE A   TABLE B   TABLE C   TABLE D     *TOTAL*
-------- ---- ------- ------- ------- ------- -------
CCATEMP 0 2 0 0 0 2
ACCOUNTS 0 0 0 0 4998 4998
*TOTAL* 0 2 0 0 4998 5000

Either of these processes can monopolize the buffer pool for the duration of the particular statement and result in a degradation of performance for all users.

Another clue to how and what data is being used is the Table A column. Consider the display in Figure 4.

Figure 4. Files with a large number of Table A pages

FILENAME     FCT   TABLE A   TABLE B   TABLE C   TABLE D     *TOTAL*
-------- ---- ------- ------- ------- ------- -------
USERPROC 1 0 0 0 66 67
SUBSPROC 1 0 0 0 1 2
SCRATCH 1 0 0 0 0 1
ACCTPROCS 1 0 0 0 98 99
STATUS 0 48 246 0 452 746
TEMP 0 2 16 3 3 24
MESSAGES 0 35 2 0 20 57

The STATUS and MESSAGES files both have quite a few Table A pages in memory. A typical file with no FV, MV or CODED fields usually has at most one page from Table A in the buffer pool. These high numbers for these files indicate that extensive use is being made of fields that have some of those attributes.

Summary
If you want to know more about how your data is being accessed or require additional information for resolving performance problems, the MONITOR DISKBUFF command can be a valuable tool in accomplishing those objectives. The command is restricted to system managers, but that restriction can be overridden by the system manager issuing the following command:

RESET COMMAND MONITOR PRIVILEGE=LOGONREQ

This grants authority to issue any MONITOR command to any logged in user.


All right reserved. Published in the United States of America.


Contact CCA Webmaster
Copyright 2008