Skip to main content

This article provides information on how to improve the performance of mfsort.

Problem:

The results from testing mfsort with the same input data over many successive runs shows variance in the sort times. The data records in the test are large, circa 3K. How can the performance be improved and the results stabilised?

Resolution:

Mfsort works by storing only the key data up to 1K of data in a structure which is then sorted. If SORTSPACE is large enough, this structure is held in memory rather then paged to disk, improving overall perfomance. As sort only stores key data 1K record data, for larger records the original data needs to be accessed when returning data from the sort, resulting in slower performance. More data can be forced into memory by adding an additional key to the sort. As a guide, this additional key must be "record length - 1024 bytes" in size to ensure the whole record is held. The benefit of this approach will be enhanced by ensuring that SORTSPACE is large enough to hold maximum data in memory, for example, for sorting 50,000 3K records SORTSPACE should be approximately 150Mb.

Old KB# 13989

#COBOL
#netexpress
#RMCOBOL
#ServerExpress
#AcuCobol