Performance Tests - Build 9111

Performance Timing Tests on Build 9111

The following are the details of some of the timing tests run against Build 9111. These tests focused on the specific aspects of the system that were changed and were designed to determine the impact of the change on the performance of the system. Since applications use a wide variety of coding styles and system functions, it is impossible to determine what performance gain you will see by switching to this build.

All tests are from a Windows XP system and, where possible, were crosschecked with other Unix/Linux systems in order to verify that the performance gains exist on all platforms.


Embedded IOLIST caching

In order to test this specific aspect of the system, we developed a program that compared simply reading a file using a standard IOLIST coded in the program versus using an IOLIST assigned to a file via the IOL= option on an OPEN.

!
! Time embedded IOLIST improvements
!
data "012345","Abc company limited","123 Main street","Unit 123", \
    "","Anytown","Anycity","ON","Canada","416-555-1234", \
    "416-555-FAX#","Fred Flintstone","UPS","www.pvxplus.com", \
    "more","fields","to","Test","With","123.45","1233.22","111.0","0","0","My","Data"
!
MYIOL: iolist \
     A$,B$,C$,D$,E$,F$,G$,H$,I$,J$,K$,L$,M$,N$,O$,P$,Q$,R$,S$,T$,U$,V$,W$,X$,Y$,Z$
!
! Load the data values
!
read data iol=MYIOL
!
open (1,iol=MYIOL)"*memory*"
write (1)iol=MYIOL
!
! Time standard read with IOL
!
X=tmr(0)
for I=1 to 500000
read (1,ind=0)iol=MYIOL
next
BASE=tmr(0) ! Old Read time
!
X=tmr(0)
for I=1 to 500000
read (1,ind=0)
next
WITHIOL=tmr(0)
!
print "Base time =",BASE
print "With IOL =",WITHIOL
print "Time diff =",WITHIOL-BASE
Test Results Pre-Build 9111
ProvideX or PxPlus
Build 9111
of PxPlus
Base Time 4.2 4.22
With IOL 7.27 4.19
Time Diff 3.07 -0.03

The test results showed a significant overhead involved with the use of the IOL= on an OPEN command in pre-Build 9111 versions. Access times to the data went from 4.2 seconds to 7.27 seconds, a 73% increase in the time it takes to process the data.

When compared to prior versions, Build 9111 eliminated overhead associated with the use of embedded IOLISTS, which relates to about a 42% improvement in performance for IOLISTs. The actual processing time involved when using the IOL= on an OPEN directive was decreased to a point where the performance achieved exceeded that obtained with the use of standard IOLISTs.


List box load improvements

The following simple program was used to test the load time for list boxes:

0010 BEGIN ; PRINT 'CS',; PRECISION 4
0020 LIST_BOX 10,@(40,0,40,24)
0030 WAIT 0; LET X$=MSE,TIME=TIM*3600,SIZE=0
0040 !
0050 FOR LINE=1 TO 32*1024
0060 LET L$=DIM(120,"This is line "+STR(LINE))
0070 LIST_BOX LOAD 10,0,L$; LET SIZE+=120
0080 NEXT
0090 !
0100 LET X$=MSE,TIME=TIM*3600-TIME
0110 PRINT "total time: ",TIME,DIM(8),"Bytes/sec: ",INT(SIZE/TIME)
Test Results Pre-Build 9111
ProvideX or PxPlus
Build 9111
of PxPlus
Total Time 32.7852 3.2436
Bytes/Sec 119,937 1,212,282

As can be seen, the time it takes to load a list box has been reduced by a factor of 10. Additional tests showed performance is 5-10 times faster depending on the configuration of the system.


Ability to read next physical record

The following two programs were used to test the effectiveness of the Read Next Physical capability on standard keyed/direct files.

Program to load the file:

0010 ERASE "tst3.dat",ERR=*NEXT
0020 DIRECT "tst3.dat",6,0,0-1000
0030 OPEN PURGE (1)"tst3.dat"
0040 FOR I=1 TO 200000
0050 LET K$=STR(RND(1000):"000")+STR(RND(1000):"000")
0060 DIM R$(100+RND(100),"Data "+K$)
0070 WRITE (1,KEY=K$)R$
0080 NEXT I


Program to time the performance gains:

0010 BEGIN
0011 WAIT .1
0020 OPEN (1)"tst3.dat"
0030 LET TCB50=TCB(50)
0040 LET X=TMR(0)
0050 READ RECORD (1,END=*NEXT)R$; N++; GOTO *SAME
0060 PRINT "Read normal next record (KEY):",TMR(0),N
0070 PRINT "Tot read=",TCB(50)-TCB50
0080 !
0090 ! ----
0100 !
0110 BEGIN
0111 WAIT .1
0120 OPEN (1)"tst3.dat"
0130 LET TCB50=TCB(50)
0140 LET X=TMR(0)
0150 READ RECORD (1,KNO=*,END=*NEXT)R$; N++; GOTO *SAME
0160 PRINT "Read next physical record (KEY):",TMR(0),N
0170 PRINT "Tot read=",TCB(50)-TCB50
0180 !
0190 ! ----
0200 !
0210 BEGIN
0220 WAIT .1
0240 LET TCB50=TCB(50)
0250 LET X=TMR(0)
0251 SELECT R$ FROM "tst3.dat",KNO=0; N++; NEXT RECORD
0270 PRINT "Select normal next record (KEY):",TMR(0),N
0280 PRINT "Tot read=",TCB(50)-TCB50
0290 !
0300 ! ----
0310 !
0320 BEGIN
0330 WAIT .1
0350 LET TCB50=TCB(50)
0360 LET X=TMR(0)
0370 SELECT R$ FROM "tst3.dat",KNO=*; N++; NEXT RECORD
0380 PRINT "Select by physical record (KEY):",TMR(0),N
0390 PRINT "Tot read=",TCB(50)-TCB50
0400 GOTO 0010

Test Results Time (seconds) File IO Count
Read Next by Key 2.133 189,982
Read Next Physical 1.042 18,660
Select by Key 2.373 189,983
Select by Physical 1.252 18,661

As can be seen in the numbers above, reading by physical record for standard keyed files can reduce the number of physical IO requests by a factor of 10.

Since these tests were run on a Windows system and due to operating system caching, the actual gains in performance times are not necessarily reflective of a real life situation. Under real conditions, we expect the performance gain to be more in keeping with the file IO reduction due to the decreased disc IO activity.


*MEMORY* file performance

While this aspect of PxPlus is not specific to version 9111, access times to *MEMORY* files with defined key structures is much faster in PxPlus than with regular ProvideX. Consider the following:

Program on Standard ProvideX:

0010 RANDOMIZE 12345
0020 OPEN (1)"*memory*"
0030 LET A=TMR(0)
0040 FOR I=1 TO 25000
0050 LET K$=STR(RND(10000):"0000")+STR(RND(10000):"0000")
0060 WRITE (1,KEY=K$)K$,"test data","to attept","to time","the system!!!!!",1,2,3,4,5
0070 NEXT I
0080 PRINT TMR(0)," seconds"
0090 PRINT FIN(1,"NUMREC")," records"
0100 PRINT "First key=",KEF(1)
0110 PRINT "1000th key=",KEY(1,RNO=1000)
0120 PRINT "Last key=",KEL(1)


Change line 20 to run using the new *MEMORY* files in PxPlus:

0020 OPEN (1)"*memory*;KEYDEF=8"

Test Results Standard
ProvideX
PxPlus
Seconds 33 0.6882

Due to the internal design of the PxPlus memory files, performance increased by almost a factor of 50. In addition to improvments to keyed access to *MEMORY* files, indexed access has also been optimized resulting in improved performance not only in your applications, but also a number of system utilites such as the program editor.