130 likes | 225 Views
Managing Large Procedure Files. Tom Thoresen. Agenda. Procedure file organization Fast/Unload Enhancements Fast/Reload Enhancements. Procedure File Organization. Model204’s general purpose file system Allocated in ‘pages’ of course of 6184 bytes Two types of pages Directory pages
E N D
Managing Large Procedure Files Tom Thoresen
Agenda • Procedure file organization • Fast/Unload Enhancements • Fast/Reload Enhancements
Procedure File Organization • Model204’s general purpose file system • Allocated in ‘pages’ of course of 6184 bytes • Two types of pages • Directory pages • Text pages • Directory pages contain information about the actual files (or procedures) • Text pages contain the actual records
Procedure File Organization • All procedure file space is in Table D • This wasn’t always the case • Historians tell us procedures once were in the FCT • Earlier versions of the procedure file only allowed for numbers, not names • Procedure numbers still exist – each procedure still has an internal number • This number is used for handling procedure aliases
Procedure File Organization • PD pages are allocated in groups called “chunks” • This is specified by the file parameter PDSIZE • Refers to the number of pages in a “chunk” • Default is 3, some performance improvement can be had for large procedure files by increasing this value to its maximum – 255 • Larger PDSIZE can speed the process of locating a procedure
Procedure File Organization • Storing a procedure • The procedure name is hashed to locate a chunk where the name will reside • Hashing assumes the procedure will be read much more often than written • Name is stored in reserved part of dictionary page • PDSTRPPG sets maximum number of procedure names for a dictionary page • Default is 128 – this is usually adequate • First text page (if any) is allocated and saved as part of dictionary entry
Procedure File Organization • Text pages are allocated as needed • Text pages cannot be shared – even if 1 byte is used the remaining space is reserved • Records are delimited by the EOC character • Records are limited to 255 bytes • No record may be divided among text pages • If record doesn’t fit, it must be written to a new text page
Unloading Procedures with Fast/Unload • Available with Fast/Unload Version 4.2 • Only for Unload All Information unloads • New record types for UAI • PD Header record • Contains number of PD pages in file • PROC record • Name of procedure, extended procedure data, and procedure text • ALIAS record • Contains name of procedure and alias
Unloading Procedures with Fast/Unload • FSTATS now produced for procedures • Requires, of course, the FastUnload field statistics package • FSTATS also required to use automatic PDSIZE setting feature of Fast/Reload • PD header record only produced for UAI with FSTAT option
Unloading Procedures with Fast/Unload FUNL0055 TOMWEB Procedure Dictionary statistics : 7 Chunks in PD 9 Pages per chunk 63 Total pages in PD 64 Hash cells per page 4,032 Total number of cells 1,747 Total number of procs 0 Total number of aliases 22 Average length of proc/alias names 10,436 Total text pages 32,722 Average proc length in bytes 5 Average proc length in pages FUNL0004 End of Fast Unload
Loading procedures with Fast/Reload • SirMods 6.5 + • Standard Fast/Reload LAI will load any procs present in UAI data • NOPROCS LAI option will suppress loading of procedures • Increase MINBUF/MAXBUF • Procedure reload uses Model 204 disk buffer monitor • Unlike TABLEB load which uses private full-track buffers • Use as many buffers as storage capacity permits
Loading procedures with Fast/Reload • Requirements for using automatic PDSIZE • UAI done with FSTATs option • Procedure dictionary must be ‘clean’ – no existing procedures • Current PDSIZE must be 3 (the default) • Intention is to preserve any ‘manual’ setting • Number of unloaded PD pages > default PDSIZE • Reload will terminate if any procedure already exists in target procedure file
Loading procedures with Fast/Reload FUNL0055 TOMWEB Procedure Dictionary statistics : 1 Chunks in PD 63 Pages per chunk 63 Total pages in PD 128 Hash cells per page 8,064 Total number of cells 1,747 Total number of procs 0 Total number of aliases 22 Average length of proc/alias names 10,408 Total text pages 32,722 Average proc length in bytes 5 Average proc length in pages FUNL0004 End of Fast Unload