OpenQM Martin Phillips Ladybridge Systems Ltd Configuration and Performance Optimisation.
-
Upload
german-pippins -
Category
Documents
-
view
227 -
download
3
Transcript of OpenQM Martin Phillips Ladybridge Systems Ltd Configuration and Performance Optimisation.
![Page 1: OpenQM Martin Phillips Ladybridge Systems Ltd Configuration and Performance Optimisation.](https://reader036.fdocuments.us/reader036/viewer/2022081505/5517ac0f5503463e368b5e1d/html5/thumbnails/1.jpg)
OpenQM
Martin PhillipsLadybridge Systems Ltd
Configuration and Performance
Optimisation
![Page 2: OpenQM Martin Phillips Ladybridge Systems Ltd Configuration and Performance Optimisation.](https://reader036.fdocuments.us/reader036/viewer/2022081505/5517ac0f5503463e368b5e1d/html5/thumbnails/2.jpg)
What We Are Going To See Today....
Installation overview
Permissions
Configuration Parameters – What they do
Ways to Optimise Application Performance
![Page 3: OpenQM Martin Phillips Ladybridge Systems Ltd Configuration and Performance Optimisation.](https://reader036.fdocuments.us/reader036/viewer/2022081505/5517ac0f5503463e368b5e1d/html5/thumbnails/3.jpg)
Installation Overview
QM is installed from a self-extracting archive
All installed components go in the QMSYS account directory
Default location for QMSYS isC:\QMSYS (Windows)/usr/qmsys (Linux)
Upgrade will overlay existing installed version
Allow five minutes for a new install. Upgrade is typically under one minute.
![Page 4: OpenQM Martin Phillips Ladybridge Systems Ltd Configuration and Performance Optimisation.](https://reader036.fdocuments.us/reader036/viewer/2022081505/5517ac0f5503463e368b5e1d/html5/thumbnails/4.jpg)
![Page 5: OpenQM Martin Phillips Ladybridge Systems Ltd Configuration and Performance Optimisation.](https://reader036.fdocuments.us/reader036/viewer/2022081505/5517ac0f5503463e368b5e1d/html5/thumbnails/5.jpg)
Permissions
QM uses the operating system file structures and is therefore governed by file permissions.
Consider users as being in three classes:AdministratorsDevelopersOthers
There is a detailed list of access required to system files by each class of user in the QM Reference Manual.
Don't forget to set application file permissions.
![Page 6: OpenQM Martin Phillips Ladybridge Systems Ltd Configuration and Performance Optimisation.](https://reader036.fdocuments.us/reader036/viewer/2022081505/5517ac0f5503463e368b5e1d/html5/thumbnails/6.jpg)
![Page 7: OpenQM Martin Phillips Ladybridge Systems Ltd Configuration and Performance Optimisation.](https://reader036.fdocuments.us/reader036/viewer/2022081505/5517ac0f5503463e368b5e1d/html5/thumbnails/7.jpg)
Configuration Parameters
Parameters are in the qmconfig file in the QMSYS account directory.
$ls /usr/qmsysACCOUNTS ERRMSG.DIC $MAP.DIC $SVLISTSACCOUNTS.DIC $FORMS MESSAGES SYSCOMbin gcat NEWVOC terminfoBP $HOLD prt terminfo.srccat $HOLD.DIC qmconfig VOCDICT.DIC $IPC QM.VOCLIB VOC.DICDIR_DICT licence.txt readme.txterrlog $LOGINS $SCREENSERRMSG $MAP $SCREENS.DIC
Can amend with any text editor or the Windows QM Config Editor
![Page 8: OpenQM Martin Phillips Ladybridge Systems Ltd Configuration and Performance Optimisation.](https://reader036.fdocuments.us/reader036/viewer/2022081505/5517ac0f5503463e368b5e1d/html5/thumbnails/8.jpg)
Configuration Parameters
Changes take effect when QM is next started
Windows:QMSvc –restart
Linux:qm -restart
![Page 9: OpenQM Martin Phillips Ladybridge Systems Ltd Configuration and Performance Optimisation.](https://reader036.fdocuments.us/reader036/viewer/2022081505/5517ac0f5503463e368b5e1d/html5/thumbnails/9.jpg)
Configuration Parameters
Parameter values can be viewed with the CONFIG command.
Version number 2.8-9Licence number 0216138423, System id XPXM-XCNKCMDSTACK 99DEADLOCK 1DUMPDIRERRLOG 20 kbEXCLREM 0FILERULE 7FLTDIFF 0.00000000002910FSYNC 0
![Page 10: OpenQM Martin Phillips Ladybridge Systems Ltd Configuration and Performance Optimisation.](https://reader036.fdocuments.us/reader036/viewer/2022081505/5517ac0f5503463e368b5e1d/html5/thumbnails/10.jpg)
Configuration Parameters
Some parameters are global and apply to all users. Others are private and can be modified with the CONFIG command.
CONFIG RECCACHE 10
Typically, would modify via the LOGIN script.
![Page 11: OpenQM Martin Phillips Ladybridge Systems Ltd Configuration and Performance Optimisation.](https://reader036.fdocuments.us/reader036/viewer/2022081505/5517ac0f5503463e368b5e1d/html5/thumbnails/11.jpg)
Configuration Parameters
Only three configuration parameters are critical to system operation.
The remaining parameters mainly control aspects of user management, security, data integrity, performance and error diagnostics.
![Page 12: OpenQM Martin Phillips Ladybridge Systems Ltd Configuration and Performance Optimisation.](https://reader036.fdocuments.us/reader036/viewer/2022081505/5517ac0f5503463e368b5e1d/html5/thumbnails/12.jpg)
NUMFILES Configuration Parameter
Sets size of shared memory file table.
Every file open in QM needs a file table entry.
Opening one file many times uses only one entry.
Default value is 80.
Reaching the limit will cause opens to fail.
GlobalIMPORTANT
![Page 13: OpenQM Martin Phillips Ladybridge Systems Ltd Configuration and Performance Optimisation.](https://reader036.fdocuments.us/reader036/viewer/2022081505/5517ac0f5503463e368b5e1d/html5/thumbnails/13.jpg)
NUMLOCKS Configuration Parameter
Sets size of shared memory record lock table.
Every record lock needs an entry in this table.
Multiple concurrent READL locks for the same record each need an entry.
Default value is 100.
Attempting to lock a record when the table is full will wait for space to become available.
GlobalIMPORTANT
![Page 14: OpenQM Martin Phillips Ladybridge Systems Ltd Configuration and Performance Optimisation.](https://reader036.fdocuments.us/reader036/viewer/2022081505/5517ac0f5503463e368b5e1d/html5/thumbnails/14.jpg)
MAXIDLEN Configuration Parameter
Sets the maximum length of a record id.
Defaults to 63, can be up to 255.
Impacts size of locking tables.
QM tracks largest id ever written to each file.
Cannot open a file that has records with id lengths larger than the value of MAXIDLEN.
SELECT or qmfix will correct id limit if records have been deleted.
GlobalIMPORTANT
![Page 15: OpenQM Martin Phillips Ladybridge Systems Ltd Configuration and Performance Optimisation.](https://reader036.fdocuments.us/reader036/viewer/2022081505/5517ac0f5503463e368b5e1d/html5/thumbnails/15.jpg)
Configuration Parameters
User Management
- Allocation of user numbers
![Page 16: OpenQM Martin Phillips Ladybridge Systems Ltd Configuration and Performance Optimisation.](https://reader036.fdocuments.us/reader036/viewer/2022081505/5517ac0f5503463e368b5e1d/html5/thumbnails/16.jpg)
USERPOOL Configuration Parameter
Allows the upper user number that will be assigned to QM processes to be changed from the default 1023.
This value will automatically increase if the licence allows a greater number of processes.
Global
![Page 17: OpenQM Martin Phillips Ladybridge Systems Ltd Configuration and Performance Optimisation.](https://reader036.fdocuments.us/reader036/viewer/2022081505/5517ac0f5503463e368b5e1d/html5/thumbnails/17.jpg)
FIXUSERS Configuration Parameter
Some applications rely on specific user numbers being allocated to certain processes.
FIXUSERS=user,count
Sets a range of user numbers to be assigned only to processes started with the -123 option where 123 is the required user number.
Global
![Page 18: OpenQM Martin Phillips Ladybridge Systems Ltd Configuration and Performance Optimisation.](https://reader036.fdocuments.us/reader036/viewer/2022081505/5517ac0f5503463e368b5e1d/html5/thumbnails/18.jpg)
PORTMAP Configuration Parameter
Some applications allocate user numbers based on tcp/ip port number.
PORTMAP=port,user,count
Assigns a range of tcp/ip port numbers to a corresponding range of QM user numbers.
Global
![Page 19: OpenQM Martin Phillips Ladybridge Systems Ltd Configuration and Performance Optimisation.](https://reader036.fdocuments.us/reader036/viewer/2022081505/5517ac0f5503463e368b5e1d/html5/thumbnails/19.jpg)
PHANTOMS Configuration Parameter
Some applications allocate fixed user numbers to phantom processes.
PHANTOMS=user,count
Assigns a range of QM user numbers for phantoms started with the user number option to the PHANTOM command:
PHANTOM USER 5 SALES.ANALYSIS
Global
![Page 20: OpenQM Martin Phillips Ladybridge Systems Ltd Configuration and Performance Optimisation.](https://reader036.fdocuments.us/reader036/viewer/2022081505/5517ac0f5503463e368b5e1d/html5/thumbnails/20.jpg)
Configuration Parameters
Security and Data Integrity
- Extended file name syntax
- Interoperability of multiple QM servers
- QMClient
- Lock enforcement
- Deadlock management
- File update
![Page 21: OpenQM Martin Phillips Ladybridge Systems Ltd Configuration and Performance Optimisation.](https://reader036.fdocuments.us/reader036/viewer/2022081505/5517ac0f5503463e368b5e1d/html5/thumbnails/21.jpg)
FILERULE Configuration Parameter
QM has three extended filename syntaxes:
account:file FILERULE=1
server:account:file FILERULE=2
PATH:pathname FILERULE=4
These must be enabled using FILERULE as they can weaken system security.
Can reduce with CONFIG access but not increase.
Private
![Page 22: OpenQM Martin Phillips Ladybridge Systems Ltd Configuration and Performance Optimisation.](https://reader036.fdocuments.us/reader036/viewer/2022081505/5517ac0f5503463e368b5e1d/html5/thumbnails/22.jpg)
NETFILES Configuration Parameter
NETFILES=1 allows opening of files on remote systems (NFS). Dangerous as locking is local to each system.
NETFILES=2 allows incoming QMNet connections.
Can use both together or NETFILES=3
Global
![Page 23: OpenQM Martin Phillips Ladybridge Systems Ltd Configuration and Performance Optimisation.](https://reader036.fdocuments.us/reader036/viewer/2022081505/5517ac0f5503463e368b5e1d/html5/thumbnails/23.jpg)
QMCLIENT Configuration Parameter
Provides additional security for QMClient sessions.
QMCLIENT=0 No restrictions
QMCLIENT=1 Bans OPEN and EXECUTE
QMCLIENT=2 Limits subroutine calls
Can increase but not reduce.
Private
![Page 24: OpenQM Martin Phillips Ladybridge Systems Ltd Configuration and Performance Optimisation.](https://reader036.fdocuments.us/reader036/viewer/2022081505/5517ac0f5503463e368b5e1d/html5/thumbnails/24.jpg)
FSYNC Configuration Parameter
System integrity after a hardware failure can be improved by force writing file updates but this will degrade performance.
FSYNC=1 Force writes at structural changes to a file (e.g. overflow allocation)
FSYNC=2 Force writes at transaction commit.
Can use both or FSYNC=3
Private
![Page 25: OpenQM Martin Phillips Ladybridge Systems Ltd Configuration and Performance Optimisation.](https://reader036.fdocuments.us/reader036/viewer/2022081505/5517ac0f5503463e368b5e1d/html5/thumbnails/25.jpg)
MUSTLOCK Configuration Parameter
Historically, multivalue databases have allowed updates without locking.
This should never have been allowed.
MUSTLOCK=1 enforces strict locking rules.
May require application changes (e.g. single user processing or writing new records).
Private
![Page 26: OpenQM Martin Phillips Ladybridge Systems Ltd Configuration and Performance Optimisation.](https://reader036.fdocuments.us/reader036/viewer/2022081505/5517ac0f5503463e368b5e1d/html5/thumbnails/26.jpg)
DEADLOCK Configuration Parameter
Normally QM allows applications to go into deadlock situations.
Diagnostics are easier when the fault is still there.
Setting DEADLOCK=1 causes a program that would create a deadlock to be aborted.
Without transactions there is the possibility of data integrity errors.
Global
![Page 27: OpenQM Martin Phillips Ladybridge Systems Ltd Configuration and Performance Optimisation.](https://reader036.fdocuments.us/reader036/viewer/2022081505/5517ac0f5503463e368b5e1d/html5/thumbnails/27.jpg)
SAFEDIR Configuration Parameter
Improves resilience of writes to directory files at the expense of performance.
Writes to a temporary item, deletes original (if any) and then renames temporary item.
Private
![Page 28: OpenQM Martin Phillips Ladybridge Systems Ltd Configuration and Performance Optimisation.](https://reader036.fdocuments.us/reader036/viewer/2022081505/5517ac0f5503463e368b5e1d/html5/thumbnails/28.jpg)
Configuration Parameters
Performance
- Record caching
- Sorting
![Page 29: OpenQM Martin Phillips Ladybridge Systems Ltd Configuration and Performance Optimisation.](https://reader036.fdocuments.us/reader036/viewer/2022081505/5517ac0f5503463e368b5e1d/html5/thumbnails/29.jpg)
RECCACHE Configuration Parameter
Sets size of record cache.
Default is zero, maximum is 32.
May improve performance of applications that re-read the same data many times.
Private
![Page 30: OpenQM Martin Phillips Ladybridge Systems Ltd Configuration and Performance Optimisation.](https://reader036.fdocuments.us/reader036/viewer/2022081505/5517ac0f5503463e368b5e1d/html5/thumbnails/30.jpg)
SORTMEM Configuration Parameter
Query processor sorting uses a memory based sort until the volume of data reaches this limit.
Set in kb, default 1024 (1Mb).
Going over this limit adopts a disk based sort merge algorithm.
Private
![Page 31: OpenQM Martin Phillips Ladybridge Systems Ltd Configuration and Performance Optimisation.](https://reader036.fdocuments.us/reader036/viewer/2022081505/5517ac0f5503463e368b5e1d/html5/thumbnails/31.jpg)
SORTWORK Configuration Parameter
Sets location of directory to which intermediate files will be written in a disk sort.
Can help with load balancing.
Private
![Page 32: OpenQM Martin Phillips Ladybridge Systems Ltd Configuration and Performance Optimisation.](https://reader036.fdocuments.us/reader036/viewer/2022081505/5517ac0f5503463e368b5e1d/html5/thumbnails/32.jpg)
SORTMRG Configuration Parameter
Determines the number of disk based sort streams merged in each pass.
Default is 4 which works well for most systems.
Minimum 2, maximum 10.
Optimum value depends on relative performance of processor and disk.
Private
![Page 33: OpenQM Martin Phillips Ladybridge Systems Ltd Configuration and Performance Optimisation.](https://reader036.fdocuments.us/reader036/viewer/2022081505/5517ac0f5503463e368b5e1d/html5/thumbnails/33.jpg)
Configuration Parameters
Error Diagnostics
- System error log
- Process dump files
![Page 34: OpenQM Martin Phillips Ladybridge Systems Ltd Configuration and Performance Optimisation.](https://reader036.fdocuments.us/reader036/viewer/2022081505/5517ac0f5503463e368b5e1d/html5/thumbnails/34.jpg)
ERRLOG Configuration Parameter
The error log provides valuable information in the event of an application error.
Global
28 Jan 09 12:14:33 User 34 (pid 4168, sarah, SALES): 000004F1: Unassigned variable CLI at line 81 of INVOICE
![Page 35: OpenQM Martin Phillips Ladybridge Systems Ltd Configuration and Performance Optimisation.](https://reader036.fdocuments.us/reader036/viewer/2022081505/5517ac0f5503463e368b5e1d/html5/thumbnails/35.jpg)
ERRLOG Configuration Parameter
The ERRLOG parameter set the size limit in kb.
On reaching this size, the first half of the data is discarded.
Applications can write to the error log using the LOGMSG command or QMBasic statement.
Global
![Page 36: OpenQM Martin Phillips Ladybridge Systems Ltd Configuration and Performance Optimisation.](https://reader036.fdocuments.us/reader036/viewer/2022081505/5517ac0f5503463e368b5e1d/html5/thumbnails/36.jpg)
DUMPDIR Configuration Parameter
QM can produce detailed diagnostic dumps of a process at a run time error or on demand.
By default, these are written to the QMSYS directory.
DUMPDIR allows the location of the dump file to be changed.
Can be relative pathname such as "."
Private
![Page 37: OpenQM Martin Phillips Ladybridge Systems Ltd Configuration and Performance Optimisation.](https://reader036.fdocuments.us/reader036/viewer/2022081505/5517ac0f5503463e368b5e1d/html5/thumbnails/37.jpg)
PDUMP Configuration Parameter
Process dump files are a great debugging tool but allow a user to see the data of a program in another session, weakening security.
PDUMP=1 limits use of the PDUMP command to processes running with the same user name.
Global
![Page 38: OpenQM Martin Phillips Ladybridge Systems Ltd Configuration and Performance Optimisation.](https://reader036.fdocuments.us/reader036/viewer/2022081505/5517ac0f5503463e368b5e1d/html5/thumbnails/38.jpg)
Configuration Parameters
Miscellaneous
- Directories (temporary file, terminfo)
- Startup command
- Spooler configuration (Linux)
- Input date conversion
![Page 39: OpenQM Martin Phillips Ladybridge Systems Ltd Configuration and Performance Optimisation.](https://reader036.fdocuments.us/reader036/viewer/2022081505/5517ac0f5503463e368b5e1d/html5/thumbnails/39.jpg)
TEMPDIR Configuration Parameter
Sets the location of the temporary directory.
Defaults to operating system temporary directory if not set.
Ideally should be a directory that can be cleared on reboot.
Careful placement can improve load balancing.
Private
![Page 40: OpenQM Martin Phillips Ladybridge Systems Ltd Configuration and Performance Optimisation.](https://reader036.fdocuments.us/reader036/viewer/2022081505/5517ac0f5503463e368b5e1d/html5/thumbnails/40.jpg)
TERMINFO Configuration Parameter
Allows terminfo database to be stored in a non-default location.
Private
![Page 41: OpenQM Martin Phillips Ladybridge Systems Ltd Configuration and Performance Optimisation.](https://reader036.fdocuments.us/reader036/viewer/2022081505/5517ac0f5503463e368b5e1d/html5/thumbnails/41.jpg)
STARTUP Configuration Parameter
Executes a command when QM is started.
Typically used to start phantom processes.
Command runs as SYSTEM (Windows) or root (Linux, Mac) which may be too powerful.
AUTHENTICATE command can be used to reduce privileges.
Global
![Page 42: OpenQM Martin Phillips Ladybridge Systems Ltd Configuration and Performance Optimisation.](https://reader036.fdocuments.us/reader036/viewer/2022081505/5517ac0f5503463e368b5e1d/html5/thumbnails/42.jpg)
SPOOLER Configuration Parameter
Sets operating system spooler to be used.
Default is to use "lp".
Use of alternative spooler may need the $SPOOLER record in the QMSYS account to be modified.
Private
![Page 43: OpenQM Martin Phillips Ladybridge Systems Ltd Configuration and Performance Optimisation.](https://reader036.fdocuments.us/reader036/viewer/2022081505/5517ac0f5503463e368b5e1d/html5/thumbnails/43.jpg)
YEARBASE Configuration Parameter
Moves the start of the 100 year window for entry of two digit year numbers.
Default value is 1930.
Private
![Page 44: OpenQM Martin Phillips Ladybridge Systems Ltd Configuration and Performance Optimisation.](https://reader036.fdocuments.us/reader036/viewer/2022081505/5517ac0f5503463e368b5e1d/html5/thumbnails/44.jpg)
![Page 45: OpenQM Martin Phillips Ladybridge Systems Ltd Configuration and Performance Optimisation.](https://reader036.fdocuments.us/reader036/viewer/2022081505/5517ac0f5503463e368b5e1d/html5/thumbnails/45.jpg)
Performance Tuning
Operating System Level
Load balancing:
- Put most frequently accessed files on separate disks
- Separate indices from data
![Page 46: OpenQM Martin Phillips Ladybridge Systems Ltd Configuration and Performance Optimisation.](https://reader036.fdocuments.us/reader036/viewer/2022081505/5517ac0f5503463e368b5e1d/html5/thumbnails/46.jpg)
Performance Tuning
Application
Use alternate key indices (up to 32 per file)
Choose appropriate group size
Defer dynamic file resizing
Avoid inefficient program constructs.....
![Page 47: OpenQM Martin Phillips Ladybridge Systems Ltd Configuration and Performance Optimisation.](https://reader036.fdocuments.us/reader036/viewer/2022081505/5517ac0f5503463e368b5e1d/html5/thumbnails/47.jpg)
FOR / NEXT Optimisation
FOR X = 1 TO DCOUNT(LIST, @VM) ...processing...NEXT X
Rewrite as
N = DCOUNT(LIST, @VM)FOR X = 1 TO N ...processing...NEXT X
![Page 48: OpenQM Martin Phillips Ladybridge Systems Ltd Configuration and Performance Optimisation.](https://reader036.fdocuments.us/reader036/viewer/2022081505/5517ac0f5503463e368b5e1d/html5/thumbnails/48.jpg)
Field Hints
QM maintains a pointer to the last field extracted from a dynamic array.
Extraction of data from a large dynamic array may be considerably faster if it is delimited by field marks.
The RAISE() function can be used to promote all mark characters to the next higher level.
![Page 49: OpenQM Martin Phillips Ladybridge Systems Ltd Configuration and Performance Optimisation.](https://reader036.fdocuments.us/reader036/viewer/2022081505/5517ac0f5503463e368b5e1d/html5/thumbnails/49.jpg)
Repeated Extraction
BEGIN CASE CASE REC<85> = 'A' ; DISPLAY 'Agent' CASE REC<85> = 'D' ; DISPLAY 'Dealer' ...etc...
Rewrite as
TYPE = REC<85>BEGIN CASE CASE TYPE = 'A' ; DISPLAY 'Agent' CASE TYPE = 'D' ; DISPLAY 'Dealer' ...etc...
![Page 50: OpenQM Martin Phillips Ladybridge Systems Ltd Configuration and Performance Optimisation.](https://reader036.fdocuments.us/reader036/viewer/2022081505/5517ac0f5503463e368b5e1d/html5/thumbnails/50.jpg)
Select List Transfer
LIST = ""LOOP READNEXT ID ELSE EXIT LIST<-1> = IDREPEAT
Rewrite as
READLIST LIST
![Page 51: OpenQM Martin Phillips Ladybridge Systems Ltd Configuration and Performance Optimisation.](https://reader036.fdocuments.us/reader036/viewer/2022081505/5517ac0f5503463e368b5e1d/html5/thumbnails/51.jpg)
Loop Termination
EOF = ""LOOP READNEXT ID ELSE EOF = 'END'UNTIL EOF = 'END' ...processing...REPEAT
Rewrite as
LOOP READNEXT ID ELSE EXIT ...processing...REPEAT
![Page 52: OpenQM Martin Phillips Ladybridge Systems Ltd Configuration and Performance Optimisation.](https://reader036.fdocuments.us/reader036/viewer/2022081505/5517ac0f5503463e368b5e1d/html5/thumbnails/52.jpg)
Use REMOVE to scan dynamic arrays
LOOP REMOVE ITEM FROM VAR SETTING MORE ...processing...WHILE MOREREPEAT
The fastest way to scan a large dynamic array
For non-standard delimiters, use REMOVEF()
![Page 53: OpenQM Martin Phillips Ladybridge Systems Ltd Configuration and Performance Optimisation.](https://reader036.fdocuments.us/reader036/viewer/2022081505/5517ac0f5503463e368b5e1d/html5/thumbnails/53.jpg)
Select List Termination
SELECT FVAR TO 1LOOP READNEXT ID FROM 1 ELSE EXIT ...processing... INPUT QUITUNTIL QUIT = 'Q'REPEAT
Add
CLEARSELECT 1
to terminate file scan and allow split/merge
![Page 54: OpenQM Martin Phillips Ladybridge Systems Ltd Configuration and Performance Optimisation.](https://reader036.fdocuments.us/reader036/viewer/2022081505/5517ac0f5503463e368b5e1d/html5/thumbnails/54.jpg)
Sorting
LIST2 = ""LOOP REMOVE ITEM FROM LIST1 SETTING MORE LOCATE ITEM IN LIST2<1> BY 'AL' ~ SETTING POS ELSE INS ITEM BEFORE LIST2<POS> ENDWHILE MOREREPEAT
Rewrite as
CALL !SORT(LIST1, LIST2, 'AL')
![Page 55: OpenQM Martin Phillips Ladybridge Systems Ltd Configuration and Performance Optimisation.](https://reader036.fdocuments.us/reader036/viewer/2022081505/5517ac0f5503463e368b5e1d/html5/thumbnails/55.jpg)
Keep Files Open
Try to avoid opening files in subroutines that will be called in loops.
Use common block variables or pass file variables as arguments.
QM has a "file cache" to improve performance of programs that do repeatedly open the same files.
![Page 56: OpenQM Martin Phillips Ladybridge Systems Ltd Configuration and Performance Optimisation.](https://reader036.fdocuments.us/reader036/viewer/2022081505/5517ac0f5503463e368b5e1d/html5/thumbnails/56.jpg)
Finding Performance Problems
The Hot Spot Monitor (HSM) can be used to report the number of times each subroutine is called and the processor time used by it.
This makes it easy to find the application areas that are worthy of attention.
![Page 57: OpenQM Martin Phillips Ladybridge Systems Ltd Configuration and Performance Optimisation.](https://reader036.fdocuments.us/reader036/viewer/2022081505/5517ac0f5503463e368b5e1d/html5/thumbnails/57.jpg)
![Page 58: OpenQM Martin Phillips Ladybridge Systems Ltd Configuration and Performance Optimisation.](https://reader036.fdocuments.us/reader036/viewer/2022081505/5517ac0f5503463e368b5e1d/html5/thumbnails/58.jpg)
OpenQM
QUESTIONS?
![Page 59: OpenQM Martin Phillips Ladybridge Systems Ltd Configuration and Performance Optimisation.](https://reader036.fdocuments.us/reader036/viewer/2022081505/5517ac0f5503463e368b5e1d/html5/thumbnails/59.jpg)
OpenQM